Menu

#370 today's git sources (3.1.2-52) qt5 build fails on linking

All platforms
open
nobody
None
5
2017-09-09
2016-04-09
No

Discussion

  • Starikov Sergey

    Starikov Sergey - 2017-03-11

    For now (today) qt5 build fails with the following error message:

    In file included from /var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/cr3qt/src/bookmarklistdlg.h:4:0,
    from /var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/cr3qt/src/bookmarklistdlg.cpp:1:
    /usr/include/qt5/QtCore/qglobal.h:1087:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough)."
    # error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\ ^
    In file included from /var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/cr3qt/src/aboutdlg.h:4:0,
    from /var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/cr3qt/src/aboutdlg.cpp:1:
    /usr/include/qt5/QtCore/qglobal.h:1087:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough)."
    # error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\ ^

    Similiar build failure known for dev-db/tora. Suggested workaround:

    update: sed'ing -ggdb3 to -ggdb3 -fPIC in CMakeLists.txt fixed the problem.

    And right solution:

    // although, it will be nicer, if your buildsystem inherited system's C{,XX}FLAGS (that set in the environment)

     

Log in to post a comment.