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
The makefile should not list extra libs, but rather use nss3 external. Fixed.
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.