当前位置:网站首页>"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.
边栏推荐
- 联发科技2023届提前批IC笔试(题目)
- Oracle SQL table data loss
- 论文阅读_ICD编码_MSMN
- sql语句模糊查询遇到的问题
- [tools run SQL blind note]
- MySQL winter vacation self-study 2022 12 (3)
- 50 practical applications of R language (36) - data visualization from basic to advanced
- 1086 tree traversals again (25 points)
- MediaTek 2023 IC written examination approved in advance (topic)
- 《牛客刷verilog》Part II Verilog进阶挑战
猜你喜欢
![[tools run SQL blind note]](/img/c3/86db4568b221d2423914990a88eec2.png)
[tools run SQL blind note]

Compile and decompile GCC common instructions
![[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
![[set theory] relation properties (transitivity | transitivity examples | transitivity related theorems)](/img/c2/87358af6b2b2892a6eceb751b3b60c.jpg)
[set theory] relation properties (transitivity | transitivity examples | transitivity related theorems)

LVS load balancing cluster of efficient multi-purpose cluster (NAT mode)
![[research materials] 2021 China's game industry brand report - Download attached](/img/b7/a377b0b7c742078e2feb28ebfbca62.jpg)
[research materials] 2021 China's game industry brand report - Download attached

Kept hot standby and haproxy

Online VR model display - 3D visual display solution

Prepare for 2022 and welcome the "golden three silver four". The "summary of Android intermediate and advanced interview questions in 2022" is fresh, so that your big factory interview can go smoothly
![[XSS bypass - protection strategy] understand the protection strategy and better bypass](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[XSS bypass - protection strategy] understand the protection strategy and better bypass
随机推荐
Notes | numpy-09 Broadcast
论文阅读_ICD编码_MSMN
"Niuke brush Verilog" part II Verilog advanced challenge
Market status and development prospect prediction of the global fire alarm sensor industry in 2022
Market status and development prospect prediction of global colorimetric cup cover industry in 2022
Sdl2 + OpenGL glsl practice (Continued)
[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
[research materials] annual report of China's pension market in 2021 - Download attached
Coordinatorlayout appbarrayout recyclerview item exposure buried point misalignment analysis
RT thread flow notes I startup, schedule, thread
【批处理DOS-CMD命令-汇总和小结】-CMD窗口的设置与操作命令-关闭cmd窗口、退出cmd环境(exit、exit /b、goto :eof)
I've seen a piece of code in the past. I don't know what I'm doing. I can review it when I have time
Handler understands the record
Use Sqlalchemy module to obtain the table name and field name of the existing table in the database
Three representations of signed numbers: original code, inverse code and complement code
Market status and development prospect prediction of global neutral silicone sealant industry in 2022
[research materials] 2021 China's game industry brand report - Download attached
[PHP vulnerability weak type] basic knowledge, PHP weak equality, error reporting and bypassing
[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)