Building qtbase, cross compiling for Banana Pro. c++1z error, configure error, and connection test error.
-
Good afternoon!
Has anyone built the qt to cross-compile for Banana PRO?
I am trying to build it now, and I have several problems.- First of all, I can't configure EGLFS. I have the error which goes like "EGLFS functionality test failed!". But maybe it is just because of the lack of libraries in the sysroot backed up on my computer.
- Secondly - I can configure it with linuxfb support, but when I type "make" I get this:
g++: error: unrecognized command line option ‘-std=c++1z’ Makefile:628: polecenia dla obiektu '.obj/qlatincodec.o' nie powiodły się make[3]: *** [.obj/qlatincodec.o] Błąd 1 make[3]: Opuszczenie katalogu '/root/banana/qt5/qtbase/src/tools/bootstrap' Makefile:91: polecenia dla obiektu 'sub-bootstrap-make_first' nie powiodły się make[2]: *** [sub-bootstrap-make_first] Błąd 2 make[2]: Opuszczenie katalogu '/root/banana/qt5/qtbase/src' Makefile:45: polecenia dla obiektu 'sub-src-make_first' nie powiodły się make[1]: *** [sub-src-make_first] Błąd 2 make[1]: Opuszczenie katalogu '/root/banana/qt5/qtbase' Makefile:72: polecenia dla obiektu 'module-qtbase-make_first' nie powiodły się make: *** [module-qtbase-make_first] Błąd 2
These parts in Polish language just mean that the commands for object xxx failed.
I made qmake configuration just by copying the qmake.conf and qplatformdefs.h from linux-beagleboard-g++ , and then I change the qmake.conf to look like this:
# # QMAKE FOR BANANA PRO - 3DKREATOR # # initial build settings MAKEFILE_GENERATOR = UNIX CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib # compiler includes include(../../common/linux.conf) include(../../common/gcc-base-unix.conf) include(../../common/g++-unix.conf) # configuration loading load(device_config) # application view platform QT_QPA_DEFAULT_PLATFORM = eglfs #EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_a20.cpp # 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 # flags for compilation COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_A$ #modifications to gcc-base.conf QMAKE_CFLAGS += $${COMPILER_FLAGS} QMAKE_CXXFLAGS += $${COMPILER_FLAGS} QMAKE_CXXFLAGS_RELEASE += -O3 QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/opt/vc/lib # continued QMAKE_LIBS += -lrt -lpthread -ldl # Extra stuff (OpenGL, DirectFB, ...) QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/opt/vc/include \ $$[QT_SYSROOT]/opt/vc/include/interface/vcos/pthreads \ $$[QT_SYSROOT]/opt/vc/include/interface/vmcs_host/linux QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2 QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL} QMAKE_LIBDIR_OPENGL_ES2 = $$[QT_SYSROOT]/opt/vc/lib QMAKE_INCDIR_OPENVG = $${QMAKE_INCDIR_EGL} QMAKE_LIBDIR_OPENVG = $${QMAKE_LIBDIR_EGL} QMAKE_LIBS_EGL = -lEGL QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $${QMAKE_LIBS_EGL} QMAKE_LIBS_OPENVG = -lEGL -lOpenVG -lGLESv2 # Backend for A20 Mali400 graphics card integration EGLFS_DEVICE_INTEGRATION = eglfs_mali # Distro options for Debian Jessie on hard float DISTRO_OPTS += deb-multi-arch DISTRO_OPTS += hard-float #PKG_config location PKG_CONFIG = $${CROSS_COMPILE}pkg-config # Sanity check deviceSanityCheckCompiler() # qt config loading load(qt_config)
I would be thankful for any suggestions and help I get from you. It's essential for me to make that working.
P.S. I have almost forgotten - the system installed on the Banana Pro is called "Bananian" and it is based on Debian 8 Jessie as well as Raspbian.
P.S.2. I use "gcc-linaro-5.1-2015.08-x86_64_arm-linux-gnueabihf" toolchain.
-
- What errors do you get before that line: "EGLFS functionality test failed!"?
- It should be -std=c++11 not -std=c++1z
-
c++1z error is the error that I actually get. From the information that I got, c++1z and c++11 are commonly used instead each other and mean the same.
I'll show you the whole ./configure process, it is posted here because it is too long for that message:
http://pastebin.com/Q7GJd3Vm -
By the way, the next problem that I have is the error "Server sent invalid f." when I try to test the connection between the Banana Pro and my computer with Debian over IP from the QT IDE. I've checked many topics, but none of these solution work. Moreover - I can't find the qtcreator-plugin-remotelinux in my repository, and I don't know if it's recommended to get raspbian, or other linux repositories just to install this plugin, especially that I don't know if it's that plugin's fault, or the fault of something different...
-
@monster Then the compiler you use is probably too old and does not support C++11.
You can check the version using g++ --version
Can you access your device using SSH?
It looks like you installed QtCreator from Debian repository, right? You can try to install it using Qt online installer to get the latest one. -
@jsulm
So you suggest that this toolchain uses c++11 standard? Or my compiler use it? I am asking, because I can do the whole process of configuration and compilation for qtbase for raspberry pi, but I can't make this working on Banana pro.I use a new linaro gcc toolchain.
What tools do I need and on which device?
Yes , I can access the device using SSH.
The qt ide on my computer is from online installer, also the whole qtbase for building with modules is downloaded from the newest directories on the qtsite.
I don't have qt ide on my embedded device, I just followed raspberry pi EGLFS guide (you can find it really easy, it's the tutorial made by QT), installed all the stuff that was needed to cross compile (libraries, etc).
One more thing - I additionaly have ia32libs installed on my computer - I wasn't able to build qtbase for embedded linux on arm without it.
-
You're trying to build with C++11 support. The compiler says it does not know anything about c++11. Which compiler version do you use (I mean the linaro compiler)? Check with PATH_TO_LINARO_G++ --version.
Regarding QtCreator: check under Help/About Plugin... whether the RemoteLinux plug-in is activated. -
gcc-linaro-5.1-2015.08-x86_64_arm-linux-gnueabihf,
and g++ version:
./arm-linux-gnueabihf-g++ --version arm-linux-gnueabihf-g++ (Linaro GCC 5.1-2015.08) 5.1.1 20150608 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
I tryed on my machine with -std=c++1z - it does not work, but -std=c++11 works (with even older g++)
-
Ok I see now, that when I configure with toolchain for armbcm from raspbian, it fails, but not because of the compiler ( make goes much further). I will search for another toolchain. I'm curious if the application made by such configured and built qtbase (with previously mentioned armbcm toolchain) will work on Banana.
Now only I have to eliminate the problem with qt ide remote connection
(error "Server sent invalid f"). If anybody knew how, it would be a blessing for me.