Bug 60115 - ldapbe2.uno.so doesn't use full nss lib flags, fails to build
Summary: ldapbe2.uno.so doesn't use full nss lib flags, fails to build
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.0.0.2 rc
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: David Tardon
URL:
Whiteboard: target:4.1.0
Keywords:
Depends on:
Blocks:
 
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:


Attachments

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 ldapbe2.uno.so makefiles only use the -l flags, thus failing to build the library:

[build LNK] Library/ldapbe2.uno.so
S=/usr/obj/dports/editors/libreoffice/work/libreoffice-4.0.0.2 && O=$S/solver/unxdfly.pro && W=$S/workdir/unxdfly.pro &&  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/ldapbe2.uno.so
/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-4.0.0.2/workdir/unxdfly.pro/LinkTarget/Library/ldapbe2.uno.so] Error 1



Adding -Wl,-R/usr/local/lib/nss -L/usr/local/lib/nss to the above command line is enough to successfully build ldapbe2.uno.so
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":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=423079fd4db3163f66ab38d053f60eeec1afc2e7

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



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