unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Compiling Qt application - error: linux/errno.h: No such file
@ 2021-06-06 16:33 excalamus--- via
  2021-06-06 16:53 ` Tobias Geerinckx-Rice
  0 siblings, 1 reply; 4+ messages in thread
From: excalamus--- via @ 2021-06-06 16:33 UTC (permalink / raw)
  To: Help Guix

I'm a Python developer familiar with PySide/PyQt teaching myself how to use Qt with C++ and following a tutorial on how to compile a Qt application without QtCreator (https://www.linux.org/threads/c-tutorial-create-qt-applications-without-qtcreator.18409/).  

I've installed what I believe are the necessary Guix packages: gcc (for g++), make, qtbase (for qmake and qtwidgets), and qtdeclarative (because the tutorial uses that later on).  When trying to compile the basic main window I get the following error:

g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I. -I../../.guix-profile/include/qt5 -I../../.guix-profile/include/qt5/QtWidgets -I../../.guix-profile/include/qt5/QtGui -I../../.guix-profile/include/qt5/QtCore -I. -I/gnu/store/m5l6pwzlk3909n9cka9c9qlk7f0lqbig-libdrm-2.4.103/include/libdrm -I../../.guix-profile/lib/qt5/mkspecs/linux-g++ -o main.o main.cpp
In file included from /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/include/errno.h:28,
                 from /gnu/store/jc90jrkd40az0zggw84s3ax6m351jlkg-gcc-10.3.0/include/c++/cerrno:42,
                 from /gnu/store/jc90jrkd40az0zggw84s3ax6m351jlkg-gcc-10.3.0/include/c++/ext/string_conversions.h:44,
                 from /gnu/store/jc90jrkd40az0zggw84s3ax6m351jlkg-gcc-10.3.0/include/c++/bits/basic_string.h:6545,
                 from /gnu/store/jc90jrkd40az0zggw84s3ax6m351jlkg-gcc-10.3.0/include/c++/string:55,
                 from ../../.guix-profile/include/qt5/QtCore/qbytearray.h:52,
                 from ../../.guix-profile/include/qt5/QtCore/qstring.h:50,
                 from ../../.guix-profile/include/qt5/QtCore/qobject.h:47,
                 from ../../.guix-profile/include/qt5/QtCore/qabstractanimation.h:43,
                 from ../../.guix-profile/include/qt5/QtCore/QtCore:6,
                 from ../../.guix-profile/include/qt5/QtWidgets/QtWidgetsDepends:3,
                 from ../../.guix-profile/include/qt5/QtWidgets/QtWidgets:3,
                 from main.cpp:2:
/gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/include/bits/errno.h:26:11: fatal error: linux/errno.h: No such file or directory
   26 | # include <linux/errno.h>
      |           ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:1191: main.o] Error 1

If I'm reading the error output correctly, the error occurs when trying to compile the main.cpp object file which uses includes the QtWidgets module.  The error is in that portion of the source, so I don't think there's anything I could comment out from the makefile.

Browsing the documentation for glibc, it looks like linux/errno.h is a glibc extension.  Is that not included in the Guix glibc package?  I don't see another Guix package for glibc extensions.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Compiling Qt application - error: linux/errno.h: No such file
  2021-06-06 16:33 Compiling Qt application - error: linux/errno.h: No such file excalamus--- via
@ 2021-06-06 16:53 ` Tobias Geerinckx-Rice
  2021-06-07  1:58   ` excalamus--- via
  2021-06-20  1:08   ` excalamus--- via
  0 siblings, 2 replies; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2021-06-06 16:53 UTC (permalink / raw)
  To: excalamus; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

Ave,

excalamus--- via 写道:
> /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/include/bits/errno.h:26:11: 
> fatal error: linux/errno.h: No such file or directory
>    26 | # include <linux/errno.h>
>       |           ^~~~~~~~~~~~~~~
> compilation terminated.
> make: *** [Makefile:1191: main.o] Error 1

Does including linux-libre-headers in the environment help?

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Compiling Qt application - error: linux/errno.h: No such file
  2021-06-06 16:53 ` Tobias Geerinckx-Rice
@ 2021-06-07  1:58   ` excalamus--- via
  2021-06-20  1:08   ` excalamus--- via
  1 sibling, 0 replies; 4+ messages in thread
From: excalamus--- via @ 2021-06-07  1:58 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: Help Guix



> Does including linux-libre-headers in the environment help?
>
It doesn't appear so. I had installed the glibc package previously (although I assumed it was part of the GCC deps). Trying to install the headers complained about conflicts with the glibc package. Uninstalled glibc and installed the headers. Same error.
 
I'm running Guix SD.  That should automatically set environment variables after install, correct? (not sure what to export anyways)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Compiling Qt application - error: linux/errno.h: No such file
  2021-06-06 16:53 ` Tobias Geerinckx-Rice
  2021-06-07  1:58   ` excalamus--- via
@ 2021-06-20  1:08   ` excalamus--- via
  1 sibling, 0 replies; 4+ messages in thread
From: excalamus--- via @ 2021-06-20  1:08 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: Help Guix

It works now!

In all fairness, it didn't work immediately. Because life is so busy, I had to shut down and on restart (however long after my last message) ran guix pull followed by guix package -u. Running make then compiled without issue. I see that sweet, sweet main window! 
Thank you so much for your help! I've been developing Qt for Python for years and am so excited to work with C++. 8D


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-20  1:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-06 16:33 Compiling Qt application - error: linux/errno.h: No such file excalamus--- via
2021-06-06 16:53 ` Tobias Geerinckx-Rice
2021-06-07  1:58   ` excalamus--- via
2021-06-20  1:08   ` excalamus--- via

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).