View Issue Details

IDProjectCategoryView StatusLast Update
0016593ScribusBuild Systempublic2021-06-13 11:41
Reporteryopito Assigned Tojghali  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSLinuxOS VersionVoidLinux
Product Version1.5.7 
Fixed in Version1.5.8.svn 
Summary0016593: Plugin load fails with undefined symbols (for all plugins)
Descriptionscribus 1.5.7 fails to load any of its plugins.

$ /usr/bin/scribus
Erreur lors du chargement d'un plugin /usr/lib/scribus/plugins//libxpsexplugin.so: undefined symbol: _ZTI14ScActionPlugin
Erreur lors du chargement d'un plugin /usr/lib/scribus/plugins//libwmfimplugin.so: undefined symbol: _ZTI14LoadSavePlugin
Erreur lors du chargement d'un plugin /usr/lib/scribus/plugins//libuniconvertorplugin.so: undefined symbol: _ZTI14LoadSavePlugin
[...]

Steps To Reproducebuild scribus 1.5.7 via xbps-src framework (VoidLinux packaging system).

then launch /usr/bin/scribus
Additional InformationAlready happened and fixed on issue#6897, but its fix does not work in VoidLinux's build & packaging generation.

This is because export symbol directive on scribus binary has not been applied.
Because "GCC" as a cmake's variable is not defined (used in scribus/CMakeLists.txt)

So I remove GCC variable from scribus/CMakeLists.txt as below: no more trouble, scribus is loading its 54 plugins fine.

Here my proposed patch that fix this problem (formal patch is attached to this bug) :

@@ -757,7 +757,7 @@
 # Should fix bug 6897 .
     set_target_properties(${EXE_NAME} PROPERTIES LINK_FLAGS -Wl,-E)
 endif ()
-if (GCC AND NOT WIN32)
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT WIN32)
 # Use the -E / --export-dynamic flag to ensure that symbols in the Scribus
 # binary are in the public symbol table for plugins. The symbols must also
 # be set as SCRIBUS_API if we're building with -fvisibility=hidden .

VoidLinux's corresponding issue for reference:
https://github.com/void-linux/void-packages/issues/31343
TagsNo tags attached.
PatchYes

Activities

yopito

2021-06-13 09:57

reporter  

export-symbols-for-plugins.patch (555 bytes)   
--- scribus/CMakeLists.txt.ORIG	2021-04-25 22:24:52.000000000 +0200
+++ scribus/CMakeLists.txt	2021-06-12 16:23:22.884229251 +0200
@@ -757,7 +757,7 @@
 # Should fix bug 6897 .
 	set_target_properties(${EXE_NAME} PROPERTIES LINK_FLAGS -Wl,-E)
 endif ()
-if (GCC AND NOT WIN32)
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT WIN32)
 # Use the -E / --export-dynamic flag to ensure that symbols in the Scribus
 # binary are in the public symbol table for plugins. The symbols must also
 # be set as SCRIBUS_API if we're building with -fvisibility=hidden .

jghali

2021-06-13 11:41

administrator   ~0049169

Applied, thanks!

Issue History

Date Modified Username Field Change
2021-06-13 09:57 yopito New Issue
2021-06-13 09:57 yopito File Added: export-symbols-for-plugins.patch
2021-06-13 11:41 jghali Assigned To => jghali
2021-06-13 11:41 jghali Status new => resolved
2021-06-13 11:41 jghali Resolution open => fixed
2021-06-13 11:41 jghali Fixed in Version => 1.5.8.svn
2021-06-13 11:41 jghali Note Added: 0049169