Le 27/11/2019 à 14:39, Christopher Gregory via blfs-support a écrit :
> Hello,
> 
> Whilst attempting to build kmahjonn, I had to compile lex_common, and I got a 
> build failure:
> 
> /usr/include/c++/9.2.0/cstdlib:75:15: fatal error: stdlib.h: No such file or 
> directory 75 | #include_next <stdlib.h>
> 
> I edited the cstlib file and removed the _next and also in one other file 
> that mentioned it.  My question is this, will this have disasterous results 
> in any future compiles?

I tend to think (maybe I am wrong) that gcc folks know what they are doing
better than I am... Of course, once in a while, they may introduce bugs,
specially in the first release of a new major version. But this one is the
third version 9.x.y release, and I expect it to be pretty well ironed out.

So I wouldn't like to have to change anything in include files...

Now, whether this would have disastrous results, I cannot tell.

Usually, what is causing trouble with include_next is when some -isystem is
added, because it changes the order that gcc uses for looking for include
directories.

For me, the search order is:
-----
 /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../include/c++/9.2.0
 
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../include/c++/9.2.0/x86_64-pc-linux-gnu
 /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../include/c++/9.2.0/backward
 /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include
 /usr/local/include
 /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed
 /usr/include
-----
Note that all the paths with ../../../.. starts actually as /usr/include.

"find /usr/include -name cstdlib" returns:
/usr/include/c++/9.2.0/tr1/cstdlib
/usr/include/c++/9.2.0/cstdlib
/usr/include/boost/compatibility/cpp_c_headers/cstdlib

so an #include <cstdlib> would use the one in /usr/include/c++/9.2.0/
So an include_next from this file can use:
 /usr/include/c++/9.2.0/x86_64-pc-linux-gnu
 /usr/include/c++/9.2.0/backward
 /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include
 /usr/local/include
 /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed
 /usr/include

and now "find /usr/include -name stdlib.h" returns:
/usr/include/bits/stdlib.h
/usr/include/c++/9.2.0/tr1/stdlib.h
/usr/include/c++/9.2.0/stdlib.h
/usr/include/stdlib.h

The first and second dirs are not in the search path. The third one is ruled
out by include_next, but the last one should be found by include_next...

All of this can be changed by any "-isystem" option

> 
> With removing that it allowed lex_common to compile and install.  The result 
> is that kmahjonn successfully built and installed, and is correctly working.

I've found only this for "lex_common":
https://github.com/aws-robotics/lex-common/tree/master/lex_common

Is it what you are trying to install? It seems to require a lot of headers
from AWS... Did you mange to install those?

Also Google cannot find any kmahjonn program. Did you mean kmahjongg?

Pierre

Pierre
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to