Important: Please read the Qt Code of Conduct -

ICU 58.2 cross-compilation

  • 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 ?

  • @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?

  • @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
    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
    #Where it will be installed
    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
    mkdir icu_target_build
    export ICU_TARGET_DIR=$BASE_DIR/icu58-2/icu_target_build
    #Build ICU for target
    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
    if ! make install; then
    	echo -e "${RED}Error Installing ICU Target ( filesystem )!${NC}"
    	exit 1

    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 :

    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

  • 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
    if ! make -j5 DESTDIR=$PREFIX install; then
    	echo -e "${RED}Error Installing ICU Target ( filesystem )!${NC}"
    	exit 1

Log in to reply