Download it now!
Bug 60115 - doesn't use full nss lib flags, fails to build
Summary: doesn't use full nss lib flags, fails to build
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected) rc
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: David Tardon
Whiteboard: target:4.1.0
Depends on:
Reported: 2013-01-31 10:58 UTC by Francois Tigeot
Modified: 2013-02-04 07:14 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Francois Tigeot 2013-01-31 10:58:02 UTC
On my system, the nss libs are installed in /usr/local/lib/nss

The full library flags necessary to use them are correctly returned by pkg-config and nss-config:

$ nss-config --libs
-Wl,-R/usr/local/lib/nss -L/usr/local/lib/nss -lssl3 -lsmime3 -lnss3 -lnssutil3

Howewer, the makefiles only use the -l flags, thus failing to build the library:

[build LNK] Library/
S=/usr/obj/dports/editors/libreoffice/work/libreoffice- && O=$S/solver/ && W=$S/workdir/ &&  mkdir -p $W/LinkTarget/Library/ && g++ -shared -Wl,-z,noexecstack    -Wl,-z,origin '-Wl,-rpath,$ORIGIN:$ORIGIN/../ure-link/lib' -Wl,-rpath-link,$O/lib -Wl,-rpath-link,/lib:/usr/lib -Wl,-z,combreloc  -L$S/solenv/unxdfly/lib -L$O/lib -L$S/solenv/unxdfly/lib -L/usr/local/lib  -Wl,--hash-style=gnu  -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo -Wl,-Bsymbolic-functions  -Wl,-O1   $W/CxxObject/extensions/source/config/ldap/componentdef.o $W/CxxObject/extensions/source/config/ldap/ldapaccess.o $W/CxxObject/extensions/source/config/ldap/ldapuserprofilebe.o     -Wl,--start-group  -Wl,--end-group -Wl,--no-as-needed   -lldap -llber  -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4  -luno_cppuhelpergcc3 -luno_cppu -luno_salhelpergcc3 -luno_sal -o $W/LinkTarget/Library/
/usr/libexec/binutils222/elf/ld.bfd: cannot find -lssl3
/usr/libexec/binutils222/elf/ld.bfd: cannot find -lsmime3
/usr/libexec/binutils222/elf/ld.bfd: cannot find -lnss3
/usr/libexec/binutils222/elf/ld.bfd: cannot find -lnssutil3
gmake: *** [/usr/obj/dports/editors/libreoffice/work/libreoffice-] Error 1

Adding -Wl,-R/usr/local/lib/nss -L/usr/local/lib/nss to the above command line is enough to successfully build
Comment 1 David Tardon 2013-02-04 07:09:32 UTC
The makefile should not list extra libs, but rather use nss3 external. Fixed.
Comment 2 Not Assigned 2013-02-04 07:14:38 UTC
David Tardon committed a patch related to this issue.
It has been pushed to "master":

fdo#60115 build of ldapbe2 breaks if nss is in nonstd. location

The patch should be included in the daily builds available at in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.