fatal error: unicode/uchar.h: No such file or directory



  • Hello,

    I am trying to cross compile Qt5,
    But I get errors as following:
    "fatal error: unicode/uchar.h: No such file or directory"

    The strange thing is that I've installed in host the appropriate libraries and the file exists:
    /usr/include/unicode/uchar.h

    Why can't it find it ? Is it something wrong in mkspec ?
    My mkspec is at the bottom.

    Regars,
    Ran

    ===============

    MAKEFILE_GENERATOR = UNIX
    CONFIG += incremental gdb_dwarf_index
    QMAKE_INCREMENTAL_STYLE = sublib

    include(../common/linux.conf)
    include(../common/gcc-base-unix.conf)
    include(../common/g++-unix.conf)

    QT_INSTALL_DIR = /media/sdb/qt5/qt-everywhere-opensource-src-5.1.1
    ROOTFS_PATH=/home/ubuntu/dvrrdk/DVRRDK_04.01.00.02/ti_tools/cgt_a8/arago/linux-devkit/arm-arago-linux-gnueabi
    TOOLCHAIN_PREFIX=arm-arago-linux-gnueabi

    QMAKE_INCDIR = $${ROOTFS_PATH}/usr/include $${ROOTFS_PATH}/usr/include/glib-2.0 $${ROOTFS_PATH}/usr/lib/glib-2.0/include $${ROOTFS_PATH}/usr/include/libxml2 $${ROOTFS_PATH}/usr/include/freetype2 $${ROOTFS_PATH}/usr/include/dbus-1.0 $${ROOTFS_PATH}/usr/include/dbus-1.0/dbus

    QMAKE_LIBDIR = $${ROOTFS_PATH}/usr/lib/arm-linux-gnueabi $${ROOTFS_PATH}/usr/lib

    QMAKE_INCDIR_OPENGL_ES2 = $${QT_INSTALL_DIR}/usr/include/sgx/OGLES2
    QMAKE_LIBDIR_OPENGL_ES2 = $${QT_INSTALL_DIR}/opt/gfxlibraries/gfx_rel_es6.x
    QMAKE_INCDIR_EGL = $${QMAKE_INCDIR_OPENGL_ES2}
    QMAKE_LIBDIR_EGL = $${QMAKE_LIBDIR_OPENGL_ES2}

    QMAKE_LIBS = -lxml2 -lz -lts -lasound -lfreetype -lexpat
    -lfontconfig -lpng -lpthread -Wl,-rpath-link=$${ROOTFS_PATH}/usr/lib/arm-linux-gnueabi -Wl,-rpath-link=$${ROOTFS_PATH}/usr/lib

    QMAKE_LIBS_OPENGL_ES2= -lEGL -lIMGegl -lsrv_um -lGLESv2 -lGLES_CM -lusc -Wl,-rpath-link=/media/sdb/qt5/qt-everywhere-opensource-src-5.1.1/opt/gfxlibraries/gfx_rel_es6.x -Wl,-rpath-link

    QMAKE_LIBS_EGL= $${QMAKE_LIBS_OPENGL_ES2}
    QMAKE_LIBS_THREAD = -lpthread

    QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mfpu=neon -mfloat-abi=softfp

    QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE

    QMAKE_CC = $${TOOLCHAIN_PREFIX}-gcc
    QMAKE_CXX = $${TOOLCHAIN_PREFIX}-g++
    QMAKE_LINK = $${QMAKE_CXX}
    QMAKE_LINK_SHLIB = $${QMAKE_CXX}

    QMAKE_AR = $${TOOLCHAIN_PREFIX}-ar cqs
    QMAKE_OBJCOPY = $${TOOLCHAIN_PREFIX}-objcopy
    QMAKE_STRIP = $${TOOLCHAIN_PREFIX}-strip

    load(qt_config)


  • Lifetime Qt Champion

    Hi,

    You are cross-compiling Qt and from the looks of it that path is on your host computer. That file must be findable in that ROOTFS_PATH you have in your mkspec.



  • Hi,

    I've set ROOTFS_PATH into the toolchain lib and include, but that toolchain does not contain the libraries which I've installed on the host machine (ubuntu), that should be found in /usr/lib and /usr/include.
    Should I add that folders (the strange thing is that they are host folders and not cross compiled) ?

    Thank
    Ran



  • Hi,

    on running configure, it also disables a lot of stuff becuase it can't find headers which are not specified in the qmake, but I don't understand it. they are host headers, they are not part of the cross compiled files.

    I'm struglling with it for some couple of days,

    ubuntu@ubuntu-laptop:/media/sdb/qt5/qt-everywhere-opensource-src-5.1.1$ ./configure -prefix /qt5 -release -make libs -xplatform linux-TIarmv7-g++ -opengl es2 -confirm-license -opensource -no-icu -no-xcb -no-pch -make examples -verbose >> xx
    Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set.
    Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set.
    floatmath.cpp:44:5: warning: unused parameter 'argc'
    floatmath.cpp:44:5: warning: unused parameter 'argv'
    cc1plus: error: unrecognized command line option "-msse2"
    make: *** [sse2.o] Error 1
    cc1plus: error: unrecognized command line option "-msse3"
    make: *** [sse3.o] Error 1
    cc1plus: error: unrecognized command line option "-mssse3"
    make: *** [ssse3.o] Error 1
    cc1plus: error: unrecognized command line option "-msse4.1"
    make: *** [sse4_1.o] Error 1
    cc1plus: error: unrecognized command line option "-msse4.2"
    make: *** [sse4_2.o] Error 1
    cc1plus: error: unrecognized command line option "-mavx"
    make: *** [avx.o] Error 1
    libjpeg.cpp: In function 'int main(int, char**)':
    libjpeg.cpp:51:32: warning: 'cinfo' is used uninitialized in this function
    db2.cpp:42:20: fatal error: sqlcli.h: No such file or directory
    compilation terminated.
    make: *** [db2.o] Error 1
    ibase.cpp:42:19: fatal error: ibase.h: No such file or directory
    compilation terminated.
    make: *** [ibase.o] Error 1
    /media/sdc/dvrrdk/DVRRDK_04.01.00.02/ti_tools/cgt_a8/arago/linux-devkit/bin/../lib/gcc/arm-arago-linux-gnueabi/4.5.3/../../../../arm-arago-linux-gnueabi/bin/ld: cannot find -lmysqlclient_r
    collect2: ld returned 1 exit status
    make: *** [mysql_r] Error 1
    /media/sdc/dvrrdk/DVRRDK_04.01.00.02/ti_tools/cgt_a8/arago/linux-devkit/bin/../lib/gcc/arm-arago-linux-gnueabi/4.5.3/../../../../arm-arago-linux-gnueabi/bin/ld: cannot find -lmysqlclient
    collect2: ld returned 1 exit status
    make: *** [mysql] Error 1
    oci.cpp:42:17: fatal error: oci.h: No such file or directory
    compilation terminated.
    make: *** [oci.o] Error 1
    odbc.cpp:45:17: fatal error: sql.h: No such file or directory
    compilation terminated.
    make: *** [odbc.o] Error 1
    iodbc.cpp:42:17: fatal error: sql.h: No such file or directory
    compilation terminated.
    make: *** [iodbc.o] Error 1
    /media/sdc/dvrrdk/DVRRDK_04.01.00.02/ti_tools/cgt_a8/arago/linux-devkit/bin/../lib/gcc/arm-arago-linux-gnueabi/4.5.3/../../../../arm-arago-linux-gnueabi/bin/ld: skipping incompatible /usr/lib/libpq.so when searching for -lpq
    /media/sdc/dvrrdk/DVRRDK_04.01.00.02/ti_tools/cgt_a8/arago/linux-devkit/bin/../lib/gcc/arm-arago-linux-gnueabi/4.5.3/../../../../arm-arago-linux-gnueabi/bin/ld: skipping incompatible /usr/lib/libpq.a when searching for -lpq
    /media/sdc/dvrrdk/DVRRDK_04.01.00.02/ti_tools/cgt_a8/arago/linux-devkit/bin/../lib/gcc/arm-arago-linux-gnueabi/4.5.3/../../../../arm-arago-linux-gnueabi/bin/ld: cannot find -lpq
    collect2: ld returned 1 exit status
    make: *** [psql] Error 1
    sqlite2.cpp:42:20: fatal error: sqlite.h: No such file or directory
    compilation terminated.
    make: *** [sqlite2.o] Error 1
    tds.cpp:42:22: fatal error: sybfront.h: No such file or directory
    compilation terminated.
    make: *** [tds.o] Error 1
    dbus.cpp:43:23: fatal error: dbus/dbus.h: No such file or directory
    compilation terminated.
    make: *** [dbus.o] Error 1
    In file included from /media/sdc/dvrrdk/DVRRDK_04.01.00.02/ti_tools/cgt_a8/arago/linux-devkit/arm-arago-linux-gnueabi/usr/include/glib-2.0/glib/galloca.h:34:0,
    from /media/sdc/dvrrdk/DVRRDK_04.01.00.02/ti_tools/cgt_a8/arago/linux-devkit/arm-arago-linux-gnueabi/usr/include/glib-2.0/glib.h:32,
    from glib.cpp:44:
    /media/sdc/dvrrdk/DVRRDK_04.01.00.02/ti_tools/cgt_a8/arago/linux-devkit/arm-arago-linux-gnueabi/usr/include/glib-2.0/glib/gtypes.h:34:24: fatal error: glibconfig.h: No such file or directory
    compilation terminated.
    make: *** [glib.o] Error 1
    In file included from /media/sdc/dvrrdk/DVRRDK_04.01.00.02/ti_tools/cgt_a8/arago/linux-devkit/arm-arago-linux-gnueabi/usr/include/glib-2.0/glib/galloca.h:34:0,
    from /media/sdc/dvrrdk/DVRRDK_04.01.00.02/ti_tools/cgt_a8/arago/linux-devkit/arm-arago-linux-gnueabi/usr/include/glib-2.0/glib.h:32,
    from /media/sdc/dvrrdk/DVRRDK_04.01.00.02/ti_tools/cgt_a8/arago/linux-devkit/bin/../arm-arago-linux-gnueabi/usr/include/pulse/glib-mainloop.h:26,
    from pulseaudio.cpp:43:
    /media/sdc/dvrrdk/DVRRDK_04.01.00.02/ti_tools/cgt_a8/arago/linux-devkit/arm-arago-linux-gnueabi/usr/include/glib-2.0/glib/gtypes.h:34:24: fatal error: glibconfig.h: No such file or directory
    compilation terminated.
    make: *** [pulseaudio.o] Error 1
    In file included from fontconfig.cpp:42:0:
    /media/sdc/dvrrdk/DVRRDK_04.01.00.02/ti_tools/cgt_a8/arago/linux-devkit/bin/../arm-arago-linux-gnueabi/usr/include/ft2build.h:56:38: fatal error: freetype/config/ftheader.h: No such file or directory
    compilation terminated.
    make: *** [fontconfig.o] Error 1
    Project ERROR: Package libdrm not found
    make: *** No targets specified and no makefile found. Stop.
    egl.cpp: In function 'int main(int, char**)':
    egl.cpp:46:12: warning: unused variable 'x'
    In file included from freetype.cpp:42:0:
    /media/sdc/dvrrdk/DVRRDK_04.01.00.02/ti_tools/cgt_a8/arago/linux-devkit/bin/../arm-arago-linux-gnueabi/usr/include/ft2build.h:56:38: fatal error: freetype/config/ftheader.h: No such file or directory
    compilation terminated.
    make: *** [freetype.o] Error 1
    stltest.cpp: In function 'int main()':
    stltest.cpp:146:9: warning: unused variable 'n'
    pcre.cpp:45:2: error: #error This PCRE version is not supported
    make: *** [pcre.o] Error 1
    shivavg.cpp:42:23: fatal error: vg/openvg.h: No such file or directory
    compilation terminated.
    make: *** [shivavg.o] Error 1
    alsatest.cpp:47:5: warning: unused parameter 'argc'
    alsatest.cpp:47:5: warning: unused parameter 'argv'
    hwcap_test.cpp:43:5: warning: unused parameter 'argc'
    hwcap_test.cpp:43:5: warning: unused parameter 'argv'
    ptrsizetest.cpp: In function 'int main(int, char**)':
    ptrsizetest.cpp:59:12: error: 'PointerSize' is not a member of 'QPointerSizeTest<4>'
    make: *** [ptrsizetest.o] Error 1
    ubuntu@ubuntu-laptop:/media/sdb/qt5/qt-everyw

    Regards,
    Ran


  • Moderators

    As you do cross compilation you need the mandatory libraries for your target device not the host machine!


Log in to reply
 

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