cross compile of qt 4.8.5 for friendlyarm tiny 6410



  • hello,can anyone tell me how to cross compile of qt 4.8.5 for friendlyarm tiny 6410??



  • 1. tslib compilation
    $cd /usr/local
    $git clone http://github.com/kergoth/tslib.git
    $export PATH=/usr/local/arm/4.3.2/bin:$PATH
    $export CROSS_COMPILE=arm-none-linux-gnueabi-
    $export CC=${CROSS_COMPILE}gcc
    $export CFLAGS=-march=armv4t
    $export CXX=${CROSS_COMPILE}"g++"
    $export AR=${CROSS_COMPILE}"ar"
    $export AS=${CROSS_COMPILE}"as"
    $export RANLIB=${CROSS_COMPILE}"ranlib"
    $export LD=${CROSS_COMPILE}"ld"
    $export STRIP=${CROSS_COMPILE}"strip"
    $export ac_cv_func_malloc_0_nonnull=yes
    $cd /usr/local/tslib
    $./autogen-clean.sh
    $./autogen.sh
    $./configure --host=arm-linux --prefix=/home/tslib --enable-shared=yes
    --enable-static=yes
    $make
    $make install

    i followed this steps for first tslib installation but when i checked file
    libts-1.0.so.0.0.0 in lib file then i got following output==>
    libts-1.0.so.0.0.0: ELF 32-bit LSB shared object, "Intel 80386", version 1
    (SYSV), dynamically linked,
    BuildID[sha1]=0xd113e8e6a6562ca3bd32f286ed9611919adc9a44, not stripped

    i want arm instead of that Intel 80386??


  • Lifetime Qt Champion

    Hi,

    Did you check the value of CC ?



  • i have checked it shows blank....



  • i have set the path
    echo $CC
    it shows0-
    arm-none-linux-gnueabi-gcc
    but issue not solved



  • ./configure --host=arm-linux --prefix=/home/tslib --enable-shared=yes --enable-static=yes
    also when i execute above command at the last line i get some sentence

    configure.ac:7: installing ./missing' plugins/Makefile.am: installing./depcomp'

    is that any error??


  • Lifetime Qt Champion

    Where did you get the instruction to cross-compile tslib ?



  • from these site and changes according to my compiler path==>

    /home/sachin/Documents/QT_net_pages/mini2440vietnam: Upgrade Qt4.6.2 in mini2440.html

    but still i have face issue not create cross compiler


  • Lifetime Qt Champion

    The question might be silly but did you install a cross-compiler before doing that ?



  • yes i have install..



  • is there any issue with configure command?

    --build xyz or
    --target xyz
    on the ./configure command instead of --host or --prefix??



  • this is single script file for tslib compilation "tslib.sh" ==>
    export CROSS_COMPILE=/home/sachin/opt/FriendlyARM/toolschain/4.5.1/bin/arm-fsl-linux-gnueabi-
    export CC=${CROSS_COMPILE}"gcc"
    export CFLAGS=-march=armv7-a
    export CXX=${CROSS_COMPILE}"g++"
    export AR=${CROSS_COMPILE}"ar"
    export AS=${CROSS_COMPILE}"as"
    export RANLIB=${CROSS_COMPILE}"ranlib"
    export LD=${CROSS_COMPILE}"ld"
    export STRIP=${CROSS_COMPILE}"strip"
    export ac_cv_func_malloc_0_nonnull=yes
    sudo ./autogen-clean.sh
    sudo ./autogen.sh
    sudo ./configure --host=arm-fsl-linux-gnueabi --build=i386-linux-gnu-- prefix=/home/tslib --enable-shared=yes --enable-static=yes
    sudo make
    sudo make install

    but not worked....


  • Lifetime Qt Champion

    What errors do you have this time ?



  • sachin@Atishay:~/Documents/tslib$ sudo ./configure
    --host=arm-fsl-linux-gnueabi --prefix=/home/tslib --enable-shared=yes
    --enable-static=yes
    [sudo] password for sachin:
    configure: WARNING: if you wanted to set the --build type, don't use
    --host.
    If a cross compiler is detected then cross compile mode will be used
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for arm-fsl-linux-gnueabi-strip... no
    checking for strip... strip
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... no
    checking for mawk... mawk
    checking whether make sets $(MAKE)... yes
    checking for arm-fsl-linux-gnueabi-gcc... no
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking how to run the C preprocessor... gcc -E
    checking whether the C compiler supports -fvisibility=hidden... yes
    checking whether to use -fvisibility=hidden... yes
    checking whether ln -s works... yes
    checking whether make sets $(MAKE)... (cached) yes
    checking build system type... i686-pc-linux-gnu
    checking host system type... arm-fsl-linux-gnueabi
    checking how to print strings... printf
    checking for a sed that does not truncate output... /bin/sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for fgrep... /bin/grep -F
    checking for ld used by gcc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... no
    checking for arm-fsl-linux-gnueabi-dumpbin... no
    checking for arm-fsl-linux-gnueabi-link... no
    checking for dumpbin... no
    checking for link... link -dump
    checking the name lister (nm) interface... BSD nm
    checking the maximum length of command line arguments... 1572864
    checking whether the shell understands some XSI constructs... yes
    checking whether the shell understands "+="... yes
    checking how to convert i686-pc-linux-gnu file names to
    arm-fsl-linux-gnueabi format... func_convert_file_noop
    checking how to convert i686-pc-linux-gnu file names to toolchain format...
    func_convert_file_noop
    checking for /usr/bin/ld option to reload object files... -r
    checking for arm-fsl-linux-gnueabi-objdump... no
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for arm-fsl-linux-gnueabi-dlltool... no
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for arm-fsl-linux-gnueabi-ar... no
    checking for ar... ar
    checking for archiver @FILE support... @
    checking for arm-fsl-linux-gnueabi-strip... strip
    checking for arm-fsl-linux-gnueabi-ranlib... no
    checking for ranlib... ranlib
    checking command to parse nm output from gcc object... ok
    checking for sysroot... no
    checking for arm-fsl-linux-gnueabi-mt... no
    checking for mt... mt
    checking if mt is a manifest tool... no
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works... yes
    checking if gcc static flag -static works... yes
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/usr/bin/ld) supports shared libraries...
    yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking for shl_load... no
    checking for shl_load in -ldld... no
    checking for dlopen... no
    checking for dlopen in -ldl... yes
    checking whether a program can dlopen itself... yes
    checking whether a statically linked program can dlopen itself... no
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    checking for dlopen in -ldl... (cached) yes
    checking for size_t... yes
    checking for working alloca.h... yes
    checking for alloca... yes
    checking for ANSI C header files... (cached) yes
    checking fcntl.h usability... yes
    checking fcntl.h presence... yes
    checking for fcntl.h... yes
    checking limits.h usability... yes
    checking limits.h presence... yes
    checking for limits.h... yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking sys/ioctl.h usability... yes
    checking sys/ioctl.h presence... yes
    checking for sys/ioctl.h... yes
    checking sys/time.h usability... yes
    checking sys/time.h presence... yes
    checking for sys/time.h... yes
    checking for unistd.h... (cached) yes
    checking for an ANSI C-conforming const... yes
    checking for inline... inline
    checking for size_t... (cached) yes
    checking whether time.h and sys/time.h may both be included... yes
    checking whether gcc needs -traditional... no
    checking for stdlib.h... (cached) yes
    checking for unistd.h... (cached) yes
    checking for sys/param.h... yes
    checking for getpagesize... yes
    checking for working mmap... yes
    checking sys/select.h usability... yes
    checking sys/select.h presence... yes
    checking for sys/select.h... yes
    checking sys/socket.h usability... yes
    checking sys/socket.h presence... yes
    checking for sys/socket.h... yes
    checking types of arguments for select... int,fd_set *,struct timeval *
    checking return type of signal handlers... void
    checking whether lstat correctly handles trailing slash... yes
    checking whether stat accepts an empty string... no
    checking for vprintf... yes
    checking for _doprnt... no
    checking for gettimeofday... yes
    checking for memmove... yes
    checking for memset... yes
    checking for munmap... yes
    checking for select... yes
    checking for strcasecmp... yes
    checking for strchr... yes
    checking for strdup... yes
    checking for strtoul... yes
    checking whether linear module is requested... yes
    checking whether dejitter module is requested... yes
    checking whether linear-h2200 module is requested... yes
    checking whether variance module is requested... yes
    checking whether pthres module is requested... yes
    checking whether ucb1x00 module is requested... yes
    checking whether cy8mrln-palmpre module is requested... no
    checking whether corgi module is requested... yes
    checking whether collie module is requested... yes
    checking whether h3600 module is requested... yes
    checking whether mk712 module is requested... yes
    checking whether arctic2 module is requested... yes
    checking whether tatung module is requested... yes
    checking whether dmc module is requested... yes
    checking whether input module is requested... yes
    checking whether touchkit module is requested... yes
    checking whether galax module is requested... yes
    checking where to place modules... ${libdir}/ts
    checking whether to enable debugging... no
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating etc/Makefile
    config.status: creating plugins/Makefile
    config.status: creating src/Makefile
    config.status: creating tests/Makefile
    config.status: creating tslib.pc
    config.status: creating tslib-1.0.pc
    config.status: creating config.h
    config.status: config.h is unchanged
    config.status: executing depfiles commands
    config.status: executing libtool commands

    ranlib,cc,gcc,ld etc value are not taking...i m confused with above output...
    above ./configure command is executed succesfully without any error but
    when i checked cd /home/tslib/lib in that libts file....and i run the
    following command to check cross compiler is created or not...

    file libts

    it shows only "intel" and i want "arm" instead of these.



  • Hi,

    Topic title says that you want to cross compile Qt 4.8.5 but the post contains cross compilation of tslib.

    What you actually want to do?

    --Kumara



  • hello,for cross compile Qt 4.8.5 i have to follow following steps=>

    1. tslib compilation
    2. Qt4.8.5 compilation
    3. Copy library of tslib and Qt4.8.5 into mini6410 board.
    4. Configure the environment in mini6410 board.
    5. Run Qt example program.

    in this my first step is tslib compilation and not compiled..


  • Moderators

    @sachin786 What error messages do you get if you try to compile tslib?



  • sachin@Atishay:~/Documents/tslib$ sudo ./configure
    --host=arm-fsl-linux-gnueabi --prefix=/home/tslib --enable-shared=yes
    --enable-static=yes
    [sudo] password for sachin:
    configure: WARNING: if you wanted to set the --build type, don't use
    --host.
    If a cross compiler is detected then cross compile mode will be used
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for arm-fsl-linux-gnueabi-strip... no
    checking for strip... strip
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... no
    checking for mawk... mawk
    checking whether make sets $(MAKE)... yes
    checking for arm-fsl-linux-gnueabi-gcc... no
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking how to run the C preprocessor... gcc -E
    checking whether the C compiler supports -fvisibility=hidden... yes
    checking whether to use -fvisibility=hidden... yes
    checking whether ln -s works... yes
    checking whether make sets $(MAKE)... (cached) yes
    checking build system type... i686-pc-linux-gnu
    checking host system type... arm-fsl-linux-gnueabi
    checking how to print strings... printf
    checking for a sed that does not truncate output... /bin/sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for fgrep... /bin/grep -F
    checking for ld used by gcc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... no
    checking for arm-fsl-linux-gnueabi-dumpbin... no
    checking for arm-fsl-linux-gnueabi-link... no
    checking for dumpbin... no
    checking for link... link -dump
    checking the name lister (nm) interface... BSD nm
    checking the maximum length of command line arguments... 1572864
    checking whether the shell understands some XSI constructs... yes
    checking whether the shell understands "+="... yes
    checking how to convert i686-pc-linux-gnu file names to
    arm-fsl-linux-gnueabi format... func_convert_file_noop
    checking how to convert i686-pc-linux-gnu file names to toolchain format...
    func_convert_file_noop
    checking for /usr/bin/ld option to reload object files... -r
    checking for arm-fsl-linux-gnueabi-objdump... no
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for arm-fsl-linux-gnueabi-dlltool... no
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for arm-fsl-linux-gnueabi-ar... no
    checking for ar... ar
    checking for archiver @FILE support... @
    checking for arm-fsl-linux-gnueabi-strip... strip
    checking for arm-fsl-linux-gnueabi-ranlib... no
    checking for ranlib... ranlib
    checking command to parse nm output from gcc object... ok
    checking for sysroot... no
    checking for arm-fsl-linux-gnueabi-mt... no
    checking for mt... mt
    checking if mt is a manifest tool... no
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works... yes
    checking if gcc static flag -static works... yes
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/usr/bin/ld) supports shared libraries...
    yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking for shl_load... no
    checking for shl_load in -ldld... no
    checking for dlopen... no
    checking for dlopen in -ldl... yes
    checking whether a program can dlopen itself... yes
    checking whether a statically linked program can dlopen itself... no
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    checking for dlopen in -ldl... (cached) yes
    checking for size_t... yes
    checking for working alloca.h... yes
    checking for alloca... yes
    checking for ANSI C header files... (cached) yes
    checking fcntl.h usability... yes
    checking fcntl.h presence... yes
    checking for fcntl.h... yes
    checking limits.h usability... yes
    checking limits.h presence... yes
    checking for limits.h... yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking sys/ioctl.h usability... yes
    checking sys/ioctl.h presence... yes
    checking for sys/ioctl.h... yes
    checking sys/time.h usability... yes
    checking sys/time.h presence... yes
    checking for sys/time.h... yes
    checking for unistd.h... (cached) yes
    checking for an ANSI C-conforming const... yes
    checking for inline... inline
    checking for size_t... (cached) yes
    checking whether time.h and sys/time.h may both be included... yes
    checking whether gcc needs -traditional... no
    checking for stdlib.h... (cached) yes
    checking for unistd.h... (cached) yes
    checking for sys/param.h... yes
    checking for getpagesize... yes
    checking for working mmap... yes
    checking sys/select.h usability... yes
    checking sys/select.h presence... yes
    checking for sys/select.h... yes
    checking sys/socket.h usability... yes
    checking sys/socket.h presence... yes
    checking for sys/socket.h... yes
    checking types of arguments for select... int,fd_set *,struct timeval *
    checking return type of signal handlers... void
    checking whether lstat correctly handles trailing slash... yes
    checking whether stat accepts an empty string... no
    checking for vprintf... yes
    checking for _doprnt... no
    checking for gettimeofday... yes
    checking for memmove... yes
    checking for memset... yes
    checking for munmap... yes
    checking for select... yes
    checking for strcasecmp... yes
    checking for strchr... yes
    checking for strdup... yes
    checking for strtoul... yes
    checking whether linear module is requested... yes
    checking whether dejitter module is requested... yes
    checking whether linear-h2200 module is requested... yes
    checking whether variance module is requested... yes
    checking whether pthres module is requested... yes
    checking whether ucb1x00 module is requested... yes
    checking whether cy8mrln-palmpre module is requested... no
    checking whether corgi module is requested... yes
    checking whether collie module is requested... yes
    checking whether h3600 module is requested... yes
    checking whether mk712 module is requested... yes
    checking whether arctic2 module is requested... yes
    checking whether tatung module is requested... yes
    checking whether dmc module is requested... yes
    checking whether input module is requested... yes
    checking whether touchkit module is requested... yes
    checking whether galax module is requested... yes
    checking where to place modules... ${libdir}/ts
    checking whether to enable debugging... no
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating etc/Makefile
    config.status: creating plugins/Makefile
    config.status: creating src/Makefile
    config.status: creating tests/Makefile
    config.status: creating tslib.pc
    config.status: creating tslib-1.0.pc
    config.status: creating config.h
    config.status: config.h is unchanged
    config.status: executing depfiles commands
    config.status: executing libtool commands

    ranlib,cc,gcc,ld etc value are not taking...i m confused with above output...
    above ./configure command is executed succesfully without any error but
    when i checked cd /home/tslib/lib in that libts file....and i run the
    following command to check cross compiler is created or not...

    file libts

    it shows only "intel" and i want "arm" instead of these.


  • Lifetime Qt Champion

    Can you call arm-fsl-linux-gnueabi-gcc -v from your terminal ?

    Also, don't do development or compilation as root.


  • Moderators

    Take a look at the beginning of the output:
    "configure: WARNING: if you wanted to set the --build type, don't use --host."
    I'm not an expert in cross compilation, but it looks like you should use --build and not --host



  • @SGaist
    arm-fsl-linux-gnueabi-gcc -v if i execute this command i got followinf output=>

    bash: /home/sachin/Documents/ARM_CROSS_COMPILER/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-gcc: Permission denied



  • @SGaist
    Yes i have working for cross compilation as a normal user only.....but is i got some error like permission denied then i used sudo infront of that command only.


  • Lifetime Qt Champion

    Permission denied ? What are the permissions on that file ?



  • @SGaist
    sachin@Atishay:~/Documents/ARM_CROSS_COMPILER/fsl-linaro-toolchain/bin$
    ** ls -l arm-fsl-linux-gnueabi-gcc -v**
    -rw------- 1 sachin sachin 307144 Sep 3 13:29 arm-fsl-linux-gnueabi-gcc
    i have change the permission now chmod 777 arm-fsl-linux-gnueabi-gcc then got this output=>
    -rwxrwxrwx 1 sachin sachin 307144 Sep 3 13:29 arm-fsl-linux-gnueabi-gcc
    and now if i am executing this command=>
    arm-fsl-linux-gnueabi-gcc -v
    got following output==>
    sachin@Atishay:~$ arm-fsl-linux-gnueabi-gcc -v
    Using built-in specs.
    COLLECT_GCC=arm-fsl-linux-gnueabi-gcc
    Target: arm-fsl-linux-gnueabi
    Configured with: /work/build/.build/src/gcc-linaro-4.6-2011.06-0/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-fsl-linux-gnueabi --prefix=/work/fsl-linaro-toolchain-2.13 --with-sysroot=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-libs --enable-languages=c,c++ --with-pkgversion='Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --with-gmp=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-mpfr=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-mpc=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-ppl=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-cloog=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-libelf=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm -L/work/build/.build/arm-fsl-linux-gnueabi/build/static/lib -lpwl' --enable-threads=posix --enable-target-optspace --enable-plugin --enable-multilib --with-local-prefix=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-libs --disable-nls --enable-c99 --enable-long-long --with-system-zlib
    Thread model: posix
    gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20)


  • Lifetime Qt Champion

    Since the permission are now fixed, start the build again



  • same issue again it shows ** intel 80386** not build



  • @SGaist

    can i send u complete procedure for tslib compilation how i am trying to doing?



  • compiler path is ok,toolchain is ok cant get how it can be fixed


  • Lifetime Qt Champion

    What I did:

    1. clone tslib repository
    2. call autogen.sh
    3. ./configure --host=arm-linux-gnueabihf
    4. make -j9

    That's all.

    Why arm-linux-gnueabihf ? That's the tool chain I used to build Qt for the Raspberry Pi



  • @SGaist ok thanks i will try..


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.