mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
Brotli's dynamic library files use @loader_path within instead of full path #402
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kiracus on GitHub (Oct 17, 2021).
I notice this issue when run
brew install mpv --HEADSince recent change from homebrew,
jpeg-xlbecomes one of dependencies ofaom,ffmpeg,mpv, and sincebrotliis part ofjpeg-xl, so I notice this issue during bulidingmpvThe error during building
mpvisso I dig into the builing script itself.
it seems the building script will run
to get the path for all dependencies' dynamic library files
Every other dynamic library works well, execpet for
libbrotlidec.1.dylibandlibbrotlienc.1.dylibthose outputs are
and
The issue is very similar with this stackoverflow thread.
And a workaround is fixing
libbrotlidec.1.dylibandlibbrotlienc.1.dylibbyAfter applying the workaround, the building script works fine.
I check homebrew's installation script for
brotliand I don't think anything seems broken from homebrew side.Is there anything
brotliteam could take a look at it? Would you mind always using the full path?Thanks
@KeaterCai commented on GitHub (Nov 1, 2021):
I am also confront with the same problem when creating bundle of
mpv. Thanks for your fixing.@geraldcombs commented on GitHub (Aug 19, 2022):
For the people running into this issue: Are you building using CMake?
If so, the problem comes down to brotli's
CMakeLists.txtand the behavior of older versions of CMake. Prior to version 2.8.12, CMake generated dylibs on macOS with bare install names. CMake 2.8.12 and later prepend the install name with "@rpath/", which provides much more flexibility.I can replicate this here with Brotli 1.0.9:
If I change
cmake_minimum_required(VERSION 2.8.6)inCMakeLists.txttocmake_minimum_required(VERSION 3.0)it creates a more usable library:@eustas commented on GitHub (Jan 6, 2023):
Thanks for investigation and fix.
And now CMake minimum version is 3.10.4 =)