[Qt 5.1] cross-compile for ARM : include errors
-
Hi everyone !
I am currently trying to cross-compile Qt 5.1 for an ARM with an angstrom distribution.
I have the tool chain in /usr/local/angstrom.I have downloaded the Qt source with the command :
@
git clone git://gitorious.org/qt/qt5.git qt5
./init-repository
@My configure command is :
@/configure -v -xplatform arm-angstrom-linux-gnueabi-g++ -opensource -nomake examples -nomake tests -release -no-cups -no-accessibility -reduce-relocations -shared -no-sm -no-nis -system-libjpeg -system-libpng -system-zlib -no-sql-ibase -plugin-sql-mysql -no-sql-odbc -plugin-sql-psql -plugin-sql-sqlite -plugin-sql-sqlite2 -no-pch -glib -no-rpath -silent -qtlibinfix "E" -directfb -tslib -linuxinput
@The configuration options seem to have changed from the 4.x, maybe I missed something ?
My qmake.conf for angstrom-arm mkspecs I write :
@#qmake configuration for building with arm-angstrom-linux-gnueabi-g++
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
QMAKE_INCREMENTAL_STYLE = sublibinclude(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)modifications to g++.conf
QMAKE_CC = arm-angstrom-linux-gnueabi-gcc
QMAKE_CXX = arm-angstrom-linux-gnueabi-g++
QMAKE_LINK = arm-angstrom-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-angstrom-linux-gnueabi-g++
QMAKE_INCDIR = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include/
QMAKE_LIBDIR = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib/modifications to linux.conf
QMAKE_AR = arm-angstrom-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-angstrom-linux-gnueabi-objcopy
QMAKE_NM = arm-angstrom-linux-gnueabi-nm -P
QMAKE_STRIP = arm-angstrom-linux-gnueabi-strip
load(qt_config)
@My output when I cross-compile it :
@
Creating qmake...
Running configuration tests...
Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set.
Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set.
Determining architecture... ()
[...]
Found architecture in binary
CFG_ARCH="arm"
CFG_CPUFEATURES=""
Determining architecture... ()
[...]
Found architecture in binary
CFG_HOST_ARCH="i386"
CFG_HOST_CPUFEATURES=""
System architecture: 'arm'
Host architecture: 'i386'
C++11 auto-detection... ()
compiling c++11.cpp
linking c++11
/usr/local/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -linuxinput
collect2: ld returned 1 exit status
make: *** [c++11] Erreur 1
C++11 disabled.
floatmath auto-detection... ()
compiling floatmath.cpp
floatmath.cpp:44: warning: unused parameter 'argc'
floatmath.cpp:44: warning: unused parameter 'argv'
linking floatmath
/usr/local/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -linuxinput
collect2: ld returned 1 exit status
make: *** [floatmath] Erreur 1
floatmath disabled.
sse2 auto-detection... ()
compiling sse2.cpp
cc1plus: error: unrecognized command line option "-msse2"
make: *** [sse2.o] Erreur 1
sse2 disabled.
sse3 auto-detection... ()
compiling sse3.cpp
cc1plus: error: unrecognized command line option "-msse3"
make: *** [sse3.o] Erreur 1
sse3 disabled.
ssse3 auto-detection... ()
compiling ssse3.cpp
cc1plus: error: unrecognized command line option "-mssse3"
make: *** [ssse3.o] Erreur 1
ssse3 disabled.
sse4_1 auto-detection... ()
compiling sse4_1.cpp
cc1plus: error: unrecognized command line option "-msse4.1"
make: *** [sse4_1.o] Erreur 1
sse4_1 disabled.
sse4_2 auto-detection... ()
compiling sse4_2.cpp
cc1plus: error: unrecognized command line option "-msse4.2"
make: *** [sse4_2.o] Erreur 1
sse4_2 disabled.
avx auto-detection... ()
compiling avx.cpp
cc1plus: error: unrecognized command line option "-mavx"
make: *** [avx.o] Erreur 1
avx disabled.
neon auto-detection... ()
compiling neon.cpp
In file included from neon.cpp:42:
/usr/local/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/include/arm_neon.h:35:2: error: #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
neon.cpp: In function 'int main(int, char**)':
neon.cpp:46: error: 'int32x4_t' was not declared in this scope
neon.cpp:46: error: expected `;' before 'null'
neon.cpp:49: error: 'null' was not declared in this scope
neon.cpp:49: error: 'vst1q_lane_s32' was not declared in this scope
make: *** [neon.o] Erreur 1
neon disabled.
DB2 auto-detection... ()
compiling db2.cpp
db2.cpp:42:20: error: sqlcli.h: No such file or directory
db2.cpp:43:21: error: sqlcli1.h: No such file or directory
make: *** [db2.o] Erreur 1
DB2 disabled.
MySQL (thread-safe) auto-detection... ()
compiling ../mysql/mysql.cpp
../mysql/mysql.cpp:42:19: error: mysql.h: No such file or directory
make: *** [mysql.o] Erreur 1
MySQL (thread-safe) disabled.
MySQL (thread-unsafe) auto-detection... ()
compiling mysql.cpp
mysql.cpp:42:19: error: mysql.h: No such file or directory
make: *** [mysql.o] Erreur 1
MySQL (thread-unsafe) disabled.
MySQL support cannot be enabled due to functionality tests!
@I think it a problem with the include and lib path.
So I searched and I tested by adding this line to my configure :
@
-L /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib/ -I /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include/mysql
@
And the error about "mysql.h" is not visible anymore but there is an error about glib which is the same (miss of includes). I think I did not have to add all the include paths for all the librairies I used, right ? I think I missed ont thing in the setup but what ?Thank you in advance for any help :)