Libreoffice present libraries not found

Dear Sirs: I'm running FreeBSD 14.1-STABLE-HBSD, installed libreoffice-24.2.5.2.pkg using pkg install When I run soffice appears the error:
Code:
ld-elf.so.1: Shared object "libuno_sal.so.3" not found, required by "oosplash"
But the missing file it's present at: /usr/local/lib/libreoffice/program
Comparing with a LibreOffice installation in another machine with Debian 12.5, the mentioned file is present at:
/usr/lib/libreoffice/
To do only a quick test, in the FreeBSD I copied the files from the original location to the location found in Debian:

sudo mkdir /usr/lib/libreoffice
sudo cp -R /usr/local/lib/libreoffice/program/* /usr/lib/libreoffice/

And the same error. I searched the error message, found:
Thread shared-libraries.66139/
This document recommends reading:
https://man.freebsd.org/cgi/man.cgi?query=ld-elf.so
https://en.wikipedia.org/wiki/Dynamic_linker
https://en.wikipedia.org/wiki/Dynamic_loading
After reading the documents, seemed that the solution consist to tell the OS where to search the libraries (correct me if wrong, initially I thought I had to modify the path to the libraries in some Libreoffice configuration file, so asking first here). I defined:

LD_LIBRARY_PATH=/usr/local/lib/libreoffice/program
LD_LIBRARY_PATH_RPATH=Y
LD_PRELOAD=/usr/local/lib/libreoffice/program

And the same error appeared again. Added the above three lines to /usr/local/bin/soffice before the last line, the error repeated.
I tried to install LibreOffice using ports but fails with many missing dependencies. I'm a FreeBSD newbie, starting to learn it, if the fix requires advanced commands, please explain, thanks in advance
 
Welcome to The FreeBSD Forums.

I can run and quit without error on FreeBSD 15.0-CURRENT:

Code:
% pkg iinfo libreoffice
libreoffice-24.2.5.2
% soffice
There's already a global menu bar...
% freebsd-version -kru ; uname -aKU
15.0-CURRENT
15.0-CURRENT
15.0-CURRENT
FreeBSD mowa219-gjp4-zbook-freebsd 15.0-CURRENT FreeBSD 15.0-CURRENT main-n271570-d6fb9f8ca344 GENERIC-NODEBUG amd64 1500023 1500023
% pkg -vv | grep -B 1 -e url -e priority
  FreeBSD-ports: {
    url             : "pkg+https://pkg.freebsd.org/FreeBSD:15:amd64/latest",
    enabled         : yes,
    priority        : 2,
--
  FreeBSD-base: {
    url             : "pkg+https://pkg.freebsd.org/FreeBSD:15:amd64/base_latest",
    enabled         : yes,
    priority        : 0,
--
  aninstaller: {
    url             : "file:////media/aninstaller/packages/FreeBSD:14:amd64",
    enabled         : no,
    priority        : 0
--
  local-poudriere: {
    url             : "file:///usr/local/poudriere/data/packages/main-default",
    enabled         : yes,
    priority        : 3
%

Try:

pkg check -B libreoffice

Code:
root@mowa219-gjp4-zbook-freebsd:~ # pkg check -B libreoffice
Checking libreoffice:   0%
(libreoffice-24.2.5.2) /usr/local/lib/libreoffice/program/libofficebean.so - required shared library libjawt.so not found
Checking libreoffice: 100%
pkg: Package database is busy while closing!
root@mowa219-gjp4-zbook-freebsd:~ #
 
Dear Cath: I ran the command you suggested, and reported hundreds of libraries missing, here an short example:
Code:
(libreoffice-24.2.5.2) /usr/local/lib/libreoffice/program/libucptdoc1lo.so - required shared library libc.so.7 not found
(libreoffice-24.2.5.2) /usr/local/lib/libreoffice/program/libunoidllo.so - required shared library libc++.so.1 not found
(libreoffice-24.2.5.2) /usr/local/lib/libreoffice/program/libunoidllo.so - required shared library libcxxrt.so.1 not found
(libreoffice-24.2.5.2) /usr/local/lib/libreoffice/program/libunoidllo.so - required shared library libm.so.5 not found
(libreoffice-24.2.5.2) /usr/local/lib/libreoffice/program/libunoidllo.so - required shared library libthr.so.3 not found

When inspecting manually the path, the files are there. I will try to download the version 15.0 you mentioned and test it, anything I will report the results. Thanks!
 
FreeBSD 14.1-STABLE-HBSD
That's OpnSense? Or HardenedBSD? Not supported here in any case.

 
If the OS and apps are on ZFS, scrub your pools.

If on UFS, run fsck -fn in single user mode. To tell whether there's a problem, without attempting repair.

… 15.0 …

For this type of existing problem with an installed port, a change to the OS is unlikely to improve the situation.

Quit the app, then:

pkg upgrade -f libreoffice
 
Dear Cath: I ran the command you suggested, and reported hundreds of libraries missing, here an short example:
Code:
(libreoffice-24.2.5.2) /usr/local/lib/libreoffice/program/libucptdoc1lo.so - required shared library libc.so.7 not found
(libreoffice-24.2.5.2) /usr/local/lib/libreoffice/program/libunoidllo.so - required shared library libc++.so.1 not found
(libreoffice-24.2.5.2) /usr/local/lib/libreoffice/program/libunoidllo.so - required shared library libcxxrt.so.1 not found
(libreoffice-24.2.5.2) /usr/local/lib/libreoffice/program/libunoidllo.so - required shared library libm.so.5 not found
(libreoffice-24.2.5.2) /usr/local/lib/libreoffice/program/libunoidllo.so - required shared library libthr.so.3 not found

When inspecting manually the path, the files are there. I will try to download the version 15.0 you mentioned and test it, anything I will report the results. Thanks!
Dear Cath: I tried the version FreeBSD 15.0 and just before switching to GUI mode, appears:
Code:
freebsd panic: malloc_init: type dmabuf with unsupported version 2020110501
I will try with the version FreeBSD 14.1, and any news I will post, thanks Cath!
 
That's OpnSense? Or HardenedBSD? Not supported here in any case.

Dear SirDice: It's HardenedBSD, ok, I will try FreeBSD 14.1 (trouble with 15.0, as explained before), thanks !
 
If the OS and apps are on ZFS, scrub your pools.

If on UFS, run fsck -fn in single user mode. To tell whether there's a problem, without attempting repair.



For this type of existing problem with an installed port, a change to the OS is unlikely to improve the situation.

Quit the app, then:

pkg upgrade -f libreoffice
Dea Cath: I ran fsck, the five phases without problem. I tried to upgrade Libreoffice, but it's up to date. I will repeat the tests with FreeBSD 14.1 and anything I will post. Thanks Cath and SirDice
 
Dear Sirs: I continued investigating, and in the following thread: Thread ld-elf-so-1-reports-missing-shared-object-library-but-the-file-exists.84189 appears:
zirias said:
Short answer: /usr/local/lib/gcc10 is missing in your library search path. Installing the gcc10 port should add it automatically. To add it manually, run ldconfig /usr/local/lib/gcc10.
So, I ran:

ldconfig /usr/local/lib/libreoffice/program/

And the message about libuno_sal.so.3 was not found dissapeared. Published this fix with the hope this can help somebody facing the problem about present libraries in another path. Thanks Cath and SirDice to providing insight in solving the problem
 
Dear Sirs: I'm running FreeBSD 14.1-STABLE-HBSD, installed libreoffice-24.2.5.2.pkg using pkg install When I run soffice appears the error:
Code:
ld-elf.so.1: Shared object "libuno_sal.so.3" not found, required by "oosplash"
But the missing file it's present at: /usr/local/lib/libreoffice/program
Comparing with a LibreOffice installation in another machine with Debian 12.5, the mentioned file is present at:
/usr/lib/libreoffice/
To do only a quick test, in the FreeBSD I copied the files from the original location to the location found in Debian:

sudo mkdir /usr/lib/libreoffice
sudo cp -R /usr/local/lib/libreoffice/program/* /usr/lib/libreoffice/

And the same error. I searched the error message, found:
Thread shared-libraries.66139/
This document recommends reading:
https://man.freebsd.org/cgi/man.cgi?query=ld-elf.so
https://en.wikipedia.org/wiki/Dynamic_linker
https://en.wikipedia.org/wiki/Dynamic_loading
After reading the documents, seemed that the solution consist to tell the OS where to search the libraries (correct me if wrong, initially I thought I had to modify the path to the libraries in some Libreoffice configuration file, so asking first here). I defined:

LD_LIBRARY_PATH=/usr/local/lib/libreoffice/program
LD_LIBRARY_PATH_RPATH=Y
LD_PRELOAD=/usr/local/lib/libreoffice/program

And the same error appeared again. Added the above three lines to /usr/local/bin/soffice before the last line, the error repeated.
I tried to install LibreOffice using ports but fails with many missing dependencies. I'm a FreeBSD newbie, starting to learn it, if the fix requires advanced commands, please explain, thanks in advance

Hey akrohn,

LibreOffice has issues with our RTLD hardening techniques. Please refer to our wiki-based documentation for further information: https://git.hardenedbsd.org/hardenedbsd/HardenedBSD/-/wikis/home#rtld-hardening

Effectively, just set the `hardening.harden_rtld` sysctl node to 0. LibreOffice will run just fine afterwards. :)
 
Did you respond with 'y' (to proceed with reinstallation)?
Yes, I answered "yes":

Code:
pkg upgrade -f libreoffice
Updating HardenedBSD repository catalogue...
HardenedBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):
Installed packages to be REINSTALLED:
libreoffice-24.2.5.2 [HardenedBSD]
Number of packages to be reinstalled: 1
Proceed with this action? [y/N]: y
[1/1] Reinstalling libreoffice-24.2.5.2...
[1/1] Extracting libreoffice-24.2.5.2: 100%
==> Running trigger: shared-mime-info.ucl
Building the Shared MIME-Info database cache
==> Running trigger: gtk-update-icon-cache.ucl
Generating GTK icon cache for /usr/local/share/icons/hicolor
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
root@pc:/home/user # soffice
ld-elf.so.1: Shared object "libuno_sal.so.3" not found, required by "oosplash"
root@pc:/home/user #
Then I execute as already said:
Code:
ldconfig /usr/local/lib/libreoffice/program/
and the error dissapears
 
Hey akrohn,

LibreOffice has issues with our RTLD hardening techniques. Please refer to our wiki-based documentation for further information: https://git.hardenedbsd.org/hardenedbsd/HardenedBSD/-/wikis/home#rtld-hardening

Effectively, just set the `hardening.harden_rtld` sysctl node to 0. LibreOffice will run just fine afterwards. :)
Hi lattera, your suggestion worked! I appended to /etc/sysctl.conf the line:
Code:
hardening.harden_rtld=0
Then rebooted and soffice opened successfully. Thanks!

 
Back
Top