Build with CMAKE_SHARED_LINKER_FLAGS=" -Wl,--no-undefined"

Bug #1559524 reported by awissu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yarock
Won't Fix
Undecided
Unassigned

Bug Description

Hello!
GCC complains that it can't build the library with undefined symbols:

[ 193s] CMakeFiles/enginephonon.dir/enginephonon_automoc.cpp.o:(.data.rel.ro+0x0): undefined reference to `EngineBase::staticMetaObject'
[ 193s] collect2: error: ld returned 1 exit status
[ 193s] src/core/player/phonon/CMakeFiles/enginephonon.dir/build.make:125: recipe for target 'lib/libenginephonon.so' failed
[ 193s] make[2]: *** [lib/libenginephonon.so] Error 1

See: https://build.opensuse.org/package/live_build_log/home:awissu/yarock/openSUSE_Tumbleweed/x86_64

awissu (avvissu)
description: updated
Revision history for this message
martinkg (martin-gansser-c) wrote :

you can try this:

cmake .. \
  -DUSE_SYSTEM_QTSINGLEAPPLICATION:BOOL=ON \
  -DUSE_SYSTEM_QXT:BOOL=ON \
  -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed"

Revision history for this message
awissu (avvissu-n-deactivatedaccount) wrote :

Yes, the build succeeded.
But if I use %cmake macro this induces errors when building:

rpm --eval %cmake|grep -i shared
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \

Changed in yarock:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.