@flemingp Sorry for bumping, but I have exactly the same problem - I'm trying to cross-compile qt5 for raspberry pi and encounter error
io/qfilesystemengine_unix.cpp: In function ‘int qt_statx(const char*, statx*)’:
io/qfilesystemengine_unix.cpp:321:26: error: ‘AT_FDCWD’ was not declared in this scope
321 | return qt_real_statx(AT_FDCWD, pathname, 0, statxBuffer);
| ^~~~~~~~
io/qfilesystemengine_unix.cpp: In function ‘int qt_lstatx(const char*, statx*)’:
io/qfilesystemengine_unix.cpp:326:26: error: ‘AT_FDCWD’ was not declared in this scope
326 | return qt_real_statx(AT_FDCWD, pathname, AT_SYMLINK_NOFOLLOW, statxBuffer);
| ^~~~~~~~
io/qfilesystemengine_unix.cpp:326:46: error: ‘AT_SYMLINK_NOFOLLOW’ was not declared in this scope
326 | return qt_real_statx(AT_FDCWD, pathname, AT_SYMLINK_NOFOLLOW, statxBuffer);
| ^~~~~~~~~~~~~~~~~~~
io/qfilesystemengine_unix.cpp: In function ‘int qt_fstatx(int, statx*)’:
io/qfilesystemengine_unix.cpp:331:34: error: ‘AT_EMPTY_PATH’ was not declared in this scope
331 | return qt_real_statx(fd, "", AT_EMPTY_PATH, statxBuffer);
| ^~~~~~~~~~~~~
io/qfilesystemengine_unix.cpp: In static member function ‘static bool QFileSystemEngine::renameFile(const QFileSystemEntry&, const QFileSystemEntry&, QSystemError&)’:
io/qfilesystemengine_unix.cpp:1447:19: error: ‘AT_FDCWD’ was not declared in this scope
1447 | if (renameat2(AT_FDCWD, srcPath, AT_FDCWD, tgtPath, RENAME_NOREPLACE) == 0)
| ^~~~~~~~
However, I don't understand your soultion. My configure script is:
./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=arm-linux-gnueabihf- -sysroot /mnt/linux_hdd/sysroot -opensource -confirm-license -I/mnt/linux_hdd/sysroot/usr/include/ -L/mnt/linux_hdd/sysroot/usr/lib/arm-linux-gnueabihf -skip qtserialbus -skip qtscxml -skip qtscript -skip qtcharts -skip qt3d -skip qtdatavis3d -skip qtcanvas3d -skip qtgamepad -skip qtvirtualkeyboard -skip qtwayland -skip qtwebengine -skip qtwebchannel -skip qtwebglplugin -skip qtwebsockets -make libs -prefix /usr/local/qt5pi -extprefix /mnt/linux_hdd/qt_rasp/qt5pi -hostprefix /mnt/linux_hdd/qt_rasp/qt5 -no-use-gold-linker -v -no-gbm
You said that after running configure you ran
~/raspi/qt5/bin/qmake -query
Yeah... except there's nothing inside my hostprefix directory. /mnt/linux_hdd/qt_rasp is empty. I've found the qmake binary inside qt-everywhere-src-5.15.1/qtbase/bin.
I've also added
INCLUDEPATH+=/mnt/linux_hdd/sysroot/usr/include/
LIBS +=-L/mnt/linux_hdd/sysroot/usr/lib/arm-linux-gnueabihf
to qtbase/mkspecs/devices/linux-rasp-pi3-g++/qmake.conf.
No difference. Compilation still fails with the same error.
I'm really losing my mind because I can't find a solution.
Would be really thankful for any suggestions