当前位置:网站首页>"Pthread.h" not found problem encountered in compiling GCC
"Pthread.h" not found problem encountered in compiling GCC
2022-07-03 04:59:00 【passenger12234】
stay LFS Of The fifth chapter Compile from source freestanding Of GCC The following error is reported
./gthr-default.h:35:10: fatal error: pthread.h: No such file or directory
35 | #include <pthread.h>
The reference configuration instructions given in the book are
../configure \
--target=$LFS_TGT \
--prefix=$LFS/tools \
--with-glibc-version=2.35 \
--with-sysroot=$LFS \
--with-newlib \
--without-headers \
--enable-initfini-array \
--disable-nls \
--disable-shared \
--disable-multilib \
--disable-decimal-float \
--disable-threads \
--disable-libatomic \
--disable-libgomp \
--disable-libquadmath \
--disable-libssp \
--disable-libvtv \
--disable-libstdcxx \
--enable-languages=c,c++
I first tried to delete the above pile disable, The following configuration instructions are used ( Mainly curiosity configure Will it automatically infer some libraries and feature There is no way to support , such as threads)
../configure \
--target=$LFS_TGT \
--prefix=$LFS/tools \
--with-glibc-version=2.35 \
--with-sysroot=$LFS \
--with-newlib \
--without-headers \
--enable-initfini-array \
--disable-nls \
--disable-shared \
--disable-multilib \
And then, sure enough , I got the following error report
./gthr-default.h:35:10: fatal error: pthread.h: No such file or directory
35 | #include <pthread.h>
So I tried make clean, Then use the configuration instructions in the book to re configure. What's puzzling is , Still got the above pthread.h not found The error of ( Expected due to the removal of thread support , Should no longer rely on pthread.h The header file ).
Discover the use of rm -rf * hold build Delete all directories and then re configure It was successful . This description is the previous make clean Didn't say that the configuration file was deleted completely .
After a search , Found out GNU automake Description of and GNU coding styles Explanation .
on top coding styles The following instructions are included in the documentation for
‘clean’
Delete all files in the current directory that are normally created by building the program. Also delete files in other directories if they are created by this makefile. However, don’t delete the files that record the configuration. Also preserve files that could be made by building, but normally aren’t because the distribution comes with them. There is no need to delete parent directories that were created with ‘mkdir -p’, since they could have existed anyway.
‘distclean’
Delete all files in the current directory (or created by this makefile) that are created by configuring or building the program. If you have unpacked the source and built the program without creating any other files, ‘make distclean’ should leave only the files that were in the distribution. However, there is no need to delete parent directories that were created with ‘mkdir -p’, since they could have existed anyway.
Delete .dvi files here if they are not part of the distribution.
on top automake In the document , The following are defined clean semantics
- If
makebuilt it, and it is commonly something that one would want to rebuild (for instance, a.ofile), thenmostlycleanshould delete it. - Otherwise, if
makebuilt it, thencleanshould delete it. - If
configurebuilt it, thendistcleanshould delete it. - If the maintainer built it (for instance, a
.infofile), thenmaintainer-cleanshould delete it. Howevermaintainer-cleanshould not delete anything that needs to exist in order to run‘./configure && make’.
So the problem with my previous operation is that I shouldn't use make clean, Instead, use make distclean.
边栏推荐
- Market status and development prospect prediction of global SoC Test Platform Industry in 2022
- 【SQL注入点】注入点出现位置、判断
- ZABBIX monitoring of lamp architecture (3): zabbix+mysql (to be continued)
- Small sample target detection network with attention RPN and multi relationship detector (provide source code, data and download)
- 《牛客刷verilog》Part II Verilog进阶挑战
- Cross platform plug-in flutter for displaying local notifications_ local_ notifications
- [research materials] the fourth quarter report of the survey of Chinese small and micro entrepreneurs in 2021 - Download attached
- 文献阅读_基于多模态数据语义融合的旅游在线评论有用性识别研究(中文文献)
- 2022-02-11 daily clock in: problem fine brush
- The process of browser accessing the website
猜你喜欢

Analysis of proxy usage of ES6 new feature

Sdl2 + OpenGL glsl practice (Continued)
![[clock 223] [binary tree] [leetcode high frequency]: 102 Sequence traversal of binary tree](/img/0f/bc8c44aee7a2c9dccac050b1060017.jpg)
[clock 223] [binary tree] [leetcode high frequency]: 102 Sequence traversal of binary tree

论文阅读_清华ERNIE

Introduction to message queuing (MQ)
![[set theory] relation properties (reflexivity | reflexivity theorem | reflexivity | reflexivity theorem | example)](/img/2a/362f3b0491f721d89336d4f468c9dd.jpg)
[set theory] relation properties (reflexivity | reflexivity theorem | reflexivity | reflexivity theorem | example)

Valentine's day limited withdrawal guide: for one in 200 million of you

Shuttle + Alluxio 加速内存Shuffle起飞

Concurrent operation memory interaction
![[research materials] 2021 annual report on mergers and acquisitions in the property management industry - Download attached](/img/95/833f5ec20207ee5d7e6cdfa7208c5e.jpg)
[research materials] 2021 annual report on mergers and acquisitions in the property management industry - Download attached
随机推荐
【工具跑SQL盲注】
Force GCC to compile 32-bit programs on 64 bit platform
Hire cashier (differential constraint)
Learning record of arouter principle
2022-02-11 daily clock in: problem fine brush
1103 integer factorization (30 points)
Thesis reading_ Chinese medical model_ eHealth
Handling record of electric skateboard detained by traffic police
50 practical applications of R language (36) - data visualization from basic to advanced
String matching: find a substring in a string
Market status and development prospects of the global autonomous marine glider industry in 2022
1086 tree traversals again (25 points)
ZABBIX monitoring of lamp architecture (3): zabbix+mysql (to be continued)
[research materials] the fourth quarter report of the survey of Chinese small and micro entrepreneurs in 2021 - Download attached
Shell script Basics - basic grammar knowledge
The least operation of leetcode simple problem makes the array increment
[research materials] 2021 China's game industry brand report - Download attached
【SQL注入点】注入点出现位置、判断
[Yu Yue education] basic reference materials of interchangeability and measurement technology of Zhongyuan Institute of Technology
Coordinatorlayout appbarrayout recyclerview item exposure buried point misalignment analysis