View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0016327 | Scribus | Build System | public | 2020-11-11 10:42 | 2021-03-23 06:25 |
Reporter | erictapen | Assigned To | jghali | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.5.6 | ||||
Fixed in Version | 1.5.7.svn | ||||
Summary | 0016327: libhunspellplugin.so fails to load | ||||
Description | I'm maintaining Scribus on NixOS. When building Scribus 1.5.6, I get an error message at startup: > There is a problem loading 1 of 48 plugins. > libhunspellplugin.so > This is probably caused by some kind of dependency issue or old plugins existing in your install directory. If you clean out your install directory and reinstall and this still occurs, please report it on bugs.scribus.net. Any idea what causes this? | ||||
Steps To Reproduce | When using nixUnstable with flakes support you can run nix build github:erictapen/Nixpkgs/scribus-1.5.6#scribusUnstable to build the same closure I'm testing. Then run ./result/bin/scribus to observe the error. | ||||
Tags | No tags attached. | ||||
Patch | No | ||||
|
Just one more note: I already deleted ~/.scribus prior to testing to make sure I have no hidden system state what causes this. And this is the terminal output: $ ./result/bin/scribus Cannot find plugin: /nix/store/9fxi23s82djnq1nswligkavghhhb10lw-scribus-1.5.6/lib/scribus/plugins//libhunspellplugin.so: undefined symbol: _ZN14ScWordIteratorC1ER9StoryText Cannot find plugin: /nix/store/9fxi23s82djnq1nswligkavghhhb10lw-scribus-1.5.6/lib/scribus/plugins//libhunspellplugin.so: undefined symbol: _ZN14ScWordIteratorC1ER9StoryText pathForIcon: Unable to load icon /nix/store/9fxi23s82djnq1nswligkavghhhb10lw-scribus-1.5.6/share/scribus/icons/1_5_1/lab.png: File not found pathForIcon: Unable to load icon /nix/store/9fxi23s82djnq1nswligkavghhhb10lw-scribus-1.5.6/share/scribus/icons/1_5_1/spot.png: File not found pathForIcon: Unable to load icon /nix/store/9fxi23s82djnq1nswligkavghhhb10lw-scribus-1.5.6/share/scribus/icons/1_5_1/register.png: File not found qt.gui.icc: Unsupported ICC profile class 70727472 qt.gui.icc: fromIccProfile: failed general sanity check QPngHandler: Failed to parse ICC profile |
|
when compiling scribus, did you do a clean build? (by removing the old build directory before compiling...) |
|
@ale Yes, it's impossible to keep any old build directories with Nix. |
|
the debian/ubuntu packaging seems to have the same issue. mattia suggests that it might be related to the "-Wl,--as-needed" options in gcc.... untested. |
|
Mh do you have a link for that? Neither supplying `--as-needed` nor `--no-as-needed`as a ld flag solves the problem. |
|
I have the same problem on Fedora (since a few svn versions, cannot say which one yet). It may be related to -Wl,-E: If I remove that from the CMakeLists.txt at the root of the tree then all plugins fail to load with the same error. Now, I checked that the hunspell plugin is indeed compiled with -Wl,-E (unless I remove that flag, of course); but maybe something that the plugin links against dynamically is not, I have not checked all the dependencies. But this might give a clue (suspecting something in thirdparty but I dunno). |
|
For some reason, it seems the linker is removing the ScWordIterator class from scribus main binary while the class is clearly specified as exported. MSVC linker export ScWordIterator as expected. It seems the patch below is sufficient to workaround this issue. It adds an unused function to StoryText class which makes use of ScWordIterator class. Please test. 16327_libhunspellplugin_fails_to_load.diff (1,253 bytes)
Index: Scribus/scribus/text/storytext.cpp =================================================================== --- Scribus/scribus/text/storytext.cpp (révision 24231) +++ Scribus/scribus/text/storytext.cpp (copie de travail) @@ -32,6 +32,7 @@ #include "scfonts.h" #include "scribusdoc.h" #include "sctext_shared.h" +#include "scworditerator.h" #include "selection.h" #include "storytext.h" // @@ -2029,6 +2030,11 @@ d->selLast += 1; } +ScWordIterator* StoryText::createWordIterator() +{ + return new ScWordIterator(*this); +} + BreakIterator* StoryText::m_graphemeIterator = nullptr; BreakIterator* StoryText::getGraphemeIterator() Index: Scribus/scribus/text/storytext.h =================================================================== --- Scribus/scribus/text/storytext.h (révision 24231) +++ Scribus/scribus/text/storytext.h (copie de travail) @@ -46,6 +46,7 @@ class PageItem; class ScribusDoc; class ScText_Shared; +class ScWordIterator; class ResourceCollection; class ShapedTextCache; @@ -266,6 +267,8 @@ static icu::BreakIterator* getWordIterator(); static icu::BreakIterator* getSentenceIterator(); static icu::BreakIterator* getLineIterator(); + + ScWordIterator* createWordIterator(); // layout helpers |
|
If there is a different solution which involves modifying linker flags, it take it! |
|
Thanks @jghali, I can confirm that your patch solves the issue for me. |
|
Thanks for testing. I have consequently applied this patch to 1.5.7.svn. |
|
Same success for a test build on Fedora of 1.5.6 witth the patch from here. Thanks! |
|
We discovered another serious issue in spellchecker, so please do not package 1.5.6, we will release 1.5.6.1 pretty soon. |
|
1.5.6.1 is done... uploaded to sourceforge |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-11-11 10:42 | erictapen | New Issue | |
2020-11-11 10:56 | erictapen | Note Added: 0048375 | |
2020-11-11 11:05 | ale | Note Added: 0048376 | |
2020-11-11 11:30 | erictapen | Note Added: 0048377 | |
2020-11-12 19:31 | ale | Note Added: 0048385 | |
2020-11-12 23:06 | erictapen | Note Added: 0048392 | |
2020-11-13 10:38 | mjg | Note Added: 0048396 | |
2020-11-13 11:18 | jghali | File Added: 16327_libhunspellplugin_fails_to_load.diff | |
2020-11-13 11:18 | jghali | Note Added: 0048399 | |
2020-11-13 11:36 | jghali | Note Added: 0048400 | |
2020-11-13 12:43 | erictapen | Note Added: 0048402 | |
2020-11-13 22:12 | jghali | Assigned To | => jghali |
2020-11-13 22:12 | jghali | Status | new => resolved |
2020-11-13 22:12 | jghali | Resolution | open => fixed |
2020-11-13 22:12 | jghali | Fixed in Version | => 1.5.7.svn |
2020-11-13 22:12 | jghali | Note Added: 0048405 | |
2020-11-13 22:22 | mjg | Note Added: 0048406 | |
2020-11-14 18:05 | jghali | Note Added: 0048415 | |
2020-11-14 23:29 | cbradney | Note Added: 0048419 | |
2021-03-23 06:25 | cbradney | Status | resolved => closed |