Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved ICU 58.2 cross-compilation

    Qt WebKit
    qt5.8 arm icu
    2
    4
    3150
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      SimonB last edited by A Former User

      Hi,

      I was trying to build the webkit with qt5.8 for ARM platform ( am335x ), in the latest buildroot it is an option to use the webkit along with qt5.8.

      However, this isn't the main question here. I need to build the ICU library to build qt with ICU support,
      I get this error when verifying the libraries :

      icu.o: In function `main':
      icu.cpp:(.text.startup+0x1c): undefined reference to `ucol_open_58'
      icu.cpp:(.text.startup+0x38): undefined reference to `ucol_close_58'
      

      The ucol_open and close function exiosts, but what about the _58 ?! Is that some kind of flag I need to add to my compiler while building the lib ?

      K 1 Reply Last reply Reply Quote 0
      • K
        Konstantin Tokarev @SimonB last edited by

        @SimonB I assume you see this error when running Qt's configure and icu.cpp in question is ./config.tests/unix/icu/icu.cpp

        Looks like your ICU library (for ARM) is not installed properly. Are you installing it with buildroot, or?

        S 1 Reply Last reply Reply Quote 1
        • S
          SimonB @Konstantin Tokarev last edited by SimonB

          @Konstantin-Tokarev
          Hi, I am not using buildroot for this build, I building it on the side ( host build, and target build )

          The target script looks like :

          #! /bin/sh
          
          START_DIR=$PWD
          BASE_DIR=$(pwd)
          export PATH=$PWD/toolchain/arm-cortex_a8-linux-gnueabi/bin:/$PATH
          export SYSROOT=/media/projects/sbenoit/tor019-os/toolchain/arm-cortex_a8-linux-gnueabi/arm-cortex_a8-linux-gnueabi/sysroot
          CC=arm-cortex_a8-linux-gnueabi
          INSTALL_ROOT=$SYSROOT
          #Where it will be installed
          PREFIX=$PWD/buildroot/board/tornatech/filesystem
          export ICU_BUILD_DIR=$BASE_DIR/icu58-2
          export ICU_SOURCE_DIR=$BASE_DIR/icu58-2/icu_source
          export ICU_HOST_DIR=$BASE_DIR/icu58-2/icu_host_build
          
          ### NOW THE TARGET BUILD ###
          
          cd $ICU_BUILD_DIR
          mkdir icu_target_build
          export ICU_TARGET_DIR=$BASE_DIR/icu58-2/icu_target_build
          
          #Build ICU for target
          cd $ICU_TARGET_DIR
          ICU_FLAGS="-I$ICU_SOURCE_DIR/source/common/ -I$ICU_SOURCE_DIR/source/tools/tzcode/ -O3 -fno-short-wchar -DU_USING_ICU_NAMESPACE=1 -fno-short-enums -DU_HAVE_NL_LANGINFO_CODESET=0 -D__STDC_INT64__ -DU_TIMEZONE=0 -DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_BREAK_ITERATION=1 -DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_TRANSLITERATION=0 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1"
          
          export CPPFLAGS="-I$SYSROOT/usr/include/ -I$SYSROOT/usr/include/ -I./include/ $ICU_FLAGS -pipe"
          
          export LDFLAGS="-L$SYSROOT/usr/lib/ -Wl,-dead_strip"
          
          sh $ICU_SOURCE_DIR/source/configure --host=arm-cortex_a8-linux-gnueabi -with-cross-build=$ICU_HOST_DIR --prefix=$PREFIX
          
          if ! make -j5; then
          	echo -e "${RED}Error making ICU Target ( filesystem )!${NC}"
          	exit 1
          fi
          
          if ! make install; then
          	echo -e "${RED}Error Installing ICU Target ( filesystem )!${NC}"
          	exit 1
          fi
          

          I followed a guide which build it with a static build, I changed it to shared lib but that didn't help.
          I see the QTConfig finding the libs, the libs folder is populated with :

          libicudata.so.58
          libicudata.so.58.2
          libicui18n.so
          libicui18n.so.58
          libicui18n.so.58.2
          libicuio.so
          libicuio.so.58
          libicuio.so.58.2
          libicutest.so
          libicutest.so.58
          libicutest.so.58.2
          libicutu.so
          libicutu.so.58
          libicutu.so.58.2
          libicuuc.so
          libicuuc.so.58
          libicuuc.so.58.2
          

          and all the other libs ...

          I don't really understand why it tries to get the function ucol_open with the _58 at the end, this function is made with the shared library ?

          I am not using buildroot, because we are using a unsupported kernel version, and I didn't want to bump the buildroot and mess up all the build.
          So, on the side I am building qt5.8 with toolkit, with the kernel 4.1 and the beaglebone package to analyse how ICU is compiled . I hope I'll find a the magic flag/answer soon :P

          1 Reply Last reply Reply Quote 0
          • S
            SimonB last edited by

            I got it to work by changing 2 things

            export CPPFLAGS="-Os"
            
            

            And by removing the prefix in the configure, and installing it twice ( one in the sysroot of the toolchain ) and the other in the filesystem for the target

            sh $ICU_SOURCE_DIR/source/configure --host=arm-cortex_a8-linux-gnueabi -with-cross-build=$ICU_HOST_DIR --prefix=""
            
            if ! make -j5 DESTDIR=$SYSROOT install; then
            	echo -e "${RED}Error making ICU Target ( sysroot )!${NC}"
            	exit 1
            fi
            
            if ! make -j5 DESTDIR=$PREFIX install; then
            	echo -e "${RED}Error Installing ICU Target ( filesystem )!${NC}"
            	exit 1
            fi
            
            1 Reply Last reply Reply Quote 1
            • First post
              Last post