Specify search path in Qmake.conf for Cross compile
-
wrote on 14 May 2020, 15:21 last edited by Ongsk
How to multiple search path in qmake.conf for example beagleboard.g++
QMAKE_INCDIR_OPENGL_ES2 = search path 1 and search path 2 and search
path 3.QMAKE_LIBDIR_OPENGL_ES2 = search path 1 and search path 2 and search
path 3.my objective is during configuration/compilation, what the shared object at /usr/lib will be able to look for appropriate shared object from another folder, instead of copy the need one and paste it in /usr/lib.
OR the above methods are totally not workable ?Regards---- Simon
-
Hi,
Usually these files are found in the sysroot matching your device so you should not need to have that many possibilities to search in.
-
wrote on 16 May 2020, 11:40 last edited by
@SGaist said in Specify search path in Qmake.conf for Cross compile:
Hi,
Usually these files are found in the sysroot matching your device so you should not need to have that many possibilities to search in.
I agreed. but I found out a lot of error/warning such as below:libudev.h not found in [] and global paths
unistd.h not found in [] and global paths.
iconv.h not found in [] and global paths
unicode/utypes.h not found in [] and global paths.
unicode/ucol.h not found in [] and global paths.
unicode/ustring.h not found in [] and global paths.
pcre2.h not found in [] and global paths.
sys/slog2.h not found in [] and global paths
atomic not found in [] and global paths.
cstdint not found in [] and global paths.GLES2/gl2.h not found in [] and global paths
xf86drmMode.h not found in [] and global paths.
xf86drm.h not found in [] and global paths.xkbcommon/xkbcommon.h not found in [] and global paths.
double-conversion/double-conversion.h not found in [] and global paths.warning: libpcre.so.3, needed by../sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so, not found (try using -rpath or -rpath-link), but the shared object is inside the said folder
(I even try to redo the symbolic link thinking the link was broken)Any clues?
-
You should provide more information like the Qt version you are using, the configure line you are using, the exact device you try to build for, where you got the cross-compiler etc.
-
You should provide more information like the Qt version you are using, the configure line you are using, the exact device you try to build for, where you got the cross-compiler etc.
wrote on 16 May 2020, 16:40 last edited by@SGaist
Target : Qt5.142 (Qt EGLFS)
gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf
BeagleBone Black with Debian Stretch IOT Snapshot
(https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Debian_Stretch_IOT_TIDL_Snapshot)
Host: Ubuntu 18.06
Configuration : basically just to verify if OpenGl es 2 will be able to compile../Bone4/qt-everywhere-src-5.14.2/configure -v -release -opengl es2 -device linux-beaglebone-g++ -device-option CROSS_COMPILE=~/Bone4/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot ~/a_Bone/sysroot -opensource -confirm-license -release -make libs -prefix /usr -extprefix ~/Bone4/sysroot/usr -hostprefix ~/Bone4/qt5142_iot -nomake examples -nomake tests -skip webengine -skip qtwebchannel -skip qtwebglplugin -skip qtwayland -skip qtlocation -skip qtscript -skip webengine -skip qtmultimedia -skip qtimageformats -skip qtgamepad -skip qtdeclarative -skip qtsensors -skip qtspeech -skip qtserialbus -skip qtserialport -skip qtpurchasing -skip qttools -skip qtconnectivity -skip qtxmlpatterns -skip qt3d -skip qtwebchannel -skip qtwebglplugin -no-dbus -skip qtwebsockets -recheck-all code_text
Of course the usual error
ERROR: Feature 'opengles2' was enabled, but the pre-condition 'config.win32 || (!config.watchos && !features.opengl-desktop && libs.opengl_es2)' failed.
ERROR: The OpenGL functionality tests failed!
You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.The qmake.conf file is the standard one :
# # qmake configuration for the BeagleBoard and BeagleBoard xM boards # http://beagleboard.org/ MAKEFILE_GENERATOR = UNIX CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib include(../../common/linux.conf) include(../../common/gcc-base-unix.conf) include(../../common/g++-unix.conf) load(device_config) QT_QPA_DEFAULT_PLATFORM = eglfs # modifications to g++.conf QMAKE_CC = $${CROSS_COMPILE}gcc QMAKE_CXX = $${CROSS_COMPILE}g++ QMAKE_LINK = $${QMAKE_CXX} QMAKE_LINK_SHLIB = $${QMAKE_CXX} # modifications to linux.conf QMAKE_AR = $${CROSS_COMPILE}ar cqs QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy QMAKE_NM = $${CROSS_COMPILE}nm -P QMAKE_STRIP = $${CROSS_COMPILE}strip COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb #modifications to gcc-base.conf QMAKE_CFLAGS += $${COMPILER_FLAGS} QMAKE_CXXFLAGS += $${COMPILER_FLAGS} QMAKE_CXXFLAGS_RELEASE += -O3 QMAKE_LIBS += -lrt -lpthread -ldl # Extra stuff (OpenGL, DirectFB, ...) QMAKE_INCDIR_EGL = /home/simon/Bone41/sysroot/usr/include QMAKE_LIBDIR_EGL = /home/simon/Bone41/sysroot/usr/lib QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL} QMAKE_LIBDIR_OPENGL_ES2 = $${QMAKE_LIBDIR_EGL} QMAKE_INCDIR_OPENVG = $${QMAKE_INCDIR_EGL} QMAKE_LIBDIR_OPENVG = $${QMAKE_LIBDIR_EGL} VC_LIBRARY_PATH = /home/simon/a_Bone/sysroot/usr/lib VC_LINK_LINE = -L=$${VC_LIBRARY_PATH} QMAKE_LIBS_EGL = $${VC_LINK_LINE} -lEGL -lIMGegl -lsrv_um #QMAKE_LIBS_EGL = $${VC_LINK_LINE} -lEGL -lGLESv2 raspi #QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $${QMAKE_LIBS_EGL} QMAKE_LIBS_OPENGL_ES2 = $${VC_LINK_LINE} -lGLESv2 #QMAKE_LIBS_OPENGL_ES2 = $${VC_LINK_LINE} -lGLESv2 Raspi QMAKE_LIBS_OPENVG = -lOpenVG $${QMAKE_LIBS_EGL} # The official opt vc EGL references GLESv2 symbols: need to link it DISTRO_OPTS += hard-float # No need for any special EGL device integration. # Prioritize the default, compiled-in integration over any plugins. EGLFS_DEVICE_INTEGRATION = none include(../common/linux_arm_device_post.conf) load(qt_config) code_text
I have been reading this forum for quite a while to see if someone manage to crack it with 5.14.2. My understanding about BBB is the OpenGL has to be build and not using the "official" mesa version like below:
ibegl1-mesa-dev
libgl1-mesa-dev
libglu1-mesa-dev
libgles2-mesa-devam I wrong? or I am able to just use the above ?
Compare to Raspi which is pre -build with openGL , BBB is harder to cross compile for Qt EGLFS.So some guidance will be helpful.
Thanks
-
Did you install the corresponding development package on your BBB ?
-
wrote on 17 May 2020, 03:52 last edited by
@SGaist said in Specify search path in Qmake.conf for Cross compile:
Did you install the corresponding development package on your BBB ?
Yes I did. The headers are present at the respective folder. If configure with no-opengl, it will be plain sailing. That is why i have minimal configuration just to save time.
There is a funny thing though.
I had been trying various combo, upward from from qt 5.12.4 , i have no luck with BBB with the same qmake.conf.
Qt5.12.4 built against Linaro 6.5, it worked but not with 7.5.0
That is the reason why i would like to know if it is possible to have multiple search paths. something like path+= path a, path b, path c
One more question , what is the global path mean in the error message ?
"GLES2/gl2.h not found in [] and global paths" ?
Regards
simon
-
My guess would the standard paths used for detection. What error did you got with 7.5.0 ?
-
wrote on 18 May 2020, 13:41 last edited by
@SGaist said in Specify search path in Qmake.conf for Cross compile:
My guess would the standard paths used for detection. What error did you got with 7.5.0 ?
I manage to get it configure: as you said I change the path
pointing to "sysroot/usr/lib/arm-linux-gnueabih" instead of "sysroot/usr/lib/"with
EGL .................................... yes OpenVG ................................. no OpenGL: Desktop OpenGL ....................... no OpenGL ES 2.0 ........................ yes OpenGL ES 3.0 ........................ no OpenGL ES 3.1 ........................ no OpenGL ES 3.2 ........................ no Vulkan ................................. no QPA backends: DirectFB ............................... no EGLFS .................................. yes EGLFS details: EGLFS OpenWFD ........................ no EGLFS i.Mx6 .......................... no EGLFS i.Mx6 Wayland .................. no EGLFS RCAR ........................... no EGLFS EGLDevice ...................... no EGLFS GBM ............................ yes EGLFS VSP2 ........................... no EGLFS Mali ........................... no EGLFS Raspberry Pi ................... no EGLFS X11 ............................ no LinuxFB ................................ yes VNC .................................... yes
but It failed during make process:
In file included from /home/simon/a_Bone_Str/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/7.5.0/bits/stl_algo.h:59:0, from /home/simon/a_Bone_Str/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/7.5.0/algorithm:62, from /home/simon/a_Bone_Str/qt-everywhere-src-5.14.2/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:142, from /home/simon/a_Bone_Str/qt-everywhere-src-5.14.2/qtbase/include/QtCore/qglobal.h:1, from /home/simon/a_Bone_Str/qt-everywhere-src-5.14.2/qtbase/src/gui/kernel/../../corelib/global/qt_pch.h:56, from /home/simon/a_Bone_Str/qt-everywhere-src-5.14.2/qtbase/src/gui/kernel/qt_gui_pch.h:48: /home/simon/a_Bone_Str/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/7.5.0/cstdlib:75:15: fatal error: stdlib.h: No such file or directory #include_next <stdlib.h> ^~~~~~~~~~ compilation terminated. Makefile:2039: recipe for target '.pch/Qt5Gui.gch/c++' failed make[3]: *** [.pch/Qt5Gui.gch/c++] Error 1 make[3]: Leaving directory '/home/simon/build-bone-5/qtbase/src/gui' Makefile:556: recipe for target 'sub-gui-make_first' failed make[2]: *** [sub-gui-make_first] Error 2 make[2]: Leaving directory '/home/simon/build-bone-5/qtbase/src' Makefile:50: recipe for target 'sub-src-make_first' failed make[1]: *** [sub-src-make_first] Error 2 make[1]: Leaving directory '/home/simon/build-bone-5/qtbase' Makefile:82: recipe for target 'module-qtbase-make_first' failed make: *** [module-qtbase-make_first] Error 2
the configuration log showed a lot of failed steps ( Modified text)
ommand line: -v -r pcre2.h not found in [] and global paths. sys/slog2.h not found in [] and global paths. => source produced no result. bcm_host.h not found in [] and global paths. => source produced no result. > make: *** [main.o] Error 1 test config.qtbase_gui.tests.egl-viv FAILED VG/openvg.h not found in [] and global paths. => source produced no result. looking for library libmd4c Trying source 0 (type pkgConfig) of library libmd4c ... + PKG_CONFIG_SYSROOT_DIR=/home/simon/a_Bone_Str/sysroot PKG_CONFIG_LIBDIR=/home/simon/a_Bone_Str/sysroot/usr/lib/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/share/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors md4c pkg-config did not find package. => source produced no result. looking for library vulkan Trying source 0 (type pkgConfig) of library vulkan ... + PKG_CONFIG_SYSROOT_DIR=/home/simon/a_Bone_Str/sysroot PKG_CONFIG_LIBDIR=/home/simon/a_Bone_Str/sysroot/usr/lib/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/share/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors vulkan pkg-config did not find package. => source produced no result. Trying source 1 (type makeSpec) of library vulkan ... vulkan/vulkan.h not found in [] and global paths. => source produced no result. test config.qtbase_gui.libraries.vulkan FAILED executing config test x11prefix + PKG_CONFIG_SYSROOT_DIR=/home/simon/a_Bone_Str/sysroot PKG_CONFIG_LIBDIR=/home/simon/a_Bone_Str/sysroot/usr/lib/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/share/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors x11 test config.qtbase_gui.tests.x11prefix gave result /usr looking for library x11sm Trying source 0 (type pkgConfig) of library x11sm ... + PKG_CONFIG_SYSROOT_DIR=/home/simon/a_Bone_Str/sysroot PKG_CONFIG_LIBDIR=/home/simon/a_Bone_Str/sysroot/usr/lib/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/share/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors sm ice pkg-config did not find package. => source produced no result. test config.qtbase_gui.libraries.x11sm FAILED looking for library xcb_xinput Trying source 0 (type pkgConfig) of library xcb_xinput ... + PKG_CONFIG_SYSROOT_DIR=/home/simon/a_Bone_Str/sysroot PKG_CONFIG_LIBDIR=/home/simon/a_Bone_Str/sysroot/usr/lib/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/share/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors xcb-xinput '>=' 1.12 pkg-config did not find package. => source produced no result. Trying source 1 (type inline) of library xcb_xinput ... xcb/xinput.h not found in [] and global paths. => source produced no result. test config.qtbase_gui.libraries.xcb_xinput FAILED looking for library xcb_xkb Trying source 0 (type pkgConfig) of library xcb_xkb ... + PKG_CONFIG_SYSROOT_DIR=/home/simon/a_Bone_Str/sysroot PKG_CONFIG_LIBDIR=/home/simon/a_Bone_Str/sysroot/usr/lib/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/share/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors xcb-xkb '>=' 1.10 pkg-config did not find package. => source produced no result. test config.qtbase_gui.libraries.xcb_xkb succeeded looking for library xkbcommon_x11 Trying source 0 (type pkgConfig) of library xkbcommon_x11 ... + PKG_CONFIG_SYSROOT_DIR=/home/simon/a_Bone_Str/sysroot PKG_CONFIG_LIBDIR=/home/simon/a_Bone_Str/sysroot/usr/lib/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/share/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors xkbcommon-x11 pkg-config did not find package. => source produced no result. Trying source 1 (type inline) of library db2 ... sqlcli.h not found in [] and global paths. sqlcli1.h not found in [] and global paths. => source produced no result. > /home/simon/a_Bone_Str/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/simon/a_Bone_Str/sysroot --sysroot=/home/simon/a_Bone_Str/sysroot -Wl,-O1 -Wl,-rpath-link,/home/simon/a_Bone_Str/sysroot/lib -o ibase main.o -lgds -lrt -lpthread -ldl -Wl,-rpath-link,/home/simon/a_Bone_Str/sysroot/usr/lib/arm-linux-gnueabihf > /home/simon/a_Bone_Str/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lgds > collect2: error: ld returned 1 exit status > Makefile:67: recipe for target 'ibase' failed > make: *** [ibase] Error 1 => source failed verification. test config.qtbase_sqldrivers.libraries.ibase FAILED looking for library mysql Trying source 0 (type mysqlConfig) of library mysql ... mysql_config not found. => source produced no result. Trying source 1 (type mysqlConfig) of library mysql ... mysql_config not found. => source produced no result. Trying source 2 (type mysqlConfig) of library mysql ... mysql_config not found. => source produced no result. Trying source 3 (type mysqlConfig) of library mysql ... mysql_config not found. => source produced no result. Trying source 4 (type inline) of library mysql ... mysql.h not found in [] and global paths. => source produced no result. Trying source 5 (type inline) of library mysql ... => source failed condition 'config.win32'. Trying source 6 (type inline) of library mysql ... mysql.h not found in [] and global paths. => source produced no result. test config.qtbase_sqldrivers.libraries.mysql FAILED looking for library oci Trying source 0 (type inline) of library oci ... => source failed condition 'config.win32'. Trying source 1 (type inline) of library oci ... oci.h not found in [] and global paths. => source produced no result. test config.qtbase_sqldrivers.libraries.oci FAILED looking for library odbc > main.cpp:2:10: fatal error: windows.h: No such file or directory > #include <windows.h> > ^~~~~~~~~~~ > compilation terminated. > Makefile:177: recipe for target 'main.o' failed > make: *** [main.o] Error 1 test config.qtserialport_serialport.tests.ntddmodm FAILED executing config test socketcan Trying source 1 (type inline) of library jasper ... jasper/jasper.h not found in [] and global paths. => source produced no result. Trying source 0 (type pkgConfig) of library mng ... + PKG_CONFIG_SYSROOT_DIR=/home/simon/a_Bone_Str/sysroot PKG_CONFIG_LIBDIR=/home/simon/a_Bone_Str/sysroot/usr/lib/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/share/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors libmng pkg-config did not find package. => source produced no result. + PKG_CONFIG_SYSROOT_DIR=/home/simon/a_Bone_Str/sysroot PKG_CONFIG_LIBDIR=/home/simon/a_Bone_Str/sysroot/usr/lib/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/share/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors libwebp libwebpmux libwebpdemux pkg-config did not find package. => source produced no result. Trying source 1 (type inline) of library webp ... webp/decode.h not found in [] and global paths. webp/encode.h not found in [] and global paths. webp/demux.h not found in [] and global paths. webp/mux.h not found in [] and global paths. => source produced no result. executing config test pointer_32bit > ^~~~~~~ > compilation terminated. > Makefile:177: recipe for target 'main.o' failed > make: *** [main.o] Error 1 => source failed verification. test config.qtgamepad_gamepad.libraries.sdl2 FAILED looking for library assimp => source produced no result. test config.qtsensors_sensors.libraries.sensorfw FAILED > main.cpp:2:10: fatal error: flite/flite.h: No such file or directory > #include <flite/flite.h> > ^~~~~~~~~~~~~~~ > compilation terminated. > Makefile:177: recipe for target 'main.o' failed > make: *** [main.o] Error 1 => source failed verification. test config.qtspeech_tts.libraries.flite FAILED looking for library speechd Trying source 0 (type pkgConfig) of library speechd ... + PKG_CONFIG_SYSROOT_DIR=/home/simon/a_Bone_Str/sysroot PKG_CONFIG_LIBDIR=/home/simon/a_Bone_Str/sysroot/usr/lib/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/share/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors speech-dispatcher pkg-config did not find package. => source produced no result. Trying source 1 (type inline) of library speechd ... + cd /home/simon/build-bone-5/config.tests/speechd && PKG_CONFIG_SYSROOT_DIR=/home/simon/a_Bone_Str/sysroot PKG_CONFIG_LIBDIR=/home/simon/a_Bone_Str/sysroot/usr/lib/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/share/pkgconfig:/home/simon/a_Bone_Str/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /home/simon/build-bone-5/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_CFLAGS += --sysroot=/home/simon/a_Bone_Str/sysroot" "QMAKE_CXXFLAGS += --sysroot=/home/simon/a_Bone_Str/sysroot" "QMAKE_LFLAGS += --sysroot=/home/simon/a_Bone_Str/sysroot" -early "CONFIG += cross_compile" 'QMAKE_USE += speechd' 'QMAKE_LIBS_SPEECHD = -lspeechd' /home/simon/build-bone-5/config.tests/speechd + cd /home/simon/build-bone-5/config.tests/speechd && MAKEFLAGS= /usr/bin/make > /home/simon/a_Bone_Str/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb -mfloat-abi=hard --sysroot=/home/simon/a_Bone_Str/sysroot --sysroot=/home/simon/a_Bone_Str/sysroot -O2 -O3 -w -fPIC -I. -I/home/simon/a_Bone_Str/qt-everywhere-src-5.14.2/qtbase/mkspecs/devices/linux-beaglebone-g++ -o main.o main.cpp > main.cpp:2:10: fatal error: libspeechd.h: No such file or directory > #include <libspeechd.h> > ^~~~~~~~~~~~~~ > compilation terminated. > Makefile:177: recipe for target 'main.o' failed > make: *** [main.o] Error 1 => source failed verification. test config.qtspeech_tts.libraries.speechd FAILED executing config test libclang test config.qttools_qdoc.tests.libclang FAILED
Thanks
Simon
1/9