Bug 94651 - poppler 0.42.0 fails to link nss
Summary: poppler 0.42.0 fails to link nss
Status: RESOLVED MOVED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-21 17:42 UTC by Timo Gurr
Modified: 2018-08-21 10:42 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
1458580579-install-app-text_poppler-0.42.0.log (121.48 KB, text/plain)
2016-03-21 17:42 UTC, Timo Gurr
Details
Patch to fix the issue (1.62 KB, patch)
2016-03-21 21:34 UTC, Heiko Becker
Details | Splinter Review

Description Timo Gurr 2016-03-21 17:42:43 UTC
Created attachment 122462 [details]
1458580579-install-app-text_poppler-0.42.0.log

When trying to build poppler 0.42.0 with the new NSS support it fails to link:

CMakeFiles/poppler.dir/poppler/FlateEncoder.cc.o CMakeFiles/poppler.dir/poppler/SignatureHandler.cc.o CMakeFiles/poppler.dir/poppler/JPXStream.cc.o -lfreetype -lfontconfig -ljpeg -lz -lssl3 -lsmime3 -lnss3 -lnssutil3 -lsoftokn3 -lplds4 -lplc4 -lnspr4 -lpng -lz -ltiff -lpthread -lssl3 -lsmime3 -lnss3 -lnssutil3 -lsoftokn3 -lplds4 -lplc4 -lnspr4 -lpng -ltiff -lpthread 
CMakeFiles/poppler.dir/build.make:2914: recipe for target 'libpoppler.so.59.0.0' failed
make[2]: Leaving directory '/var/tmp/paludis/build/app-text-poppler-0.42.0/work/build'
CMakeFiles/Makefile2:70: recipe for target 'CMakeFiles/poppler.dir/all' failed
make[1]: Leaving directory '/var/tmp/paludis/build/app-text-poppler-0.42.0/work/build'
Makefile:141: recipe for target 'all' failed
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: cannot find -lssl3
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: cannot find -lsmime3
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: cannot find -lnss3
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: cannot find -lnssutil3
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: cannot find -lsoftokn3
collect2: error: ld returned 1 exit status
make[2]: *** [libpoppler.so.59.0.0] Error 1
make[1]: *** [CMakeFiles/poppler.dir/all] Error 2
make: *** [all] Error 2

Also seen here: https://galileo.mailstation.de/jenkins/job/x11/1268/console
and in the attached full build.log

Output of running:

$ x86_64-pc-linux-gnu-pkg-config --cflags --libs nss

-I/usr/x86_64-pc-linux-gnu/include/nss -I/usr/x86_64-pc-linux-gnu/include/nspr -L/usr/x86_64-pc-linux-gnu/lib/nss -Wl,-R/usr/x86_64-pc-linux-gnu/lib/nss -lssl3 -lsmime3 -lnss3 -lnssutil3 -lsoftokn3 -lplds4 -lplc4 -lnspr4
Comment 1 Heiko Becker 2016-03-21 21:34:23 UTC
Created attachment 122467 [details] [review]
Patch to fix the issue

The attached patch fixes the issue for me.
Comment 2 Albert Astals Cid 2016-03-21 21:59:30 UTC
Heiko, the solution is a bit confusing, we don't use _LDFLAGS in any of the other find modules, you mean none of the other libs won't work either?
Comment 3 Heiko Becker 2016-03-21 23:02:03 UTC
(In reply to Albert Astals Cid from comment #2)
> Heiko, the solution is a bit confusing, we don't use _LDFLAGS in any of the
> other find modules, you mean none of the other libs won't work either?

No, because nss is the only one which installs to .../lib/foo (foo being nss in this case) here, instead of just .../lib.

So -lssl3 -lsmime3 -lnss3 -lnssutil3 -lsoftokn3 -lplds4 -lplc4 -lnspr4 (pkg-config --libs-only-l) is not enough to successfully link.
Comment 4 Albert Astals Cid 2016-03-21 23:05:44 UTC
So you actually mean "yes", the other libraries will also break if they end up installed into /usr/lib/foobar, right?
Comment 5 Heiko Becker 2016-03-21 23:07:32 UTC
(In reply to Albert Astals Cid from comment #4)
> So you actually mean "yes", the other libraries will also break if they end
> up installed into /usr/lib/foobar, right?

Yes.
Comment 6 GitLab Migration User 2018-08-21 10:42:29 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/337.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.