On 28/02/2017 20:39, Bruce Dubbs wrote:
John Burrell wrote:
I get this when compiling qt-5.8.0
In file included from /usr/include/c++/6.3.0/bits/stl_algo.h:59:0,
from /usr/include/c++/6.3.0/algorithm:62,
from
../../../../include/QtCore/../../src/corelib/global/qglobal.h:108,
from ../../../../include/QtCore/qglobal.h:1,
from
../../../../include/QtSql/../../src/sql/kernel/qtsqlglobal.h:43,
from ../../../../include/QtSql/qtsqlglobal.h:1,
from
../../../../include/QtSql/../../src/sql/kernel/qsqldriver.h:43,
from ../../../../include/QtSql/qsqldriver.h:1,
from qsql_mysql_p.h:54,
from qsql_mysql.cpp:40:
/usr/include/c++/6.3.0/cstdlib:75:25: fatal error: stdlib.h: No such
file
or directory
#include_next <stdlib.h>
^
compilation terminated.
make[5]: *** [Makefile:932: .obj/qsql_mysql.o] Error 1
make[5]: Leaving directory
'/usr/src/xlibs/qt5/qt-everywhere-opensource-src-5.8.0/qtbase/src/plugins
/sqldrivers/mysql'
According to this page:
https://github.com/voidlinux/void-packages/issues/5254
one workaround is
sed -i 's/isystem/I/' qtbase/mkspecs/common/gcc-base.conf
which works for me, but I've no idea why it can't find
/usr/include/stdlib.h (from glibc).
Anyone else having this problem?
I do not see it. Are you using a LFS-8.0 base system?
-- Bruce
I've seen this error, but I do not remember where at the moment. I am
sure I have compiled QT-5.8.0 without problem on an LFS-8.0-rc1 based
system.
Here is an explanation of what you are seeing (not why you are seeing
that): if you type "find /usr -name stdlib.h", you'll see that there are
several such files. For example, on the system I am running right now:
/usr/include/bits/stdlib.h
/usr/include/stdlib.h
/usr/include/c++/6.3.0/tr1/stdlib.h
/usr/include/c++/6.3.0/stdlib.h
the gcc preprocessor has therefore to choose which one to include when
it encounters "#include <stdlib.h>". That is done in the following way:
the preprocessor has a well defined search order for system include
directories. It builds a search list from that order, and takes the
first found file in the search list. Once that file has been included,
the user (or the preprocessor) may want to include the next file in the
list. That's what the directive "#include_next" is for. However the
-isystem switch may change the search order, respective to what the -I
(capital i) switch does. That's why the #include_next directive may
succeed with -I and not with -isystem.
Now why was the gcc-base.conf file wrong is another story...
Pierre
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page