Build problem with GCC 6.1.1 #4266

Closed
opened 2026-02-21 17:13:34 -05:00 by deekerman · 14 comments
Owner

Originally created by @edianderson on GitHub (May 9, 2016).

When try build qbittorrent from source, occurs this error:

cd src/ && ( test -e Makefile || /usr/lib/qt/bin/qmake /home/edi/Projects/Qbittorrent/qbittorrent/qBittorrent/src/src.pro QMAKE_LRELEASE= -o Makefile ) && make -f Makefile 
make[1]: Entering directory '/home/edi/Projects/Qbittorrent/qbittorrent/qBittorrent/src'
uic gui/properties/propertieswidget.ui
uic gui/properties/trackersadditiondlg.ui
uic gui/properties/peersadditiondlg.ui
uic gui/rss/rss.ui
uic gui/rss/rsssettingsdlg.ui
uic gui/rss/automatedrssdownloader.ui
uic gui/mainwindow.ui
uic gui/about.ui
uic gui/preview.ui
uic gui/login.ui
uic gui/downloadfromurldlg.ui
uic gui/bandwidth_limit.ui
uic gui/updownratiodlg.ui
uic gui/confirmdeletiondlg.ui
uic gui/shutdownconfirmdlg.ui
uic gui/executionlog.ui
uic gui/addnewtorrentdialog.ui
uic gui/autoexpandabledialog.ui
uic gui/statsdialog.ui
uic gui/options.ui
uic gui/torrentcreatordlg.ui
uic gui/search/searchwidget.ui
uic gui/search/pluginselectdlg.ui
uic gui/search/pluginsourcedlg.ui
uic gui/search/searchtab.ui
uic gui/cookiesdialog.ui
compiling app/qtsingleapplication/qtsingleapplication.cpp
In file included from /usr/include/c++/6.1.1/bits/stl_algo.h:59:0,
                 from /usr/include/c++/6.1.1/algorithm:62,
                 from /usr/include/qt/QtCore/qglobal.h:85,
                 from /usr/include/qt/QtCore/qcoreapplication.h:37,
                 from /usr/include/qt/QtWidgets/qapplication.h:37,
                 from /usr/include/qt/QtWidgets/QApplication:1,
                 from app/qtsingleapplication/qtsingleapplication.h:44,
                 from app/qtsingleapplication/qtsingleapplication.cpp:42:
/usr/include/c++/6.1.1/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
                         ^
compilation terminated.
Makefile:2476: recipe for target 'qtsingleapplication.o' failed
make[1]: *** [qtsingleapplication.o] Error 1

Enviroment:
GCC 6.1.1
ArchLinux 64 bits.

Originally created by @edianderson on GitHub (May 9, 2016). When try build qbittorrent from source, occurs this error: ``` cd src/ && ( test -e Makefile || /usr/lib/qt/bin/qmake /home/edi/Projects/Qbittorrent/qbittorrent/qBittorrent/src/src.pro QMAKE_LRELEASE= -o Makefile ) && make -f Makefile make[1]: Entering directory '/home/edi/Projects/Qbittorrent/qbittorrent/qBittorrent/src' uic gui/properties/propertieswidget.ui uic gui/properties/trackersadditiondlg.ui uic gui/properties/peersadditiondlg.ui uic gui/rss/rss.ui uic gui/rss/rsssettingsdlg.ui uic gui/rss/automatedrssdownloader.ui uic gui/mainwindow.ui uic gui/about.ui uic gui/preview.ui uic gui/login.ui uic gui/downloadfromurldlg.ui uic gui/bandwidth_limit.ui uic gui/updownratiodlg.ui uic gui/confirmdeletiondlg.ui uic gui/shutdownconfirmdlg.ui uic gui/executionlog.ui uic gui/addnewtorrentdialog.ui uic gui/autoexpandabledialog.ui uic gui/statsdialog.ui uic gui/options.ui uic gui/torrentcreatordlg.ui uic gui/search/searchwidget.ui uic gui/search/pluginselectdlg.ui uic gui/search/pluginsourcedlg.ui uic gui/search/searchtab.ui uic gui/cookiesdialog.ui compiling app/qtsingleapplication/qtsingleapplication.cpp In file included from /usr/include/c++/6.1.1/bits/stl_algo.h:59:0, from /usr/include/c++/6.1.1/algorithm:62, from /usr/include/qt/QtCore/qglobal.h:85, from /usr/include/qt/QtCore/qcoreapplication.h:37, from /usr/include/qt/QtWidgets/qapplication.h:37, from /usr/include/qt/QtWidgets/QApplication:1, from app/qtsingleapplication/qtsingleapplication.h:44, from app/qtsingleapplication/qtsingleapplication.cpp:42: /usr/include/c++/6.1.1/cstdlib:75:25: fatal error: stdlib.h: No such file or directory #include_next <stdlib.h> ^ compilation terminated. Makefile:2476: recipe for target 'qtsingleapplication.o' failed make[1]: *** [qtsingleapplication.o] Error 1 ``` Enviroment: GCC 6.1.1 ArchLinux 64 bits.
deekerman 2026-02-21 17:13:34 -05:00
  • closed this issue
  • added the
    OS: Linux
    label
Author
Owner

@sledgehammer999 commented on GitHub (May 9, 2016):

Are you usign qt4? If yes, don't expect it to build nicely with newer compilers.

@sledgehammer999 commented on GitHub (May 9, 2016): Are you usign qt4? If yes, don't expect it to build nicely with newer compilers.
Author
Owner

@eli-schwartz commented on GitHub (May 9, 2016):

Arch AUR package: qbittorent-git

32-bit
gcc 6.1.1-1
qt5-base 5.6.0-5

@eli-schwartz commented on GitHub (May 9, 2016): Arch AUR package: [qbittorent-git](https://aur.archlinux.org/packages/qbittorrent-git) 32-bit gcc 6.1.1-1 qt5-base 5.6.0-5
Author
Owner

@edianderson commented on GitHub (May 9, 2016):

No, I am using qt5-base 5.6.0-5.
When trying build from AUR or directly from git, the same error occurs.

Error from AUR:

cd src/ && ( test -e Makefile || /usr/lib/qt/bin/qmake /home/edi/Projects/Qbittorrent/qbittorrent/src/qbittorrent/src/src.pro QMAKE_LRELEASE= -o Makefile ) && make -f Makefile
make[1]: Entering directory '/home/edi/Projects/Qbittorrent/qbittorrent/src/qbittorrent/src'
compiling app/qtsingleapplication/qtsingleapplication.cpp
In file included from /usr/include/c++/6.1.1/bits/stl_algo.h:59:0,
from /usr/include/c++/6.1.1/algorithm:62,
from /usr/include/qt/QtCore/qglobal.h:85,
from /usr/include/qt/QtCore/qcoreapplication.h:37,
from /usr/include/qt/QtWidgets/qapplication.h:37,
from /usr/include/qt/QtWidgets/QApplication:1,
from app/qtsingleapplication/qtsingleapplication.h:44,
from app/qtsingleapplication/qtsingleapplication.cpp:42:
/usr/include/c++/6.1.1/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
#include_next <stdlib.h>
^

@edianderson commented on GitHub (May 9, 2016): No, I am using qt5-base 5.6.0-5. When trying build from AUR or directly from git, the same error occurs. Error from AUR: cd src/ && ( test -e Makefile || /usr/lib/qt/bin/qmake /home/edi/Projects/Qbittorrent/qbittorrent/src/qbittorrent/src/src.pro QMAKE_LRELEASE= -o Makefile ) && make -f Makefile make[1]: Entering directory '/home/edi/Projects/Qbittorrent/qbittorrent/src/qbittorrent/src' compiling app/qtsingleapplication/qtsingleapplication.cpp In file included from /usr/include/c++/6.1.1/bits/stl_algo.h:59:0, from /usr/include/c++/6.1.1/algorithm:62, from /usr/include/qt/QtCore/qglobal.h:85, from /usr/include/qt/QtCore/qcoreapplication.h:37, from /usr/include/qt/QtWidgets/qapplication.h:37, from /usr/include/qt/QtWidgets/QApplication:1, from app/qtsingleapplication/qtsingleapplication.h:44, from app/qtsingleapplication/qtsingleapplication.cpp:42: /usr/include/c++/6.1.1/cstdlib:75:25: fatal error: stdlib.h: No such file or directory #include_next <stdlib.h> ^
Author
Owner

@sledgehammer999 commented on GitHub (May 10, 2016):

This probably a compiler error/bug or wrong packaging of the compiler. 'stdlib.h' is supposed to be part of the compiler and in fact it is referenced by the compiler's headers. So there's nothing I can do about it. Try to see if there is already a bug report filed against gcc in Arch for this.
If not, then open one. I am closing this. If it turns out to be an actual qbt bug then I can reopen this.

@sledgehammer999 commented on GitHub (May 10, 2016): This probably a compiler error/bug or wrong packaging of the compiler. 'stdlib.h' is supposed to be part of the compiler and in fact it is referenced by the compiler's headers. So there's nothing I can do about it. Try to see if there is already a bug report filed against gcc in Arch for this. If not, then open one. I am closing this. If it turns out to be an actual qbt bug then I can reopen this.
Author
Owner
@eli-schwartz commented on GitHub (May 10, 2016): This looks promising: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Q5SWCUUMWQ4EMS7CU2CBOZHV3WZYOOTT/
Author
Owner

@edianderson commented on GitHub (May 10, 2016):

Hi sledgehammer999, I had not seen it could build with cmake. I tried and it worked. The problem looks like occurs when using qmake.

@edianderson commented on GitHub (May 10, 2016): Hi sledgehammer999, I had not seen it could build with cmake. I tried and it worked. The problem looks like occurs when using qmake.
Author
Owner

@YuanhaoGong commented on GitHub (May 10, 2016):

I got the same error:
/usr/include/c++/6.1.1/cstdlib:75:25: fatal error: stdlib.h: No such file or directory

@YuanhaoGong commented on GitHub (May 10, 2016): I got the same error: /usr/include/c++/6.1.1/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
Author
Owner

@edianderson commented on GitHub (May 10, 2016):

YuanhaoGong try build with cmake, it worked for me.

@edianderson commented on GitHub (May 10, 2016): YuanhaoGong try build with cmake, it worked for me.
Author
Owner

@Chocobo1 commented on GitHub (May 17, 2016):

Looks like this is a qmake bug: https://bugreports.qt.io/browse/QTBUG-53375 (closed in favor of: https://bugreports.qt.io/browse/QTBUG-53367)

Workarounds for now (choose one):

  • in src/Makefile remove -isystem /usr/include under INCPATH variable.
  • or run the following:
./configure
pushd src && qmake src.pro QMAKE_CFLAGS_ISYSTEM= && popd
make
  • use cmake
@Chocobo1 commented on GitHub (May 17, 2016): Looks like this is a qmake bug: https://bugreports.qt.io/browse/QTBUG-53375 (closed in favor of: https://bugreports.qt.io/browse/QTBUG-53367) Workarounds for now (choose one): - in `src/Makefile` remove `-isystem /usr/include` under `INCPATH` variable. - or run the following: ``` shell ./configure pushd src && qmake src.pro QMAKE_CFLAGS_ISYSTEM= && popd make ``` - use cmake
Author
Owner

@sledgehammer999 commented on GitHub (May 17, 2016):

The last bug is marked as "P2 Important" so I wager that it will be fixed in their release. Plus 5.6.0 is supposed to be LTS so a minor version release is due.

@sledgehammer999 commented on GitHub (May 17, 2016): The last bug is marked as "P2 Important" so I wager that it will be fixed in their release. Plus 5.6.0 is supposed to be LTS so a minor version release is due.
Author
Owner

@Chocobo1 commented on GitHub (May 23, 2016):

@sledgehammer999
Qt closed https://bugreports.qt.io/browse/QTBUG-53367 marking it as invalid!?
Isn't qmake's fault of appending (abusing) -isystem in the first place?

@Chocobo1 commented on GitHub (May 23, 2016): @sledgehammer999 Qt closed https://bugreports.qt.io/browse/QTBUG-53367 marking it as invalid!? Isn't qmake's fault of appending (abusing) `-isystem` in the first place?
Author
Owner

@sledgehammer999 commented on GitHub (May 24, 2016):

Isn't qmake's fault of appending (abusing) -isystem in the first place?

I would think so too! Anyway, can you confirm that #5275 bash script change is correct?

@sledgehammer999 commented on GitHub (May 24, 2016): > Isn't qmake's fault of appending (abusing) -isystem in the first place? I would think so too! Anyway, can you confirm that #5275 bash script change is correct?
Author
Owner

@Chocobo1 commented on GitHub (May 24, 2016):

I would think so too! Anyway, can you confirm that #5275 bash script change is correct?

IMO the PR is more like a hack, including /usr/include should be fine if it's not paired with -isystem.

@Chocobo1 commented on GitHub (May 24, 2016): > I would think so too! Anyway, can you confirm that #5275 bash script change is correct? IMO the PR is more like a hack, including `/usr/include` _should_ be fine if it's not paired with `-isystem`.
Author
Owner

@vnta commented on GitHub (Jan 25, 2017):

Try by disabling pre-compiled headers, either from cmake-gui or using the command line parameter

-DENABLE_PRECOMPILED_HEADERS=OFF

@vnta commented on GitHub (Jan 25, 2017): Try by disabling pre-compiled headers, either from cmake-gui or using the command line parameter -DENABLE_PRECOMPILED_HEADERS=OFF
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#4266
No description provided.