Hi,
i got the following cross compiler error:
/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/include/c++/4.6.2/bits/atomic_0.h: In constructor 'constexpr std::__atomic0::__atomic_base<_PTp*>::__atomic_base(std::__atomic0::__atomic_base<_PTp*>::__return_pointer_type) [with _PTp = const int, std::__atomic0::__atomic_base<_PTp*>::__return_pointer_type = const int*]':
/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/include/c++/4.6.2/atomic:245:54: instantiated from 'constexpr std::atomic<_Tp*>::atomic(std::atomic<_Tp*>::__pointer_type) [with _Tp = const int, std::atomic<_Tp*>::__pointer_type = const int*]'
../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:261:78: instantiated from 'constexpr QBasicAtomicPointer<T>::QBasicAtomicPointer(QBasicAtomicPointer<T>::Type) [with X = const int, QBasicAtomicPointer<T>::Type = const int*]'
../../include/QtCore/../../src/corelib/thread/qatomic.h:123:89: instantiated from 'constexpr QAtomicPointer<T>::QAtomicPointer(T*) [with T = const int]'
../../include/QtCore/5.0.0/QtCore/private/../../../../../src/corelib/kernel/qobject_p.h:138:77: instantiated from here
/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/include/c++/4.6.2/bits/atomic_0.h:455:68: error: invalid conversion from 'const void*' to 'std::__atomic0::__atomic_base<const int*>::__pointer_type {aka void*}' [-fpermissive]
make[3]: *** [.obj/debug-shared/qabstractanimation.o] Error 1
make[3]: Leaving directory `/home/medec01/work/Qt5Beta/qtbase/src/corelib'
make[2]: *** [sub-corelib-make_first] Error 2
make[2]: Leaving directory `/home/medec01/work/Qt5Beta/qtbase/src'
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory `/home/medec01/work/Qt5Beta/qtbase'
make: *** [module-qtbase-make_first] Error 2
i have been using the following configure:
sudo ./configure -developer-build -opensource -confirm-license -nomake examples -nomake tests -nomake docs -nomake demos -device imx6 -device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi- -sysroot /home/medec01/work/ltib/ltib/rootfs -no-gcc-sysroot -make libs -prefix /usr/local/Trolltech/Qt5-imx6-1
and the following LTIB: L3.0.35_12.09.01_GA_source downloaded from freescale website
do any of you have any idea?
thanks in advance,
kind regards,
tim
Solved! Go to Solution.
I been using the following and it works for me.
./configure -v -opensource -confirm-license -no-pch -no-opengl -opengl es2 \
-make libs -device imx6 \
-make examples -make demos \
-device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi- \
-sysroot <rootfs> -no-gcc-sysroot \
-prefix <installdir>
qt5/qtbase/mkspecs/devices/linux-imx6-g++/qmake.conf
IMX6_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1
Makesure it correct. That selects the correct platform in EGL.
I am compiling qt5.6 for imx6qsabreauto.
I ran into same problem.
IMX6_CFLAGS = -DLINUX=1 -DEGL_API_FB=1 added this and -no-dbus in configuration made it compile but when I load this image, I am not able to run qt application. QT application throws error message that "Cannot create platform OpenGL context, neither GLX nor EGL are enabled".
Then I removed all this and done some modifications according to the errors.
After spending around 10 working day, I figured out the problem. I have done two things:
1) There was a error: "qdatastream.h must be included before any other header files which defines Status"
Add this qtextream.h and qdatastream.h(if it complaints about this file as well) in a file which has this error.
2) There were some other errors as well like "None=0 where None is not defined". For this errors just move your platform dependent X11 header files after all qt headers.
I did it in file qeglpbuffer.h and moved #include <EGL/egl.h> after all other qt header files (kept it as last include file).
That made it working :smileyhappy:
I am using yocto bitbake to build the qt5 image, how can I pass the cflags into the build?
This made it! thanks
Where you able to finish your compilation with the answer?
I got after that, but got this new error "platform not recognized"
In file included from /data/BSP/imx6/ltib1.1.0/ltib/rootfs/usr/include/EGL/eglplatform.h:38:0,
from /data/BSP/imx6/ltib1.1.0/ltib/rootfs/usr/include/EGL/egl.h:34,
from eglconvenience/qeglconvenience_p.h:49,
from eglconvenience/qeglconvenience.cpp:44:
/data/BSP/imx6/ltib1.1.0/ltib/rootfs/usr/include/EGL/eglvivante.h:246:2: error: #error "Platform not recognized"
I ran into the same problem when cross-compiling Qt 4.8.3. My workaround was to manually define what my target was:
I added the following to eglvivante.h, and it seems to be building it fine.
#define LINUX
#define EGL_API_FB // or EGL_API_DFB if using DirectFB
hope this helps.
add option "-no-c++11" will fix this issue