On Thu, Jul 16, 2020 at 09:00:19AM +0200, Rielynd Mira via blfs-support wrote: > Hi there, found something extremely weird yesterday. > > When trying to build C++ programs/files, I sometimes get errors like that: > > /usr/include/c++/10.1.0/cstdlib:75:15: fatal error: stdlib.h: No such file > or directory > 75 | #include_next <stdlib.h> > > That just appears to happen when including something like <iostream>; if I > include the C headers directly, it works fine. >
I think I've seen similar failures when using a newer version of gcc (or clang), and maybe also when using a newer version of glibc. In each case, the fix has been to add the missing header(s). That's one of the reasons I hate it when packages or tools change their default c++ standard, and I have to hope that someone else has already fixed the packages, and that google can find the fix. > The main thing that's weird about it: > Yesterday, after I tried out recompiling gcc, everything worked just fine. > Program built and ran. Though, literally right after I woke up today, it > didn't work anymore. You appear to be saying that the *same* source which compiled yeaterday no longer compiles today on the same system ? A more normal situation would be: yesterday I built several programs, and of those I had to fix 'foo'. Today I'm getting a similar problem in 'bar'. That is normal. > I also tried it with recompiling glibc, which resulted in exactly the same > thing, and I tried using the '-I' and '-isystem' switches, which do > absolutely nothing... > > gcc's include search path, glibc's version and 'ldconfig -v' output from > my system is here: > https://pastebin.com/3qKtNkC8 > > LFS Version I used: Version 20200707-systemd > BLFS Version I used: Version 2020-07-14 - systemd > > I hope that someone is able to help me here to at least understand what I > did wrong... if anything. > > Thank you. Recompiling glibc in case it fixes the problem seems like a dangerous idea unless you have reason to believe that something specific in your glibc build was wrong - you will generally need to reboot after recompiling glibc, and the shutdown can be very unclean (i.e. the system can hang). ĸen -- +++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++ - Hogfather -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page