What is mkspecs used for & how to configure for my hardware
-
Never mind about the -std flag. I see "-std=gnu++11".
cdefs.h shouldn't be missing due to being a 32 bit compiler. The version I have comes from a glibc-headers x86_64 package. Can you find a copy of the file in the sysroot, and is that location in the include path passed to the compiler with -I?
-
the error log says it's unable to determine my target architecture and also something about c++11. Do I need to amend my qmake.conf file to do something about these 2 parameters mentioned above?
For the sysroot, i'm only able to locate rootfs in my SDK itself. Would it be ok to use the rootfs path in my configure line?
-
-I, as in
-I../../../mkspecs/devices/linux-arm-hi3536-g++
, specifies an include path to search.@jeremy_k I see. Actually I went to study my CC directory again installed in /opt/ and managed to locate the missing files as mentioned above.
(1) I therefore amended my qmake.conf paths to the following directories:
----------- qmake.conf --------------------------------------------------------------------------------------------------------
QMAKE_INCDIR += /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/include
QMAKE_LIBDIR += /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/lib
QMAKE_LIBDIR += /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/lib-------------------------------------------------------------------------------------------------------------------------------
(2) My configure script are as follows
---- configure script ----------------------------------------------------------------------------------------------------------------------
./configure -confirm-license -release -eglfs -v -static -device linux-arm-hi3536-g++ -device-option CROSS_COMPILE=/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux- -sysroot /home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single -prefix /home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single/home/aa/Hi3536_SDK_V2.0.4.0/v1_QtEmbedded_5.7
--------------------------------------------------------------------------------------------------------------------------------------
(3) I proceed to build my Qt 5.7 sources again with the configure script above and the errors reduced drastically to only about a page's worth of errors:
-------Build error messages from terminal -------------------------------------------------------------------------------------
a@aa:~/Hi3536_SDK_V2.0.4.0/qt-everywhere-enterprise-src-5.7.0/qtbase$ ./build5.7_22-SEPT-16.sh
This is the Qt Device Creation Edition.DEFAULT_INCDIRS="/opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/include/c++/4.8.3
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/include/c++/4.8.3/arm-hisiv400-linux-gnueabi
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/include/c++/4.8.3/backward
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/include
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/include-fixed
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/include
"
DEFAULT_LIBDIRS="/opt/hisi-linux/x86-arm/arm-hisiv400-linux/lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/lib/gcc
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/lib
/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single/lib
/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single/usr/lib
"
Creating qmake...
make: Nothing to be done for 'first'.
Running configuration tests...
Determining architecture... ()
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux-g++ -c -pipe -mfloat-abi=hard --sysroot=/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single -g -Wall -W -fPIC -I. -isystem /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/include -I../../mkspecs/devices/linux-arm-hi3536-g++ -o arch.o arch.cpp
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux-g++ -mfloat-abi=hard -o arch arch.o -L/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/lib -L/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/lib -lrt --sysroot=/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find crt1.o: No such file or directory
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
Makefile:91: recipe for target 'arch' failed
make: *** [arch] Error 1
Unable to determine architecture!Could not determine the target architecture!
Turn on verbose messaging (-v) to see the final report.
Determining architecture... ()
g++ -c -pipe -g -Wall -W -fPIC -I. -I../../mkspecs/linux-g++ -o arch.o arch.cpp
g++ -o arch arch.o
Found architecture in binary
CFG_HOST_ARCH="x86_64"
CFG_HOST_CPUFEATURES=" mmx sse sse2"
System architecture: 'unknown'
Host architecture: 'x86_64'
Precompiled-headers support enabled.
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux-g++ -c -fvisibility=hidden fvisibility.c
Symbol visibility control enabled.
collect2: fatal error: cannot find 'ld'
compilation terminated.
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux-g++ --sysroot=/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
#error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
^
Symbolic function binding disabled.
checking for C++11...
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux-g++ -c -pipe -mfloat-abi=hard --sysroot=/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single -O2 -std=gnu++11 -Wall -W -fPIC -I. -isystem /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/include -I../../../mkspecs/devices/linux-arm-hi3536-g++ -o c++11.o c++11.cpp
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux-g++ -mfloat-abi=hard -Wl,-O1 -o c++11 c++11.o -L/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/lib -L/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/lib -lrt --sysroot=/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find crt1.o: No such file or directory
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
Makefile:91: recipe for target 'c++11' failed
make: *** [c++11] Error 1
C++11 disabled.
ERROR: Qt requires a C++11 compiler and yours does not seem to be that.
Please upgrade.----------------------------------------------------------------------------------------------------------------------------------------
(4) Would you be able to provide some advice from here? I believe i'm pretty close to closing the errors
-
What does
linux-arm-hi3536-g++ --version
return ? -
@SGaist [linux-arm-hi3536-g++] is the folder I created in Qt, the compiler is arm-hisiv400-linux-g++ installed in /opt/. The version is as follows:
arm-hisiv400-linux-g++ (Hisilicon_v400) 4.8.3 20131202 (prerelease)
Copyright (C) 2013 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. -
Can you take a look in your cross-compiler folder and search for where crti.o is ?
-
Where is that file located ?
-
Strange path...
You can add it to your configure line with
-L /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/lib
-
Strange path...
You can add it to your configure line with
-L /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/lib
@SGaist actually from the error log above, this path is already included inside but i'm not sure why during the search (in the following command lines) that particular path containing the 2 object files are not searched:
-L/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/lib -L/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/lib -lrt --sysroot=/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find crt1.o: No such file or directory /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find crti.o: No such file or directory
-
Strange... Did you re-run configure ? If so, did you do it from a clean state ?
-
It's usually the sysroot that provides all the dev packages for the dependencies you might need when cross-compiling. The dependencies that are not part of the cross-toolchain that is.