/usr/lib/libnss3.so: version `NSS_3.19.1' not found

Michael Stahl mstahl at redhat.com
Tue May 24 12:55:31 UTC 2016


On 14.05.2016 15:37, YuGiOhJCJ Mailing-List wrote:
> Hello,
> 
> I am unable to build libreoffice 5.1.2.2 on Slackware 14.1:
> ---
> $ ./autogen.sh --prefix=/opt/libreoffice-5.1.2.2 \
>  --without-doxygen \
>  --without-junit \
>  --with-external-tar=/tmp/build/libreoffice/libreoffice-5.1.2.2-tar \
>  --disable-gtk \
>  --enable-gtk3 \
>  --disable-tde \
>  --disable-kde4 \
>  --disable-randr \
>  --without-java
> $ make
> [...]
> [build DEP] LNK:CppunitTest/libtest_writerperfect_stream.so
> [build LNK] CppunitTest/libtest_writerperfect_stream.so
> DynamicLibraryManagerException: "Failed to load dynamic library: /tmp/build/libreoffice/libreoffice-5.1.2.2/workdir/LinkTarget/CppunitTest/libtest_oox_tokenmap.so
> /usr/lib/libnss3.so: version `NSS_3.19.1' not found (required by /tmp/build/libreoffice/libreoffice-5.1.2.2/instdir/program/libssl3.so)"
> Path is '/bin:/sbin:/usr/bin:/usr/sbin:/usr/games:/usr/local/bin:/usr/local/sbin:/usr/local/games:/home/yugiohjcj/.cabal/bin:/home/yugiohjcj/fpc-2.4.2/bin:/home/yugiohjcj/documents/downloads/software/eclipse-standard-luna-R-linux-gtk:/home/yugiohjcj/documents/downloads/software/eclipse-modeling-luna-R-linux-gtk:/home/yugiohjcj/documents/downloads/software/eclipse-modeling-juno-SR1-linux-gtk:/home/yugiohjcj/documents/downloads/software/kermeta-1.4.1-galileo-linux_x86:/home/yugiohjcj/documents/downloads/software/apache-ant-1.9.4/bin:/home/yugiohjcj/apps/maven/apache-maven-3.0-SNAPSHOT/bin:/home/yugiohjcj/documents/downloads/software/WTK2.5.2/bin:/home/yugiohjcj/bin:/home/yugiohjcj/mvn/bin:/opt/texlive/2015/bin/i386-linux'
> 
> Error: a unit test failed, please do one of:
> make CppunitTest_oox_tokenmap CPPUNITTRACE="gdb --args"
>     # for interactive debugging on Linux
> make CppunitTest_oox_tokenmap VALGRIND=memcheck
>     # for memory checking
> make CppunitTest_oox_tokenmap DEBUGCPPUNIT=TRUE
>     # for exception catching
> 
> make[1]: *** [/tmp/build/libreoffice/libreoffice-5.1.2.2/workdir/CppunitTest/oox_tokenmap.test] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make: *** [build] Error 2
> ---
> 
> It seems to be a problem with libnss3 because I can see:
> /usr/lib/libnss3.so: version `NSS_3.19.1' not found (required by /tmp/build/libreoffice/libreoffice-5.1.2.2/instdir/program/libssl3.so)
> 
> I thought that the libnss3 version installed on my system was not the good one.
> Well, I have the mozilla-nss-3.15.2 package installed on my system containing the /usr/lib/libnss3.so library:
> $ ldd /usr/lib/libnss3.so 
> 	libnssutil3.so => /usr/lib/libnssutil3.so (0xb75d4000)
> 	libplc4.so => /usr/lib/libplc4.so (0xb75cf000)
> 	libplds4.so => /usr/lib/libplds4.so (0xb75cb000)
> 	libnspr4.so => /usr/lib/libnspr4.so (0xb758d000)
> 	libpthread.so.0 => /lib/libpthread.so.0 (0xb7537000)
> 	libdl.so.2 => /lib/libdl.so.2 (0xb7532000)
> 	libc.so.6 => /lib/libc.so.6 (0xb73a7000)
> 	libz.so.1 => /usr/lib/libz.so.1 (0xb7391000)
> 	librt.so.1 => /lib/librt.so.1 (0xb7388000)
> 	/lib/ld-linux.so.2 (0xb7745000)
> 
> On the bug tracker [1], Eike Rathke asked me to check what ldd instdir/program/libssl3.so gives and that it should list instdir/program/libnss3.so instead of /usr/lib/libnss3.so.
> Indeed:
> $ ldd instdir/program/libssl3.so 
> 	libnss3.so => /tmp/build/libreoffice/libreoffice-5.1.2.2/instdir/program/libnss3.so (0xb7562000)
> 	libnssutil3.so => /tmp/build/libreoffice/libreoffice-5.1.2.2/instdir/program/libnssutil3.so (0xb7536000)
> 	libplc4.so => /tmp/build/libreoffice/libreoffice-5.1.2.2/instdir/program/libplc4.so (0xb7531000)
> 	libplds4.so => /tmp/build/libreoffice/libreoffice-5.1.2.2/instdir/program/libplds4.so (0xb752c000)
> 	libnspr4.so => /tmp/build/libreoffice/libreoffice-5.1.2.2/instdir/program/libnspr4.so (0xb74e3000)
> 	libpthread.so.0 => /lib/libpthread.so.0 (0xb748e000)
> 	libdl.so.2 => /lib/libdl.so.2 (0xb7489000)
> 	libc.so.6 => /lib/libc.so.6 (0xb72fe000)
> 	libz.so.1 => /usr/lib/libz.so.1 (0xb72e7000)
> 	librt.so.1 => /lib/librt.so.1 (0xb72de000)
> 	/lib/ld-linux.so.2 (0xb76f9000)
> 
> So, yeah I guess that upgrading the libnss3 version installed on my system is not necessary because the one used here seems to be the version provided by libreoffice.
> 
> Any idea what could be the problem?

that's odd - the only thing that comes to mind is that some library is
being loaded that uses nss but doesn't have RPATH $ORIGIN in it, so it
loads the system one.

i hope this is none of LO's libraries, in a master build with a week old
sources i get this which looks fine:

> for elf in instdir/program/*.so* ; do readelf -d $elf | grep NEEDED | grep nss && echo $elf && readelf -d $elf | grep RPATH ; done
> readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
>  0x0000000000000001 (NEEDED)             Shared library: [libnss3.so]
>  0x0000000000000001 (NEEDED)             Shared library: [libnssutil3.so]
> instdir/program/libcurl.so.4
>  0x000000000000000f (RPATH)              Library rpath: [$ORIGIN]
>  0x0000000000000001 (NEEDED)             Shared library: [libnss3.so]
> instdir/program/libldapbe2lo.so
>  0x000000000000000f (RPATH)              Library rpath: [$ORIGIN]
>  0x0000000000000001 (NEEDED)             Shared library: [libnssutil3.so]
> instdir/program/libnss3.so
>  0x000000000000000f (RPATH)              Library rpath: [$ORIGIN]
>  0x0000000000000001 (NEEDED)             Shared library: [libnssutil3.so]
> instdir/program/libnssdbm3.so
>  0x000000000000000f (RPATH)              Library rpath: [$ORIGIN]
>  0x0000000000000001 (NEEDED)             Shared library: [libnss3.so]
> instdir/program/libooxlo.so
>  0x000000000000000f (RPATH)              Library rpath: [$ORIGIN]
>  0x0000000000000001 (NEEDED)             Shared library: [libnss3.so]
> instdir/program/libpostgresql-sdbc-impllo.so
>  0x000000000000000f (RPATH)              Library rpath: [$ORIGIN]
> readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
>  0x0000000000000001 (NEEDED)             Shared library: [libnss3.so]
>  0x0000000000000001 (NEEDED)             Shared library: [libnssutil3.so]
> instdir/program/libsmime3.so
>  0x000000000000000f (RPATH)              Library rpath: [$ORIGIN]
>  0x0000000000000001 (NEEDED)             Shared library: [libnssutil3.so]
> instdir/program/libsoftokn3.so
>  0x000000000000000f (RPATH)              Library rpath: [$ORIGIN]
>  0x0000000000000001 (NEEDED)             Shared library: [libnss3.so]
>  0x0000000000000001 (NEEDED)             Shared library: [libnssutil3.so]
> instdir/program/libssl3.so
>  0x000000000000000f (RPATH)              Library rpath: [$ORIGIN]
> readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
> readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
> readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
> readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
> readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
>  0x0000000000000001 (NEEDED)             Shared library: [libnss3.so]
> instdir/program/libvcllo.so
>  0x000000000000000f (RPATH)              Library rpath: [$ORIGIN]
> readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
>  0x0000000000000001 (NEEDED)             Shared library: [libnss3.so]
> instdir/program/libxsec_xmlsec.so
>  0x000000000000000f (RPATH)              Library rpath: [$ORIGIN]

but it could be some system library that is loaded *before* the first of
LO's libraries that needs NSS is loaded - then the system NSS is loaded
and glibc's loader will not search again for another library with the
same SONAME.

you could try to trace this to see how the system libnss3.so gets loaded

LD_DEBUG=libs instdir/program/soffice

LD_DEBUG=libs make CppunitTest_oox_tokenmap




More information about the LibreOffice mailing list