Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not compile on Ubuntu 18.04, stdlib.h: No such file or directory #727

Open
probonopd opened this issue May 8, 2020 · 6 comments
Open

Comments

@probonopd
Copy link

Ubuntu 18.04

sudo apt-get -y install build-essential git qt5-default qttools5-dev-tools libqt5gui5 qtmultimedia5-dev libqt5multimediawidgets5 libqt5network5 libqt5svg5-dev libqt5x11extras5-dev libxcb-icccm4-dev libxcb-ewmh-dev libxcb-composite0-dev libxcb-damage0-dev libxcb-util0-dev libphonon-dev libxcomposite-dev libxdamage-dev libxrender-dev libxcb-image0-dev libxcb-screensaver0-dev qtdeclarative5-dev fluxbox kde-style-oxygen xscreensaver xbacklight alsa-utils acpi numlockx pavucontrol xterm sysstat git
git clone https://github.com/trueos/lumina.git
cd lumina
qmake LINUX_DISTRO=Debian
make

(...)
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DPREFIX=QString\(\"/usr\"\) -DL_ETCDIR=QString\(\"/usr/etc\"\) -DL_SHAREDIR=QString\(\"/usr/share\"\) -DGIT_VERSION="\"82901d36\"" -DQT_NO_DEBUG -DQT_MULTIMEDIAWIDGETS_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_MULTIMEDIA_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I. -I../libLumina -isystem /usr/include/x86_64-linux-gnu/qt5 -I/usr -isystem /usr/include -I/home/me/lumina/src-qt5/core/lumina-desktop -I../../src-cpp -Isrc-screensaver -isystem /usr/include/x86_64-linux-gnu/qt5/QtMultimediaWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtSvg -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtX11Extras -isystem /usr/include/x86_64-linux-gnu/qt5/QtMultimedia -isystem /usr/include/x86_64-linux-gnu/qt5/QtQuick -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtConcurrent -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.build/moc -isystem /usr/include/libdrm -I.build/ui -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o .build/obj/ResizeMenu.o ../libLumina/ResizeMenu.cpp
In file included from /usr/include/c++/7/bits/stl_algo.h:59:0,
                 from /usr/include/c++/7/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:109,
                 from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtguiglobal.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qtwidgetsglobal.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QMenu:1,
                 from ../libLumina/ResizeMenu.h:10,
                 from ../libLumina/ResizeMenu.cpp:7:
/usr/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
               ^~~~~~~~~~
compilation terminated.
Makefile:1498: recipe for target '.build/obj/ResizeMenu.o' failed
make[3]: *** [.build/obj/ResizeMenu.o] Error 1
make[3]: Leaving directory '/home/me/lumina/src-qt5/core/lumina-desktop'
Makefile:51: recipe for target 'sub-lumina-desktop-make_first' failed
make[2]: *** [sub-lumina-desktop-make_first] Error 2
make[2]: Leaving directory '/home/me/lumina/src-qt5/core'
Makefile:46: recipe for target 'sub-core-make_first' failed
make[1]: *** [sub-core-make_first] Error 2
make[1]: Leaving directory '/home/me/lumina/src-qt5'
Makefile:44: recipe for target 'sub-src-qt5-make_first' failed
make: *** [sub-src-qt5-make_first] Error 2
@q5sys
Copy link
Member

q5sys commented May 14, 2020

I've got a ticket about this with Fedora to try to track down what the issue is.
https://bugzilla.redhat.com/show_bug.cgi?id=1835441
Per one of the gcc guys:
It's supposed to find /usr/include/stdlib.h so if it isn't, it suggests you've messed up the include paths, probably by using -isystem /usr/include (so don't do that).

And I see that you do have -isystem /usr/include in your build flags and I do as well.
So the cause of that needs to be determined.

@q5sys
Copy link
Member

q5sys commented May 14, 2020

for completeness of ticket, here's my full build string that's failing.
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DPREFIX=QString\(\"/usr\"\) -DL_ETCDIR=QString\(\"/usr/etc\"\) -DL_SHAREDIR=QString\(\"/usr/share\"\) -DGIT_VERSION="\"82901d36\"" -DQT_NO_DEBUG -DQT_MULTIMEDIAWIDGETS_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_MULTIMEDIA_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I. -I../libLumina -isystem /usr/include/qt5 -I/usr -isystem /usr/include -I/home/q5sys/git/lumina/src-qt5/core/lumina-desktop -I../../src-cpp -Isrc-screensaver -isystem /usr/include/qt5/QtMultimediaWidgets -isystem /usr/include/qt5/QtSvg -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtX11Extras -isystem /usr/include/qt5/QtMultimedia -isystem /usr/include/qt5/QtQuick -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtQml -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/qt5/QtCore -I.build/moc -I.build/ui -I/usr/lib64/qt5/mkspecs/linux-g++ -o .build/obj/ResizeMenu.o ../libLumina/ResizeMenu.cpp

@q5sys
Copy link
Member

q5sys commented May 15, 2020

Bit more information, after digging around this appears to be something that is happening during the pre compilation phase by something qmake is doing. Upstream tickets exist and have been closed.
GCC seems to blame downstream make systems https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129#c8

And of course downstream make systems want to blame 3rd party applications.
Qt Tickets:
https://bugreports.qt.io/browse/QTBUG-53367
https://bugreports.qt.io/browse/QTBUG-53375

@probonopd
Copy link
Author

Thanks for researching this @q5sys - is there any workaround (e.g., disabling certain things) that you could think of?

@q5sys
Copy link
Member

q5sys commented May 23, 2020

I've got a few ideas to try, but just havent had the cycles to get them done. Hopefully with the long weekend in the US this weekend I can do some more testing.

@FrostKnight
Copy link

FrostKnight commented Aug 9, 2020

Just something you should know, this also affects Hyperbola too. Feel free to message me if you find a fix.

Although it could be because I am on the testing version ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants