[Solved] Qt 5.4.1 for AM335x



  • Hello,

    I'm currently attempting to build Qt 5.4.1 for our AM3352 platform. We currently have Qt4.8 working and I'm looking to move to the latest Qt so I can use extra features like QJSON, etc.

    Anyways, when I compile I get the following errors:

    qimage.cpp:(.text+0x40f0): undefined reference to qt_memfill32(unsigned int*, unsigned int, int)' qimage.cpp:(.text+0x4250): undefined reference toqt_memfill32(unsigned int*, unsigned int, int)'
    .obj/qimage_conversions.o: In function qInitImageConversions()': qimage_conversions.cpp:(.text+0x35a0): undefined reference toconvert_RGB888_to_RGB32_neon(QImageData*, QImageData const*, QFlagsQt::ImageConversionFlag)'
    .obj/qdrawhelper.o: In function qt_rectfill_argb32(QRasterBuffer*, int, int, int, int, unsigned int)': qdrawhelper.cpp:(.text+0x6568): undefined reference toqt_memfill32(unsigned int*, unsigned int, int)'
    qdrawhelper.cpp:(.text+0x6582): undefined reference to qt_memfill32(unsigned int*, unsigned int, int)' .obj/qdrawhelper.o: In functionrasterop_solid_NotSource(unsigned int*, int, unsigned int, unsigned int)':
    qdrawhelper.cpp:(.text+0x6594): undefined reference to qt_memfill32(unsigned int*, unsigned int, int)' .obj/qdrawhelper.o: In functioncomp_func_solid_Source(unsigned int*, int, unsigned int, unsigned int)':
    qdrawhelper.cpp:(.text+0x6732): undefined reference to qt_memfill32(unsigned int*, unsigned int, int)' .obj/qdrawhelper.o: In functioncomp_func_Clear(unsigned int*, unsigned int const*, int, unsigned int)':
    qdrawhelper.cpp:(.text+0x6886): undefined reference to qt_memfill32(unsigned int*, unsigned int, int)' .obj/qdrawhelper.o:qdrawhelper.cpp:(.text+0x69da): more undefined references toqt_memfill32(unsigned int*, unsigned int, int)' follow
    .obj/qdrawhelper.o: In function qInitDrawhelperAsm()': qdrawhelper.cpp:(.text+0x1b04c): undefined reference toqt_blend_rgb32_on_rgb32_neon(unsigned char*, int, unsigned char const*, int, int, int, int)'
    qdrawhelper.cpp:(.text+0x1b054): undefined reference to qt_blend_argb32_on_rgb16_neon(unsigned char*, int, unsigned char const*, int, int, int, int)' qdrawhelper.cpp:(.text+0x1b058): undefined reference toqt_blend_argb32_on_argb32_neon(unsigned char*, int, unsigned char const*, int, int, int, int)'
    qdrawhelper.cpp:(.text+0x1b05c): undefined reference to qt_blend_rgb16_on_argb32_neon(unsigned char*, int, unsigned char const*, int, int, int, int)' qdrawhelper.cpp:(.text+0x1b060): undefined reference toqt_blend_rgb16_on_rgb16_neon(unsigned char*, int, unsigned char const*, int, int, int, int)'
    qdrawhelper.cpp:(.text+0x1b064): undefined reference to qt_scale_image_argb32_on_rgb16_neon(unsigned char*, int, unsigned char const*, int, int, QRectF const&, QRectF const&, QRect const&, int)' qdrawhelper.cpp:(.text+0x1b06c): undefined reference toqt_scale_image_rgb16_on_rgb16_neon(unsigned char*, int, unsigned char const*, int, int, QRectF const&, QRectF const&, QRect const&, int)'
    qdrawhelper.cpp:(.text+0x1b078): undefined reference to qt_transform_image_argb32_on_rgb16_neon(unsigned char*, int, unsigned char const*, int, QRectF const&, QRectF const&, QRect const&, QTransform const&, int)' qdrawhelper.cpp:(.text+0x1b080): undefined reference toqt_transform_image_rgb16_on_rgb16_neon(unsigned char*, int, unsigned char const*, int, QRectF const&, QRectF const&, QRect const&, QTransform const&, int)'
    qdrawhelper.cpp:(.text+0x1b084): undefined reference to qt_alphamapblit_quint16_neon(QRasterBuffer*, int, int, unsigned int, unsigned char const*, int, int, int, QClipData const*)' qdrawhelper.cpp:(.text+0x1b088): undefined reference toqt_blend_argb32_on_argb32_scanline_neon(unsigned int*, unsigned int const*, int, unsigned int)'
    qdrawhelper.cpp:(.text+0x1b08c): undefined reference to comp_func_solid_SourceOver_neon(unsigned int*, int, unsigned int, unsigned int)' qdrawhelper.cpp:(.text+0x1b090): undefined reference tocomp_func_Plus_neon(unsigned int*, unsigned int const*, int, unsigned int)'
    qdrawhelper.cpp:(.text+0x1b094): undefined reference to qt_destFetchRGB16_neon(unsigned int*, QRasterBuffer*, int, int, int)' qdrawhelper.cpp:(.text+0x1b098): undefined reference toqt_destStoreRGB16_neon(QRasterBuffer*, int, int, unsigned int const*, int)'
    qdrawhelper.cpp:(.text+0x1b0a0): undefined reference to qt_memrotate90_16_neon(unsigned char const*, int, int, int, unsigned char*, int)' qdrawhelper.cpp:(.text+0x1b0a4): undefined reference toqt_memrotate270_16_neon(unsigned char const*, int, int, int, unsigned char*, int)'
    qdrawhelper.cpp:(.text+0x1b0a8): undefined reference to `qt_fetch_radial_gradient_neon(unsigned int*, Operator const*, QSpanData const*, int, int, int)'
    collect2: ld returned 1 exit status
    make[3]: *** [../../lib/libQt5Gui.so.5.4.1] Error 1

    I have looked up some solutions here and have added the neon entry into my qmodule.pri file in mkspecs but I am still getting this error.

    Does anyone have any advice?

    Here is my configuration:

    ./configure -v
    -release
    -opensource
    -confirm-license
    -prefix /usr
    -device-option CROSS_COMPILE=$ARM_TOOLS_PATH/$TARGET-
    -xplatform $QTMKSPECDIR
    -make libs
    -no-pch
    -nomake examples
    -nomake tests
    -no-accessibility
    -no-opengl
    -no-kms
    -no-compile-examples

    Thanks


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What cross-compiler are you using ?

    What mkspec is it ?



  • Hello!

    Thanks the reply and the welcome, I'm fairly new to Qt development (around 1 year).

    I am cross compiling using arm-linux-gnueabi, specificially gcc and g++.

    Mkspec is linux-am335x-g++

    Here's a copy of my mkspec:

    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)

    #clearly define which compiler we are using
    QMAKE_CC = $TARGET-gcc
    QMAKE_CXX = $TARGET-g++
    QMAKE_LINK = $TARGET-g++
    QMAKE_LINK_SHLIB = $TARGET-g++
    QMAKE_AR = $ARM_TOOLS_PATH/$TARGET-ar cqs
    QMAKE_OBJCOPY = $ARM_TOOLS_PATH/$TARGET-objcopy
    QMAKE_STRIP = $ARM_TOOLS_PATH/$TARGET-strip

    #tunes the application for this architecture and floating point unit
    QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
    QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp

    #points the QT cross-compile to the correct libraries
    QMAKE_INCDIR = $ROOTFS_PATH/usr/include
    QMAKE_LIBDIR = $ROOTFS_PATH/usr/lib

    #to make AT projects compile correctly by dereferencing this project
    QMAKE_INCDIR_QT = $ROOTFS_PATH/usr/include
    QMAKE_LIBDIR_QT = $ROOTFS_PATH/usr/lib
    QMAKE_LFLAGS += -Wl,--rpath=$ROOTFS_PATH/usr/lib -Wl,--rpath=$ROOTFS_PATH/lib -lgthread-2.0 -lglib-2.0 -lz

    #QMAKE_LFLAGS += --verbose -Wl,--verbose=10

    load(qt_config)

    Sorry if I misunderstood any of your questions, if I did just let me know and I'll do my best to get the correct information.

    Thanks again!


  • Lifetime Qt Champion

    What is the value of $TARGET ?



  • The value of $TARGET is arm-linux-gnueabi


  • Lifetime Qt Champion

    And the value of $QTMKSPECDIR ?



  • The value of $QTMKSPECDIR is linux-am335x-g++


  • Lifetime Qt Champion

    IIRC, you should rather set the common C and CXX flags in QMAKE_CFLAGS and QMAKE_CXXFLAGS rather than in the release configuration only.

    Something like:

    COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
    QMAKE_CFLAGS += $${COMPILER_FLAGS}
    QMAKE_CXXFLAGS += $${COMPILER_FLAGS}
    QMAKE_CFLAGS_RELEASE += -O3
    


  • Thanks SGaist,

    I'm going to try compiling this with the changes now.

    Hopefully this fixes it.



  • @SGaist said:

    IIRC, you should rather set the common C and CXX flags in QMAKE_CFLAGS and QMAKE_CXXFLAGS rather than in the release configuration only.

    Something like:

    COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
    QMAKE_CFLAGS += $${COMPILER_FLAGS}
    QMAKE_CXXFLAGS += $${COMPILER_FLAGS}
    QMAKE_CFLAGS_RELEASE += -O3
    

    This worked!

    Thank you very much!!


  • Lifetime Qt Champion

    You're welcome !

    Don't forget to mark the thread as solved (in the Topic Tools Button)

    Happy coding !



  • @SGaist Hmm... it just has delete topic as an option?


  • Lifetime Qt Champion

    Strange, you should contact @tekojo about that


  • administrators

    Strange, OP should have Mark as solved as an option. I'll take a look.


  • administrators

    Figured it out.
    The 'mark as solved' option is there for people with admin rights, as the functionality relies on the admin 'rename post' function.

    For a thread OP to mark a post, he/she needs to add [solved] to the title.

    I'll take a look at the plugin that adds the thread tool option to see if it could work with normal OP rights too.


Log in to reply
 

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