ralfD wrote
> Am Mittwoch, 01. März 2017 02:11 CET, MLutz <

> markus@

> > schrieb: 
>  
>> Thank you very much for all the help.
>> It finally worked, as soon as I deleted the "-fPIE" from line 163 of
>> CMakeLists.txt.
>> All other tries were in vain ...
> 
> Are you shure the binary runs stable? AFAAIK you really need the -fpic
> flag to compile against
> newer Qt5 versions (unless you compiled Qt yourself and disabled Qt's
> "reduce relocations").
> From Qt's changelog:
> 
> - On x86 and x86-64 systems with ELF binaries (especially Linux), due to
>   a new optimization in GCC 5.x in combination with a recent version of
>   GNU binutils, compiling Qt applications with -fPIE is no longer
>   enough with GCC 5.x. Applications now need to be compiled with
>   the -fPIC option if Qt's option "reduce relocations" is active. For
>   backward compatibility only, Qt accepts the use of -fPIE for GCC 4.x
>   versions.
>   Note that Clang is known to generate incompatible code even with -fPIC
> if
>   the -flto option is active.
>   Applications using qmake or cmake >= 2.8.12 as their build system will
>   adapt automatically. Applications using an older release of cmake in
>   combination with GCC 5.x need to change their CMakeLists.txt to add
>   Qt5Core_EXECUTABLE_COMPILE_FLAGS to CMAKE_CXX_FLAGS. In particular,
>   applications using cmake >= 2.8.9 and < 2.8.11 will continue to build
>   with the -fPIE option and invoke the special compatibility mode if using
>   GCC 4.x.

As far as I can see, it works fine. The -fPIC option is set in
CMakeLists.txt.
See the lines:
      set(CMAKE_CXX_FLAGS_DEBUG   "-std=c++11 -fPIC -fPIE -g")
      set(CMAKE_CXX_FLAGS_RELEASE "-std=c++11 -fPIC -O2 -DNDEBUG
-DQT_NO_DEBUG")

I only deleted the -fPIE, and now everything works ...

Best regards
Markus







--
View this message in context: 
http://dev-list.musescore.org/Compiling-2-1-on-Linux-with-QT-Creator-tp7580160p7580173.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Mscore-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mscore-developer

Reply via email to