Bug 228540 - graphics/poppler: build fails after security/nss was updated to 3.37.1
Summary: graphics/poppler: build fails after security/nss was updated to 3.37.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-27 11:32 UTC by r00t
Modified: 2018-05-30 07:29 UTC (History)
5 users (show)

See Also:
jbeich: maintainer-feedback+


Attachments
Patch for src/replicant.ads (434 bytes, patch)
2018-05-28 15:31 UTC, Trond Endrestøl
no flags Details | Diff
Patch for src/replicant.adb (1.57 KB, patch)
2018-05-28 15:31 UTC, Trond Endrestøl
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description r00t 2018-05-27 11:32:56 UTC
Hello,

# uname -a
FreeBSD SRV-SYNTH 11.1-RELEASE-p8 FreeBSD 11.1-RELEASE-p8 #0 r330926: Wed Mar 14 15:26:58 CET 2018     r00t@SRV-SYNTH:/usr/obj/usr/src/sys/BSD112017110501PHY  amd64

# svnlite info /usr/ports | grep Rev
Revision: 470978
Last Changed Rev: 470978

I can't seem to build graphics/poppler anymore after security/nss was updated to 3.37.1:

...
/bin/sh ../libtool  --tag=CXX   --mode=link c++  -fPIC -Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions  -fno-common -O2 -pipe -DLIBICONV_PLUG -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -isystem /usr/local/include -std=c++11  -fstack-protector -o pdf-fullrewrite pdf-fullrewrite.o ../utils/libparseargs.la ../poppler/libpoppler.la -lz -L/usr/local/lib
/bin/sh ../libtool  --tag=CXX   --mode=link c++  -fPIC -Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions  -fno-common -O2 -pipe -DLIBICONV_PLUG -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -isystem /usr/local/include -std=c++11  -fstack-protector -o perf-test perf-test.o perf-test-preview-dummy.o ../poppler/libpoppler.la -L/usr/local/lib -lfreetype   -lz -L/usr/local/lib
libtool: link: c++ -fPIC -Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-common -O2 -pipe -DLIBICONV_PLUG -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -isystem /usr/local/include -std=c++11 -fstack-protector -o .libs/perf-test perf-test.o perf-test-preview-dummy.o  ../poppler/.libs/libpoppler.so -L/usr/local/lib -lfreetype -lz -pthread -Wl,-rpath -Wl,/usr/local/lib
libtool: link: c++ -fPIC -Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-common -O2 -pipe -DLIBICONV_PLUG -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -isystem /usr/local/include -std=c++11 -fstack-protector -o .libs/pdf-fullrewrite pdf-fullrewrite.o  ../utils/.libs/libparseargs.a -L/usr/local/lib ../poppler/.libs/libpoppler.so -lz -pthread -Wl,-rpath -Wl,/usr/local/lib
/usr/bin/ld: warning: libnss3.so, needed by ../poppler/.libs/libpoppler.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libsmime3.so, needed by ../poppler/.libs/libpoppler.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libssl3.so, needed by ../poppler/.libs/libpoppler.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libnssutil3.so, needed by ../poppler/.libs/libpoppler.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libnss3.so, needed by ../poppler/.libs/libpoppler.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libsmime3.so, needed by ../poppler/.libs/libpoppler.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libssl3.so, needed by ../poppler/.libs/libpoppler.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libnssutil3.so, needed by ../poppler/.libs/libpoppler.so, not found (try using -rpath or -rpath-link)
../poppler/.libs/libpoppler.so: undefined reference to `HASH_Create@NSS_3.4'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_Shutdown@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `CERT_GetCommonName@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `CERT_PKIXVerifyCert@NSS_3.12'
../poppler/.libs/libpoppler.so: undefined reference to `PORT_GetError@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSSignerInfo_GetSigningCertificate@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `CERT_GetClassicOCSPEnabledSoftFailurePolicy@NSS_3.12'
../poppler/.libs/libpoppler.so: undefined reference to `CERT_NewTempCertificate@NSS_3.12'
../poppler/.libs/libpoppler.so: undefined reference to `SECOID_FindOIDTag@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_Init@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSMessage_CreateFromDER@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSSignedData_GetDigestAlgs@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `HASH_Update@NSS_3.4'
../poppler/.libs/libpoppler.so: undefined reference to `SECMOD_AddNewModule@NSS_3.3'
../poppler/.libs/libpoppler.so: undefined reference to `HASH_Destroy@NSS_3.4'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSSignerInfo_GetSigningTime@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `PORT_Alloc@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `CERT_GetDefaultCertDB@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSSignerInfo_Destroy@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSMessage_ContentLevel@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `CERT_DestroyCertificate@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSSignedData_Destroy@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `SECITEM_FreeItem@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSSignedData_GetSignerInfo@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `HASH_End@NSS_3.4'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSMessage_IsSigned@NSS_3.4'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSContentInfo_GetContent@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `PORT_Free@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSSignerInfo_Verify@NSS_3.16'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSMessage_Destroy@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `HASH_GetHashTypeByOidTag@NSS_3.8'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [Makefile:530: perf-test] Error 1
gmake[3]: *** Waiting for unfinished jobs....
../poppler/.libs/libpoppler.so: undefined reference to `HASH_Create@NSS_3.4'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_Shutdown@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `CERT_GetCommonName@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `CERT_PKIXVerifyCert@NSS_3.12'
../poppler/.libs/libpoppler.so: undefined reference to `PORT_GetError@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSSignerInfo_GetSigningCertificate@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `CERT_GetClassicOCSPEnabledSoftFailurePolicy@NSS_3.12'
../poppler/.libs/libpoppler.so: undefined reference to `CERT_NewTempCertificate@NSS_3.12'
../poppler/.libs/libpoppler.so: undefined reference to `SECOID_FindOIDTag@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_Init@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSMessage_CreateFromDER@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSSignedData_GetDigestAlgs@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `HASH_Update@NSS_3.4'
../poppler/.libs/libpoppler.so: undefined reference to `SECMOD_AddNewModule@NSS_3.3'
../poppler/.libs/libpoppler.so: undefined reference to `HASH_Destroy@NSS_3.4'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSSignerInfo_GetSigningTime@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `PORT_Alloc@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `CERT_GetDefaultCertDB@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSSignerInfo_Destroy@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSMessage_ContentLevel@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `CERT_DestroyCertificate@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSSignedData_Destroy@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `SECITEM_FreeItem@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSSignedData_GetSignerInfo@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `HASH_End@NSS_3.4'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSMessage_IsSigned@NSS_3.4'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSContentInfo_GetContent@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `PORT_Free@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSSignerInfo_Verify@NSS_3.16'
../poppler/.libs/libpoppler.so: undefined reference to `NSS_CMSMessage_Destroy@NSS_3.2'
../poppler/.libs/libpoppler.so: undefined reference to `HASH_GetHashTypeByOidTag@NSS_3.8'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [Makefile:522: pdf-fullrewrite] Error 1
gmake[3]: Leaving directory '/construction/xports/graphics/poppler/work/poppler-0.57.0/test'
gmake[2]: *** [Makefile:654: all-recursive] Error 1
gmake[2]: Leaving directory '/construction/xports/graphics/poppler/work/poppler-0.57.0'
gmake[1]: *** [Makefile:537: all] Error 2
gmake[1]: Leaving directory '/construction/xports/graphics/poppler/work/poppler-0.57.0'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /xports/graphics/poppler
Comment 2 r00t 2018-05-28 08:03:52 UTC
Indeed, I'm using Synth with a pretty much default LiveSystem-make.conf:

DISABLE_LICENSES=yes
DEFAULT_VERSIONS+=    ruby=2.3 mysql=5.7

I didn't experience any issues building poppler-0.57.0_1 prior to 3.37.1 (for example it built fine with 3.37).
Comment 3 Trond Endrestøl 2018-05-28 08:21:10 UTC
While hardly a good solution, this one circumvents the problem:

Create graphics/poppler/Makefile.local and give it these two lines, note the tab char on the second line.

pre-build:
	ldconfig -im $(LOCALBASE)/lib/nss

It looks like r469956 could be the guilty one as lib*.so.[0-9] symlinks was removed from security/nss in r423591, 19 months ago.

Either remove the lib*.so.[0-9] restriction in ldconfig or reinstate the pre-r469956 behaviour.
Comment 4 Trond Endrestøl 2018-05-28 08:22:43 UTC
(In reply to Trond.Endrestol from comment #3)
Or maybe synth needs to catch up on r469956.
Comment 5 Trond Endrestøl 2018-05-28 09:00:35 UTC
(In reply to Trond.Endrestol from comment #4)
print/texlive-base might give you similar problems during the configure phase.

An equally bad but working solution is to create print/texlive-base/Makefile.local and give it these two lines:

pre-configure:
	ldconfig -im $(LOCALBASE)/lib/nss
Comment 6 Trond Endrestøl 2018-05-28 10:43:24 UTC
(In reply to Trond.Endrestol from comment #5)
print/tex-luatex and print/tex-xetex must be treated the same way as graphics/poppler.
Comment 7 Christoph Moench-Tegeder freebsd_committer freebsd_triage 2018-05-28 11:36:11 UTC
I'd rather chalk this up to synth - the build works in poudriere (and for all the other ports, too).
Meanwhile, there was another report abount linker failure in thunderbird - agin, synth is involved:
https://lists.freebsd.org/pipermail/freebsd-ports/2018-May/113497.html
Comment 8 Trond Endrestøl 2018-05-28 15:31:07 UTC
Created attachment 193790 [details]
Patch for src/replicant.ads
Comment 9 Trond Endrestøl 2018-05-28 15:31:49 UTC
Created attachment 193791 [details]
Patch for src/replicant.adb
Comment 10 Trond Endrestøl 2018-05-28 15:32:45 UTC
(In reply to Christoph Moench-Tegeder from comment #7)
There were done some commits to the synth repo this Friday. The changes copies /etc/rc.conf and /etc/rc.d/ldconfig into each chroot env. We might get a new synth release shortly.

For the uneasy of us, I have prepared two patches for synth based on said commits. They are named patch-local-... to distinguish them from the actually committed patches.
Comment 11 Trond Endrestøl 2018-05-28 19:49:37 UTC
(In reply to Trond.Endrestol from comment #10)
I obviously ment last Friday.

The modified synth was highly successful on a couple of standalone systems I maintain. graphics/poppler, print/texlive-base, etc, built without any problems. I will try the synth patches on the builder at $WORK tomorrow.

I was so close to a solution when I wrote https://github.com/jrmarino/synth/issues/127, I only missed adding the ldconfig script to the mix. I think it would help if pkg-static could elaborate more than just saying "pkg-static: POST-INSTALL script failed". E.g. what command failed?
Comment 12 r00t 2018-05-29 07:52:40 UTC
(In reply to Trond.Endrestol from comment #10)

Thanks a lot Trond! Builds fine with the patches provided.

Synth 2.05 is out too. Looking forward to see it committed.
Comment 13 r00t 2018-05-30 07:29:29 UTC
No issues with the build of graphics/poppler (and print/texlive-base) after Synth was updated to 2.05.

Thank you all.