Bug 172033 - Crash on launch: LibreOfficeDev daily master build (macOS)
Summary: Crash on launch: LibreOfficeDev daily master build (macOS)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
26.8.0.0 alpha0+ master
Hardware: ARM macOS (All)
: medium normal
Assignee: Patrick (volunteer)
URL:
Whiteboard: target:26.8.0
Keywords:
Depends on:
Blocks: Crash
  Show dependency treegraph
 
Reported: 2026-05-10 07:21 UTC by Sierk Bornemann
Modified: 2026-05-15 05:20 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Crashlog LibreOfficeDev-2026-05-10 (31.38 KB, text/plain)
2026-05-10 07:23 UTC, Sierk Bornemann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sierk Bornemann 2026-05-10 07:21:52 UTC
Description:
Crash on launch of LibreOfficeDev daily master build. See attached crashlog.

Occurs since 2026-05-08.
Last tested and functioning: 2026-04-28.

Steps to Reproduce:
1. Download LibreOfficeDev_26.8.0.0.alpha0_MacOS_aarch64.dmg from https://dev-builds.libreoffice.org/daily/master/
2. Open DMG and copy LibreOfficeDev.app to ~/Applications or /Applications
3. Launch LibreOfficeDev.app

Actual Results:
Crash of LibreOfficeDev.app

Expected Results:
Successful start of LibreOfficeDev.app


Reproducible: Always


User Profile Reset: No

Additional Info:
From the crashlog:

…

Termination Reason:  Namespace DYLD, Code 1, Library missing
Library not loaded: /Users/*/libfontconfig.1.dylib
Referenced from: <33EA767F-0901-3624-9CCD-6EF980787F4E> /Users/USER/*/LibreOfficeDev.app/Contents/Frameworks/libmergedlo.dylib
Reason: tried: '/Users/*/libfontconfig.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/*/libfontconfig.1.dylib' (no such file), '/Users/*/libfontconfig.1.dylib' (no such file)
(terminated at launch; ignore backtrace)

…

My guessing:

Cause seems to be in this file: Contents/Frameworks/libmergedlo.dylib

Looking into libmergedlo.dylib with otool:

% otool -L /Users/$USER/Applications/LibreOfficeDev.app/Contents/Frameworks/libmergedlo.dylib|grep libfontconfig.1.dylib
	/Users/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/workdir/UnpackedTarball/fontconfig/src/.libs/libfontconfig.1.dylib (compatibility version 18.0.0, current version 18.1.0)

--> There seems to be a hardcoded file and path in libmergedlo.dylib:
/Users/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/workdir/UnpackedTarball/fontconfig/src/.libs/libfontconfig.1.dylib , which doesn't exist  on the user's system, and so can't be found – so, the app crashes on launch.


Please investigate and fix the issue.
Comment 1 Sierk Bornemann 2026-05-10 07:23:41 UTC
Created attachment 207007 [details]
Crashlog LibreOfficeDev-2026-05-10
Comment 2 Sierk Bornemann 2026-05-10 12:54:08 UTC
(In reply to Sierk Bornemann from comment #0)

> My guessing:
> 
> Cause seems to be in this file: Contents/Frameworks/libmergedlo.dylib
> 
> Looking into libmergedlo.dylib with otool:
> 
> % otool -L
> /Users/$USER/Applications/LibreOfficeDev.app/Contents/Frameworks/libmergedlo.
> dylib|grep libfontconfig.1.dylib
> 	/Users/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/workdir/
> UnpackedTarball/fontconfig/src/.libs/libfontconfig.1.dylib (compatibility
> version 18.0.0, current version 18.1.0)
> 
> --> There seems to be a hardcoded file and path in libmergedlo.dylib:
> /Users/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/workdir/
> UnpackedTarball/fontconfig/src/.libs/libfontconfig.1.dylib , which doesn't
> exist  on the user's system, and so can't be found – so, the app crashes on
> launch.


Comparing/control test with the daily build from 2026-04-28 (Build ID 5fdf0a21d5194f949c4663475efcd3e591fc943d, does _not_ crash, _launches _succesfully_):

Version: 26.8.0.0.alpha0+ (AARCH64)
Build ID: 5fdf0a21d5194f949c4663475efcd3e591fc943d
CPU threads: 10; OS: macOS 26.4.1; UI render: Skia/Metal; VCL: osx
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

% otool -L /Users/$USER/Applications/LibreOfficeDev.app/Contents/Frameworks/libmergedlo.dylib|grep libfontconfig.1.dylib
%

->

In contrast to the current daily build for macOS aarch64, the libmergedlo.dylib of the 2026-04-28-build _lacks_ this reference to /Users/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/workdir/UnpackedTarball/fontconfig/src/.libs/libfontconfig.1.dylib, and the app does _not_ crash, launches successfully as expected.
Comment 3 Julien Nabet 2026-05-10 13:51:06 UTC
Could you tell if you find libfontconfig.1.dylib somewhere on your machine with the buggy LibreOfficeDev_26.8.0.0.alpha0_MacOS_aarch64.dmg ?
Comment 4 Sierk Bornemann 2026-05-10 17:20:36 UTC
(In reply to Julien Nabet from comment #3)
> Could you tell if you find libfontconfig.1.dylib somewhere on your machine
> with the buggy LibreOfficeDev_26.8.0.0.alpha0_MacOS_aarch64.dmg ?

OK.
This is the _buggy_ LibreOfficeDev.app:

% pwd
/Users/$USER

% find ./ -name "libfontconfig.1.dylib"
./Applications/LibreOfficeDev.app/Contents/Frameworks/libfontconfig.1.dylib

So, it seems to exist in the LibreOfficeDev.app's Framework folder. I can also see the file, if I have a look into the App contents via Finder.

Contrary:
Surprisingly, in the _working_ LibreOfficeDev.app from 2026-04-28 a libfontconfig.1.dylib seems to be absent at all, the find command does _not_ find such file in the LibreOfficeDev.app's folder, and looking reduntantly into that app's contents via Finder, libfontconfig.1.dylib is also absent.

Just for the sake of completeness, and to answer that part of your question as well:
Also installed are GIMP.app and Inkscape.app, they also have got a libfontconfig.1.dylib, but I think, this is irrelevant for this issue above concerning LibreOfficeDev.app:

/Applications/Inkscape.app/Contents/Resources/lib/libfontconfig.1.dylib
/Applications/GIMP.app/Contents/Resources/lib/libfontconfig.1.dylib.dSYM/Contents/Resources/DWARF/libfontconfig.1.dylib
/Applications/GIMP.app/Contents/Resources/lib/libfontconfig.1.dylib
Comment 5 Julien Nabet 2026-05-10 21:03:01 UTC
Sierk: thank you for the extra info.

Dan/Patrick: thought you might be interested in this one.
Comment 6 Patrick (volunteer) 2026-05-11 01:42:43 UTC
I can reproduce the crash in the 10 May 2026 nightly master build.

However, I cannot reproduce the crash in my local master build (did a git pull -r 2 or 3 hours ago) with either --enable-mergelibs=, --enable-mergelibs=yes, or --enable-mergelibs=more.

After each build, I ran the following command from my build root and I don't get any output. So, at least in my local build, libfontconfig is not getting added to libmerged:

otool -L instdir/LibreOfficeDev.app/Contents/Frameworks/libmergedlo.dylib | grep libfont

Maybe I am missing a configure option that the nightly build uses that triggers the libmerged problem?
Comment 7 Julien Nabet 2026-05-11 16:56:32 UTC
(In reply to Patrick (volunteer) from comment #6)
> ...
> Maybe I am missing a configure option that the nightly build uses that
> triggers the libmerged problem?

Taking a look at distro-configs/LibreOfficeMacOSX.conf, I noticed this:
--enable-mergelibs=more
--without-system-fontconfig

(see https://opengrok.libreoffice.org/xref/core/distro-configs/LibreOfficeMacOSX.conf?r=65f1b7351d5deccbae84156fef4c9580ac34dcb9 for the complete file)
Comment 8 Patrick (volunteer) 2026-05-12 18:06:35 UTC
OK. I did a "make distclean" and rebuilt master with the ./configure command arguments (except for the --with-external-tar or --srcdir arguments) in the following nightly build log:

https://ci.libreoffice.org/job/lo_daily_tb_mac_arm64/lastBuild/consoleFull

I can still reproduce this bug in the 12 May 2026 nightly build but not in the .dmg built with the same nightly build ./configure command arguments.

So I compared the output of "otool -L Contents/Frameworks/libmergedlo.dylib" in both installations and found the following:

-	/Users/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/workdir/UnpackedTarball/fontconfig/src/.libs/libfontconfig.1.dylib (compatibility version 18.0.0, current version 18.1.0)
+	/Volumes/LOBuilds/lode/dev/core/workdir/UnpackedTarball/fontconfig/src/.libs/libfontconfig.1.dylib (compatibility version 18.0.0, current version 18.1.0

From the above, I think the build is linking libfontconfig.1.dylib in the wrong location. The reason LibreOffice launches in my locally built .dmg is that the "/Volumes/LOBuilds/.../libfontconfig.1.dylib" path exists in my machine's build.

I would think the otool -L output should be "@loader_path/libfontconfig.1.dylib" instead of an absolute path like all of the other *.dylib files in the installation's Contents/Frameworks folder.

Let me see if I can find where the build does the @loader_path stuff. I am guessing there is a list of *.dylib files somewhere in the build that libfontconfig.1.dylib needs to be added to.
Comment 9 Patrick (volunteer) 2026-05-13 01:07:50 UTC
Found the cause: building with --enable-headless causes libfontconfig to be built.

Still need to figure out why libfontconfig is messed up in libmerged.
Comment 10 Sierk Bornemann 2026-05-13 10:51:38 UTC
(In reply to Patrick (volunteer) from comment #9)
> Found the cause: building with --enable-headless causes libfontconfig to be
> built.

I guess, this seems to be the change, which enables it:

Bug 169711 - Crash on macOS when running LibreOffice headless via Terminal without GUI
Commit Notification 2026-04-30 11:13:07 UTC
https://bugs.documentfoundation.org/show_bug.cgi?id=169711#c20

Commit Apr 30 13:12:52 2026: tdf#169711 Enable headless mode on macOS builds
https://github.com/LibreOffice/core/commit/65f1b7351d5deccbae84156fef4c9580ac34dcb9
https://gerrit.libreoffice.org/c/core/+/200535

Since this change, the crash problem above seems to occur, the commit date seems also corresponding.

Preparatory:

Commit Nov 28 20:56:03 2025: Introduce --enable-headless to add it as a possibility on macOS
https://git.libreoffice.org/core/+/5d4a689293d47c7671315452f6b90a185fe809c0%5E%21


> Still need to figure out why libfontconfig is messed up in libmerged.

+1
Comment 11 Patrick (volunteer) 2026-05-13 17:47:47 UTC
I think that I have a fix in the following patch:

https://gerrit.libreoffice.org/c/core/+/205175

But it needs review as I don't have any familiarity with the fontconfig code.
Comment 12 dcbw@libreoffice.org 2026-05-14 12:02:34 UTC
Also seems like we should figure out how to rename the dylib to libfontconfig-lo.1.dylib; I can work on that.
Comment 13 Commit Notification 2026-05-15 01:46:13 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4b3d4939f45413f66595fbbd3a8e142624373c56

tdf#172033 Run install_name_tool on libfontconfig when building macOS

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Patrick (volunteer) 2026-05-15 03:26:04 UTC
The patch got committed a little too late for the tomorrow's nightly master build, so I expect the fix to be in the 16 May nightly master build.
Comment 15 Sierk Bornemann 2026-05-15 05:20:38 UTC
(In reply to Patrick (volunteer) from comment #14)
> The patch got committed a little too late for the tomorrow's nightly master
> build, so I expect the fix to be in the 16 May nightly master build.

The fix seems to be already in the 15 May nightly master build – I've just downloaded, opened and launched:
https://dev-builds.libreoffice.org/daily/master/MacOSX-aarch64@tb94-TDF/current/LibreOfficeDev_26.8.0.0.alpha0_MacOS_aarch64.dmg from 2026-May-15 03:34

Success!

Version: 26.8.0.0.alpha0+ (AARCH64)
Build ID: 110db09e70600a9727210d9b970b8cd3f2dfcd29
CPU threads: 10; OS: macOS 26.5; UI render: Skia/Metal; VCL: osx
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

Verifying:

% otool -L /Users/$USER/Applications/LibreOfficeDev.app/Contents/Frameworks/libmergedlo.dylib|grep fontconfig
	@loader_path/libfontconfig.1.dylib (compatibility version 18.0.0, current version 18.1.0)

% cd ~/Applications/LibreOfficeDev.app
% find ./ -name "libfontconfig.1.dylib"
./Contents/Frameworks/libfontconfig.1.dylib


Seems to be OK.
Problem seems to be solved, LibreOfficeDev.app succesfully launches again.
Thank you very much Patrick and Dan!