Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 691684 - app-office/scribus-9999 - Cannot find plugin: /usr/lib64/scribus/plugins/libxpsexplugin.so: undefined symbol: _ZTI13UpdateMemento
Summary: app-office/scribus-9999 - Cannot find plugin: /usr/lib64/scribus/plugins/libx...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Justin Lecher (RETIRED)
URL:
Whiteboard:
Keywords: PullRequest
Depends on: 696206
Blocks:
  Show dependency tree
 
Reported: 2019-08-07 14:52 UTC by Helmut Jarausch
Modified: 2023-02-06 10:36 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge_info,21.33 KB, text/plain)
2019-08-07 14:52 UTC, Helmut Jarausch
Details
scribus_ebuild.patch (scribus_ebuild.patch,1.24 KB, patch)
2020-01-02 03:23 UTC, cyrillic
Details | Diff
patch for scribus-9999 to compile correctly (scribus-9999.patch,956 bytes, patch)
2020-03-22 21:35 UTC, Alexandre Ferreira
Details | Diff
0001-app-office-scribus-fix-startup-crash.patch (0001-app-office-scribus-fix-startup-crash.patch,1.62 KB, patch)
2020-03-24 18:56 UTC, Bernd
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2019-08-07 14:52:44 UTC
Created attachment 585980 [details]
emerge --info

Just starting scribus (built from scribus-9999) I get
Cannot find plugin: /usr/lib64/scribus/plugins//libxpsexplugin.so: undefined symbol: _ZTI13UpdateMemento
Cannot find plugin: /usr/lib64/scribus/plugins//libwmfimplugin.so: undefined symbol: _ZTI14LoadSavePlugin

and many more lines with missing symbols

Scribus Crash
-------------
Scribus crashes due to Signal #11
zsh: segmentation fault (core dumped)  scribus

where "_ZTI14LoadSavePlugin"  -> typeinfo for LoadSavePlugin
and   "_ZTI13UpdateMemento"  -> typeinfo for UpdateMemento

Version  1.5.5_pre20190429  runs fine here, though.

Thanks for a hint,
Helmut
Comment 1 cyrillic 2019-08-14 00:49:51 UTC
I am getting the same error(s), but I am still looking into what causes this.
Comment 2 Andreas Sturmlechner gentoo-dev 2019-10-01 23:52:09 UTC
Please test with 1.5.5.
Comment 3 cyrillic 2019-10-02 22:56:42 UTC
scribus-1.5.5 is working fine here.

I also noticed that if I skip the ebuild, and build scribus-9999 manually, cmake gets the libdir wrong, but it does build a working scribus (with plugins and everything).
Comment 4 cyrillic 2019-10-08 01:59:38 UTC
This makes no sense to me, but the commit that breaks everything is this one :
https://github.com/scribusproject/scribus/commit/2e527fc3cb3d4ff34d9c73669e1f33343d02b755
also known as ESVN_REVISION=23103

ps. the reason I am using the Scribus mirror on github is because Subversion interacts badly with my NFS-mounted-distfiles setup.
Comment 5 cyrillic 2019-10-24 00:03:23 UTC
scribus-9999::gentoo continues to segfault on startup, but I have narrowed the problem down to something that cmake-utils.eclass is doing that is not compatible with scribus upstream.

# diff -u /mnt/repos/{gentoo,fixes}/eclass/cmake-utils.eclass 
--- /mnt/repos/gentoo/eclass/cmake-utils.eclass	2019-07-14 15:01:36.287386000 -0400
+++ /mnt/repos/fixes/eclass/cmake-utils.eclass	2019-10-23 19:47:40.044910000 -0400
@@ -481,7 +481,7 @@
 
 	if [[ ${EAPI} != 5 ]]; then
 		default_src_prepare
-		_cmake_cleanup_cmake
+		#_cmake_cleanup_cmake
 	else
 		debug-print "$FUNCNAME: PATCHES=$PATCHES"
 		[[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"

By commenting this one line, Scribus is now able to compile and run properly.
Comment 6 Miroslav Šulc gentoo-dev 2019-10-29 13:57:27 UTC
maybe kde@gentoo.org team could help with this as they maintain dev-util/cmake?
Comment 7 cyrillic 2020-01-02 03:23:12 UTC
Created attachment 602252 [details, diff]
scribus_ebuild.patch

This is what I am using at the moment.
It compiles fine, and runs without crashing.
Comment 8 Larry the Git Cow gentoo-dev 2020-01-03 07:24:10 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91e7091096936ef82d8ea76edc8b595a4d4f7d92

commit 91e7091096936ef82d8ea76edc8b595a4d4f7d92
Author:     Miroslav Šulc <fordfrog@gentoo.org>
AuthorDate: 2020-01-03 07:23:37 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2020-01-03 07:24:00 +0000

    app-office/scribus: fixed 9999
    
    1) added python3_8
    2) switched from cmake-utils to cmake
    3) removed unused config args
    
    Bug: https://bugs.gentoo.org/691684
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 app-office/scribus/scribus-9999.ebuild | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
Comment 9 Miroslav Šulc gentoo-dev 2020-01-03 07:27:02 UTC
@cyrillic: thank your for the patch!

@all: i'm not closing this bug as scribus crashes for me anyway, but on a different issue (some unparsable icc profile). please report back if this commit fixes the issue for you and scribus starts up without crash. thanks!
Comment 10 Andreas Sturmlechner gentoo-dev 2020-01-03 20:12:06 UTC
Comment on attachment 602252 [details, diff]
scribus_ebuild.patch

reverted invalid src_prepare() change.
Comment 11 Andreas Sturmlechner gentoo-dev 2020-01-03 20:15:59 UTC
cmake_src_prepare makes some changes to the build system and it is not silent about that:

> * Working in BUILD_DIR: "/var/tmp/portage/app-office/scribus-9999/work/scribus-9999_build"
> * Hardcoded definition(s) removed in CMakeLists.txt:
> *  set(CMAKE_COLOR_MAKEFILE ON)
> *  set(CMAKE_VERBOSE_MAKEFILE OFF)
> *      set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Set Debug Build Type" FORCE)
> *      set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Set Release with Debug I
> *      set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Set Release Build Type" FORCE)
Comment 12 cyrillic 2020-01-04 01:05:39 UTC
(In reply to Andreas Sturmlechner from comment #11)
> cmake_src_prepare makes some changes to the build system ...

I am sorry about that.  I was not expecting the workaround that I used to get committed as-is.

The problem is that one or more of those build system changes is resulting in a scribus that gets signal 11 instead of starting normally.

I am not sure if patching scribus could help the situation, or if _cmake_cleanup_cmake needs to do its job differently.
Comment 13 cyrillic 2020-01-04 23:42:20 UTC
(In reply to cyrillic from comment #12)
> or if _cmake_cleanup_cmake needs to do its job differently ...

Actually, the function has been renamed _cmake_modify-cmakelists

When I come up with a more elegant solution, I will post it, and if someone else knows what to do here, don't be shy :)
Comment 14 Andreas Sturmlechner gentoo-dev 2020-01-06 12:07:26 UTC
Only the CMAKE_BUILD_TYPE changes could be relevant, but I did not find that in use anywhere else.
Comment 15 Alexandre Ferreira 2020-03-22 21:35:39 UTC
Created attachment 624608 [details, diff]
patch for scribus-9999 to compile correctly

This patch allows scribus from svn head to be compiled (1.5.6). The ZLIB changes have to be disabled and setting the CMAKE_BUILD_TYPE is necessary.
Comment 16 Bernd 2020-03-24 18:50:36 UTC
I was having the zlib configuration issue as well:

-- Found PkgConfig: x86_64-pc-linux-gnu-pkg-config (found version "0.29.2") 
-- Checking for modules 'minizip;zlib'
--   Found minizip, version 1.2.11
--   Found zlib, version 1.2.11
ZLIB Library Found OK
OSG found OK
-- Found OpenGL: /usr/lib64/libOpenGL.so   
-- Looking for memrchr
-- Looking for memrchr - found
-- Found JPEG: /usr/lib64/libjpeg.so (found version "62") 
JPEG Library Found OK
-- Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) 
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR) (Required is
  at least version "1.6")

Commenting the zlib related lines from attachment 624608 [details, diff] let's me build successfully. Changing the CMAKE_BUILD_TYPE was not necessary, to build the package, but setting it globally in the ebuild solved the startup crash.

I found, however, another issue related to python. Cmake selects python3.8 on my tests, although my PYTHON_SINGLE_TARGET is set to python3.6.

 * USE:        abi_x86_64 amd64 boost elibc_glibc examples graphicsmagick hunspell kernel_linux osg pdf python_single_target_python3
_6 scripts templates tk userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Using python3.6 to build
...
Python 3.x Selected
-- Found Python3: /usr/bin/python3.8 (found version "3.8.2") found components: Interpreter Development 
Python 3.x Library Found OK (Version 3.8.2)
Interpreter: /usr/bin/python3.8
Include directories: /usr/include/python3.8
Library directories: /usr/lib64
Runtime library directories: /usr/lib64

which led to /usr/lib64/scribus/plugins/libscriptplugin.so being linked against libpython3.8.so:

app-office/scribus $ ldd /usr/lib64/scribus/plugins/libscriptplugin.so | grep -i python
	libpython3.8.so.1.0 => /usr/lib64/libpython3.8.so.1.0 (0x00007fa9b9218000)

I'm adding my changes in an attachment.
Comment 17 Bernd 2020-03-24 18:56:19 UTC
Created attachment 625358 [details, diff]
0001-app-office-scribus-fix-startup-crash.patch

Ebuild patch fixing the startup crash, as well as a zlib related issue in src_configure and an issue with selecting python implementation.
Comment 18 cyrillic 2020-03-25 03:00:13 UTC
(In reply to Bernd from comment #16)
> Changing the CMAKE_BUILD_TYPE was not
> necessary, to build the package, but setting it globally in the ebuild
> solved the startup crash.

Thank you.  It worked for me too.
Comment 19 Larry the Git Cow gentoo-dev 2020-03-27 10:08:20 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=624ba2504e489972a8d5c511628352bcc8748803

commit 624ba2504e489972a8d5c511628352bcc8748803
Author:     Bernd Waibel <waebbl@gmail.com>
AuthorDate: 2020-03-24 18:53:16 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2020-03-27 10:08:04 +0000

    app-office/scribus: fix startup crash
    
    The patch fixes the crash on startup, as well as a zlib package
    finding related issue in src_configure. It also solves an issue
    whith selecting the correct python implementation.
    
    Bug: https://bugs.gentoo.rog/691684
    Package-Manager: Portage-2.3.95, Repoman-2.3.21
    Signed-off-by: Bernd Waibel <waebbl@gmail.com>
    Closes: https://bugs.gentoo.org/691684
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 app-office/scribus/scribus-9999.ebuild | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
Comment 20 Andreas Sturmlechner gentoo-dev 2020-04-17 12:31:52 UTC
(In reply to cyrillic from comment #18)
> (In reply to Bernd from comment #16)
> > Changing the CMAKE_BUILD_TYPE was not
> > necessary, to build the package, but setting it globally in the ebuild
> > solved the startup crash.
> 
> Thank you.  It worked for me too.

This can only be considered a workaround, not a fix.
Comment 21 Larry the Git Cow gentoo-dev 2023-02-06 10:36:03 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb70711765546964429e8734e71a17d26ce6cd56

commit eb70711765546964429e8734e71a17d26ce6cd56
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2023-02-05 15:33:43 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2023-02-06 10:35:21 +0000

    app-office/scribus: Add python3_11, fix memleak, fix dashed lines
    
    Use upstream poppler-22.09 support patch, amended by Debian
    for dashed lines fix.
    
    Drop CMAKE_BUILD_TYPE="Release"
    
    Hopefully stop cmake overwriting user optimisations
    
    Bug: https://bugs.gentoo.org/691684
    Closes: https://bugs.gentoo.org/886251
    Closes: https://bugs.gentoo.org/893158
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 app-office/scribus/Manifest                        |   1 +
 app-office/scribus/files/scribus-1.5.8-cmake.patch |  28 ++++
 app-office/scribus/scribus-1.5.8-r5.ebuild         | 168 +++++++++++++++++++++
 3 files changed, 197 insertions(+)