Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. cross platform build Qt 5.12, failed on link libQt5Core.so.5.12
Qt 6.11 is out! See what's new in the release blog

cross platform build Qt 5.12, failed on link libQt5Core.so.5.12

Scheduled Pinned Locked Moved Solved Mobile and Embedded
3 Posts 2 Posters 1.0k Views 2 Watching
  • 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.
  • A Offline
    A Offline
    alluLinger
    wrote on last edited by
    #1

    I'm trying to build qt for Jetson TX2, build failed on here

     /home/linger/crossbuild/usr/lib/aarch64-linux-gnu/libpcre.a -pthread -L/home/linger/crossbuild/usr/lib/aarch64-linux-gnu -L/home/linger/crossbuild/usr/lib -L/home/linger/crossbuild/lib/aarch64-linux-gnu
    /home/linger/crossbuild/gcc-linaro-5.5.0-2017.10-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/5.5.0/../../../../aarch64-linux-gnu/bin/ld: /home/linger/crossbuild/usr/lib/aarch64-linux-gnu/libglib-2.0.a(libglib_2_0_la-gslice.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol `__stack_chk_guard@@GLIBC_2.17' can not be used when making a shared object; recompile with -fPIC
    /home/linger/crossbuild/gcc-linaro-5.5.0-2017.10-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/5.5.0/../../../../aarch64-linux-gnu/bin/ld: /home/linger/crossbuild/usr/lib/aarch64-linux-gnu/libglib-2.0.a(libglib_2_0_la-gslice.o)(.text+0x4): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `__stack_chk_guard@@GLIBC_2.17'
    /home/linger/crossbuild/gcc-linaro-5.5.0-2017.10-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/5.5.0/../../../../aarch64-linux-gnu/bin/ld: final link failed: Bad value
    collect2: error: ld returned 1 exit status
    make[3]: *** [Makefile:1321: ../../lib/libQt5Core.so.5.12.10] Error 1
    make[3]: Leaving directory '/home/linger/crossbuild/qt-everywhere-src-5.12.10/qtbase/src/corelib'
    make[2]: *** [Makefile:226: sub-corelib-make_first] Error 2
    make[2]: Leaving directory '/home/linger/crossbuild/qt-everywhere-src-5.12.10/qtbase/src'
    make[1]: *** [Makefile:51: sub-src-make_first] Error 2
    make[1]: Leaving directory '/home/linger/crossbuild/qt-everywhere-src-5.12.10/qtbase'
    make: *** [Makefile:86: module-qtbase-make_first] Error 2
    

    libglib-2.0.a(libglib_2_0_la-gslice.o)(.text+0x4): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `__stack_chk_guard@@GLIBC_2.17'

    recording this -> https://stackoverflow.com/questions/19894541/libm-relocation-error-when-building-qt-5-for-nitrogen6x
    i try to replace libglib-2.0.so :

    ln -sf $PWD/lib/aarch64-linux-gnu/libglib-2.0.so.0.4800.2 $PWD/usr/lib/aarch64-linux-gnu/libglib-2.0.so
    

    but still failed.

    all libs and headers is sync from the em-linux.

    and configure by this:

    ./configure -shared -c++std c++14 \
     -opensource -release --confirm-license -pkg-config -shared \
     -device linux-jetson-tx1-g++ \
     -device-option CROSS_COMPILE=/home/linger/crossbuild/gcc-linaro-5.5.0-2017.10-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- \
     -sysroot /home/linger/crossbuild \
     -nomake examples -nomake tests \
     -prefix /home/linger/crossbuild/JetsonTX2/qt5 \
     -extprefix /home/linger/crossbuild/JetsonTX2/qt5 \
     -hostprefix /home/linger/crossbuild/JetsonTX2/qt5-host \
     -opengl es2 \
     -pch
    

    this result looks fine and no warning and error output.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alluLinger
      wrote on last edited by
      #2

      I cannot find the right version of libglib-2.0.a , just use -no-glib to disable it.

      re-building now everything looks fine...

      Pablo J. RoginaP 1 Reply Last reply
      0
      • A alluLinger

        I cannot find the right version of libglib-2.0.a , just use -no-glib to disable it.

        re-building now everything looks fine...

        Pablo J. RoginaP Offline
        Pablo J. RoginaP Offline
        Pablo J. Rogina
        wrote on last edited by
        #3

        @alluLinger said in cross platform build Qt 5.12, failed on link libQt5Core.so.5.12:

        now everything looks fine

        great, so please don't forget to mark your post as solved!

        Upvote the answer(s) that helped you solve the issue
        Use "Topic Tools" button to mark your post as Solved
        Add screenshots via postimage.org
        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved