当前位置:网站首页>"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.
边栏推荐
- C language self-made Games: Sanzi (tic tac toe chess) intelligent chess supplement
- [research materials] 2022q1 game preferred casual game distribution circular - Download attached
- Valentine's day limited withdrawal guide: for one in 200 million of you
- Thesis reading_ Tsinghua Ernie
- Current market situation and development prospect prediction of global direct energy deposition 3D printer industry in 2022
- 《牛客刷verilog》Part II Verilog进阶挑战
- The reason why the entity class in the database is changed into hump naming
- Market status and development prospect forecast of global button dropper industry in 2022
- Thesis reading_ ICD code_ MSMN
- Blog building tool recommendation (text book delivery)
猜你喜欢
![[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)
![[luatos sensor] 1 light sensing bh1750](/img/70/07f29e072c0b8630f92ec837fc12d5.jpg)
[luatos sensor] 1 light sensing bh1750

Uipath practice (08) - selector

SSM framework integration

Actual combat 8051 drives 8-bit nixie tube

Oracle SQL table data loss

Shuttle + Alluxio 加速内存Shuffle起飞
![[research materials] the fourth quarter report of the survey of Chinese small and micro entrepreneurs in 2021 - Download attached](/img/01/052928e7f20ca671cdc4c30ae55258.jpg)
[research materials] the fourth quarter report of the survey of Chinese small and micro entrepreneurs in 2021 - Download attached
![[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

On typescript and grammar
随机推荐
[set theory] binary relation (example of binary relation operation | example of inverse operation | example of composite operation | example of limiting operation | example of image operation)
LVS load balancing cluster of efficient multi-purpose cluster (NAT mode)
Thesis reading_ Chinese medical model_ eHealth
Current market situation and development prospect prediction of global direct energy deposition 3D printer industry in 2022
MC Layer Target
论文阅读_中文医疗模型_ eHealth
Interface frequency limit access
Market status and development prospect prediction of global colorimetric cup cover industry in 2022
[luatos sensor] 2 air pressure bmp180
5-36v input automatic voltage rise and fall PD fast charging scheme drawing 30W low-cost chip
1086 tree traversals again (25 points)
Thesis reading_ ICD code_ MSMN
Blog building tool recommendation (text book delivery)
[research materials] 2022q1 game preferred casual game distribution circular - Download attached
Three representations of signed numbers: original code, inverse code and complement code
Shuttle + Alluxio 加速内存Shuffle起飞
M1 Pro install redis
动态规划——相关概念,(数塔问题)
[luatos sensor] 1 light sensing bh1750
1106 lowest price in supply chain (25 points)