Skip to content

rpath handling broken on macos #135

@annacrombie

Description

@annacrombie

This can be obeserved in muon itself when linking to a shared libpkgconf.

curl -L -o build/pkgconf-1.9.3.tar.gz https://github.com/pkgconf/pkgconf/archive/refs/tags/pkgconf-1.9.3.tar.gz
tar xvf build/pkgconf-1.9.3.tar.gz
mv pkgconf-pkgconf-1.9.3 subprojects/pkgconf
./bootstrap build
build/muon-bootstrap setup -Dforce_fallback_for=libpkgconf -Dpkgconf:default_library=shared build
build/muon
dyld[9197]: Library not loaded: subprojects/pkgconf/libpkgconf.dylib
  Referenced from: <7D7F9F2E-DD77-3D69-BC4B-91912578DE31> /Users/lattis/.local/src/muon/build/muon
...

I believe the main thing is that we need to add -install-name @rpath/xxx to the link line of libpkgconf.dylib.

Also it would be nice to support @loader_path rather than just a hardcoded path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions