Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libfmt.10.dylib not loaded from bottle after libfmt was upgraded #32

Open
HaHeho opened this issue Aug 28, 2024 · 4 comments
Open

libfmt.10.dylib not loaded from bottle after libfmt was upgraded #32

HaHeho opened this issue Aug 28, 2024 · 4 comments

Comments

@HaHeho
Copy link

HaHeho commented Aug 28, 2024

This prevents execution of the SSR installed via homebrew on an older version of macOS (13.6.9). Currently, I don't know where else this may occur (encountered the error for first time).

ssr-brs
dyld[34838]: Library not loaded: /usr/local/opt/fmt/lib/libfmt.10.dylib
  Referenced from: <0C317A8B-2FBE-38B8-A08B-F890749582F8> /usr/local/Cellar/ssr/0.6.1_1/bin/ssr-brs
  Reason: tried: '/usr/local/opt/fmt/lib/libfmt.10.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/fmt/lib/libfmt.10.dylib' (no such file), '/usr/local/opt/fmt/lib/libfmt.10.dylib' (no such file), '/usr/local/lib/libfmt.10.dylib' (no such file), '/usr/lib/libfmt.10.dylib' (no such file, not in dyld cache), '/usr/local/Cellar/fmt/11.0.2/lib/libfmt.10.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/fmt/11.0.2/lib/libfmt.10.dylib' (no such file), '/usr/local/Cellar/fmt/11.0.2/lib/libfmt.10.dylib' (no such file), '/usr/local/lib/libfmt.10.dylib' (no such file), '/usr/lib/libfmt.10.dylib' (no such file, not in dyld cache)
[1]    34838 abort      ssr-brs
brew info ssr
==> soundscaperenderer/ssr/ssr: stable 0.6.1 (bottled)
SoundScape Renderer: A tool for real-time spatial audio reproduction
http://spatialaudio.net/ssr/
Installed
/usr/local/Cellar/ssr/0.6.1_1 (80 files, 24.6MB) *
  Poured from bottle on 2024-08-28 at 20:09:51
From: https://github.com/SoundScapeRenderer/homebrew-ssr/blob/HEAD/Formula/ssr.rb
License: GPL-3.0-or-later
==> Dependencies
Build: pkg-config ✔
Required: asio ✔, ecasound ✔, fftw ✔, fmt ✔, jack ✔, libsndfile ✔, qt@5 ✔, SoundScapeRenderer/ssr/asdf ✔, SoundScapeRenderer/ssr/libmysofa ✔, vrpn ✔, websocketpp ✔
brew info fmt
==> fmt: stable 11.0.2 (bottled), HEAD
Open-source formatting library for C++
https://fmt.dev/
Installed
/usr/local/Cellar/fmt/11.0.2 (29 files, 1MB) *
  Poured from bottle using the formulae.brew.sh API on 2024-08-28 at 19:55:03
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/f/fmt.rb
License: MIT
==> Dependencies
Build: cmake ✘
==> Options
--HEAD
	Install HEAD version
==> Analytics
install: 15,654 (30 days), 45,283 (90 days), 206,271 (365 days)
install-on-request: 799 (30 days), 2,034 (90 days), 10,623 (365 days)
build-error: 0 (30 days)

This probably happened after libfmt was updated to v11. The directory now has:

la /usr/local/opt/fmt/lib/
total 784
drwxr-xr-x  3 helmholz  admin    96B 20 Jul 16:17 cmake
-rw-r--r--  1 helmholz  admin   177K 28 Aug 19:55 libfmt.11.0.2.dylib
lrwxr-xr-x  1 helmholz  admin    19B 20 Jul 16:17 libfmt.11.dylib -> libfmt.11.0.2.dylib
-r--r--r--  1 helmholz  admin   208K 20 Jul 16:17 libfmt.a
lrwxr-xr-x  1 helmholz  admin    15B 20 Jul 16:17 libfmt.dylib -> libfmt.11.dylib
drwxr-xr-x  3 helmholz  admin    96B 28 Aug 19:55 pkgconfig

A first try of reinstalling the SSR doesn't do anything, it seems:

brew reinstall SoundScapeRenderer/ssr/ssr
==> Fetching soundscaperenderer/ssr/ssr
==> Downloading https://github.com/SoundScapeRenderer/homebrew-ssr/releases/download/ssr-0.6.1_1/ssr-0.6.1_1.ve
Already downloaded: /Users/helmholz/Library/Caches/Homebrew/downloads/253b9797f66d6cdce99068644e87e1e19ab31c3e56e42ddccbb4e8ea98938ac9--ssr-0.6.1_1.ventura.bottle.tar.gz
==> Reinstalling soundscaperenderer/ssr/ssr
==> Pouring ssr-0.6.1_1.ventura.bottle.tar.gz
🍺  /usr/local/Cellar/ssr/0.6.1_1: 80 files, 24.6MB
==> Running `brew cleanup ssr`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
@HaHeho
Copy link
Author

HaHeho commented Aug 29, 2024

This probably happened after libfmt was updated to v11.

It makes sense that the problem is new since the bump happened on Aug 27, 2024.

On Apple M1 (macOS 14.5), the SSR still seems to work fine after updating libfmt and automatically forcing a reinstall of the SSR:

==> Reinstalling 1 dependent with broken linkage from source:
soundscaperenderer/ssr/ssr
==> Fetching soundscaperenderer/ssr/ssr
==> Downloading https://github.com/SoundScapeRenderer/ssr/releases/download/0.6.1/ssr-0.6.1.tar.gz
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/6763817/caa96a23-efc4-4a55
##################################################################################################################### 100.0%
==> Reinstalling soundscaperenderer/ssr/ssr
==> ./configure --disable-silent-rules --enable-browser-gui --enable-dynamic-asdf --enable-ecasound --enable-fudi-interface
==> make install

On another Intel Mac (macOS 13.6.9, same as the system reported first), the SSR also still seems to work just fine (I don't have a record of the update process of libfmt anymore).

@HaHeho
Copy link
Author

HaHeho commented Aug 29, 2024

I've got suspicious if the last reported system (Intel, macOS 13.6.9) was actually running the latest SSR bottle. It turned out this was true

/usr/local/Cellar/ssr/0.6.1_1 (80 files, 24MB) *
  Built from source on 2024-08-28 at 19:51:30

I forced a brew reinstall, seemingly resulting in the same version, although slightly larger file size:

/usr/local/Cellar/ssr/0.6.1_1 (80 files, 24.6MB) *
  Poured from bottle on 2024-08-29 at 14:51:28

However, this reinstalled version is now also broken with the initially reported error (Library not loaded: /usr/local/opt/fmt/lib/libfmt.10.dylib). Noticeably, the working version mentions "Built from source", whereas the non-working version says "Poured from bottle".

@HaHeho
Copy link
Author

HaHeho commented Aug 30, 2024

The installation functions when forcing a local build and not using the bottle:

brew reinstall soundscaperenderer/ssr/ssr --build-from-source
Warning: building from source is not supported!
You're on your own. Failures are expected so don't create any issues, please!
==> Fetching soundscaperenderer/ssr/ssr
==> Downloading https://github.com/SoundScapeRenderer/ssr/releases/download/0.6.1/ssr-0.6.1.tar.gz
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/6763817/caa96a23-efc
############################################################################################################### 100.0%
==> Reinstalling soundscaperenderer/ssr/ssr
==> ./configure --disable-silent-rules --enable-browser-gui --enable-dynamic-asdf --enable-ecasound --enable-fudi-inte
==> make install
🍺  /usr/local/Cellar/ssr/0.6.1_1: 80 files, 24MB, built in 2 minutes 19 seconds
==> Running `brew cleanup ssr`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /Users/helmholz/Library/Caches/Homebrew/ssr--0.6.1.tar.gz... (9.2MB)

This confirms that the problem is with the bottle. But I don't know this should be addressed. Of course a new bottle could be prepared that links libfmt v11, which would work for everyone doing a brew install and having all dependencies updated. But it would brake for users that remain on libfmt v10.

There probably is a more general solution by linking against libfmt.dylib which symlinks against whatever version is installed. Or is this too permissive?

@mgeier
Copy link
Member

mgeier commented Aug 30, 2024

I don't know ... maybe it's possible to pin the version of the dependency. I've tried that in #33.

@HaHeho HaHeho changed the title libfmt.10.dylib not loaded on macOS 13 libfmt.10.dylib not loaded from bottle after libfmt was upgraded Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants