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

[libb2] Fix using absolute install name in arm64-osx-dynamic triple #31720

Closed

Conversation

liviaerxin
Copy link
Contributor

Fix #31719:

  • [ x] Changes comply with the maintainer guide
  • [ x] SHA512s are updated for each updated download
  • [ x] The "supports" clause reflects platforms that may be fixed by this new version
  • [ x] Any fixed CI baseline entries are removed from that file.
  • [x ] Any patches that are no longer applied are deleted from the port's directory.
  • [ x] The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • [ x] Only one version is added to each modified port's versions file.

@liviaerxin liviaerxin changed the title Fix [libb2] uses absolute install name in arm64-osx-dynamic triple [libb2] Fix using absolute install name in arm64-osx-dynamic triple May 31, 2023
@jimwang118 jimwang118 added the category:port-bug The issue is with a library, which is something the port should already support label May 31, 2023
@jimwang118
Copy link
Contributor

Thank you for mentioning this PR, our ci does not have a corresponding machine to test this change, so please make sure that the local test is ok.

@liviaerxin
Copy link
Contributor Author

You're welcome. I understand that CI may not be able to test this particular change. Here're some test steps, if anyone has arm64-osx machine. Feel free to expand upon it:

vcpkg remove libb2:arm64-osx-dynamic
vcpkg install libb2 --host-triplet=arm64-osx-dynamic --triplet=arm64-osx-dynamic --no-binarycaching

Expected Result:

❯ otool -L /opt/vcpkg/packages/libb2_arm64-osx-dynamic/lib/libb2.dylib
/opt/vcpkg/packages/libb2_arm64-osx-dynamic/lib/libb2.dylib:
	@rpath/libb2.1.dylib (compatibility version 2.0.0, current version 2.4.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)

and includes @loader_path as its @rpath.

❯ otool -l /opt/vcpkg/packages/libb2_arm64-osx-dynamic/lib/libb2.dylib | grep -A5 LC_RPATH
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)

@dg0yt
Copy link
Contributor

dg0yt commented Jun 1, 2023

Before adding so much osx rpath code to a single port, it should be checked if this is a general problem, i.e. if it needs a general hook. The situation reminds me of what z_vcpkg_fixup_rpath_in_dir does for the x64-linux-dynamic triplet.

@dg0yt
Copy link
Contributor

dg0yt commented Jun 1, 2023

Related: #31681.

@liviaerxin
Copy link
Contributor Author

CMake project, like QT, has already set such @rpath when install. I found these issues when installing QT in arm64 osx, other dependencies *.dylib have @rpath as expected.

It's good to have a general hook function(like fixup_bundle() from cmake) to fix the @rpath when install.

Thanks for your mentions. I'll look for what z_vcpkg_fixup_rpath_in_dir does.

@jimwang118 jimwang118 added the info:reviewed Pull Request changes follow basic guidelines label Jun 2, 2023
@BillyONeal
Copy link
Member

Thanks for your mentions. I'll look for what z_vcpkg_fixup_rpath_in_dir does.

Thanks for looking!

I think the crux of this issue is that we never really should have added osx-dynamic for the same reason we resisted adding linux-dynamic for a long time: that we can build the thing but we know the resulting output won't run. We added linux-dynamic only at the same time z_vcpkg_fixup_rpath_in_dir made that triplet function in the vast majority of cases. Notably, what z_vcpkg_fixup_rpath_in_dir does is applied to all ports, not on a per-port basis.

@liviaerxin I think we have 3 paths forward here:

  1. Please take a look at how z_vcpkg_fixup_rpath_in_dir works, and let us know that:
    a. the same strategy works for macos, so we should do that, or
    b. the same strategy does not work for macos, for ~reasons~
  2. Indicate that you are not interested in investigating that for us :)

I setting this to draft status to mark that the ball's in your court. :) Please mark ready for review when you've chosen 1a, 1b, or 2.

@BillyONeal BillyONeal marked this pull request as draft June 8, 2023 20:27
@BillyONeal BillyONeal removed info:reviewed Pull Request changes follow basic guidelines requires:discussion labels Jun 8, 2023
@liviaerxin
Copy link
Contributor Author

liviaerxin commented Jun 11, 2023

Thanks for your mentions. I'll look for what z_vcpkg_fixup_rpath_in_dir does.

Thanks for looking!

I think the crux of this issue is that we never really should have added osx-dynamic for the same reason we resisted adding linux-dynamic for a long time: that we can build the thing but we know the resulting output won't run. We added linux-dynamic only at the same time z_vcpkg_fixup_rpath_in_dir made that triplet function in the vast majority of cases. Notably, what z_vcpkg_fixup_rpath_in_dir does is applied to all ports, not on a per-port basis.

@liviaerxin I think we have 3 paths forward here:

  1. Please take a look at how z_vcpkg_fixup_rpath_in_dir works, and let us know that:
    a. the same strategy works for macos, so we should do that, or
    b. the same strategy does not work for macos, for reasons
  2. Indicate that you are not interested in investigating that for us :)

I setting this to draft status to mark that the ball's in your court. :) Please mark ready for review when you've chosen 1a, 1b, or 2.

Hello @BillyONeal, I've used an approach as 1a does to try to fix install_name and rpath problems for triplet osx-dynamic on all ports generally. And I have done tests on some shared libraries with that kind of known issue. Here is one test on icu:

Before fix(vcpkg of commit idafbb37cfd648335fd980f6fb7dbc2d0c84c009cf):

❯ otool -L /opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/*dylib
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicudata.72.1.dylib:
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicudata.72.dylib:
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicudata.dylib:
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicui18n.72.1.dylib:
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicui18n.72.dylib:
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicui18n.dylib:
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuio.72.1.dylib:
	@rpath/libicuio.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuio.72.dylib:
	@rpath/libicuio.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuio.dylib:
	@rpath/libicuio.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicutu.72.1.dylib:
	@rpath/libicutu.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicutu.72.dylib:
	@rpath/libicutu.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicutu.dylib:
	@rpath/libicutu.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuuc.72.1.dylib:
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuuc.72.dylib:
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuuc.dylib:
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)

❯ otool -l /opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/*dylib | grep -A3 LC_RPATH

❯ ~/Documents/dlopen_test.out /opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuuc.72.dylib
dlopen(/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuuc.72.dylib, 0x0001): Library not loaded: @rpath/libicudata.72.dylib
  Referenced from: <4A737B11-73EC-33E2-87E3-8AA577A9EDD3> /opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuuc.72.1.dylib
  Reason: tried: '/System/Volumes/Preboot/Cryptexes/OS@rpath/libicudata.72.dylib' (no such file), '/usr/local/lib/libicudata.72.dylib' (no such file), '/usr/lib/libicudata.72.dylib' (no such file, not in dyld cache)
dlopen sample%                                                                                         

Here we see /opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicutu.72.dylib has flaws on its dependent libicuuc.72.dylib and libicudata.72.dylib.

After fix:

❯ otool -L /opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/*dylib
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicudata.72.1.dylib:
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicudata.72.dylib:
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicudata.dylib:
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicui18n.72.1.dylib:
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicui18n.72.dylib:
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicui18n.dylib:
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuio.72.1.dylib:
	@rpath/libicuio.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuio.72.dylib:
	@rpath/libicuio.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuio.dylib:
	@rpath/libicuio.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicutu.72.1.dylib:
	@rpath/libicutu.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicutu.72.dylib:
	@rpath/libicutu.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicutu.dylib:
	@rpath/libicutu.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicui18n.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuuc.72.1.dylib:
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuuc.72.dylib:
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuuc.dylib:
	@rpath/libicuuc.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	@rpath/libicudata.72.dylib (compatibility version 72.0.0, current version 72.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)

❯ otool -l /opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/*dylib | grep -A3 LC_RPATH
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicudata.72.dylib:
--
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicudata.dylib:
--
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicui18n.72.1.dylib:
--
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicui18n.72.dylib:
--
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicui18n.dylib:
--
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuio.72.1.dylib:
--
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuio.72.dylib:
--
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuio.dylib:
--
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicutu.72.1.dylib:
--
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicutu.72.dylib:
--
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicutu.dylib:
--
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuuc.72.1.dylib:
--
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuuc.72.dylib:
--
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)
/opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuuc.dylib:
--
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)

❯ ~/Documents/dlopen_test.out /opt/vcpkg/packages/icu_arm64-osx-dynamic/lib/libicuuc.72.dylib
dlopen sample%

Now I have no idea to do tests on all ports easily. Could you recommend some ways?

Meanwhile, need I open a new PR for this general fix?

Thank you in advance!

@liviaerxin
Copy link
Contributor Author

Thanks for the suggestions!

I've submitted PR: #32200 (method 1a)to solve these issues generally that can be applied to all ports by taking ideas from z_vcpkg_fixup_rpath_in_dir .

Hope arm64-osx-dynamic can be introduced into official triplets upon this fixup.

@jimwang118
Copy link
Contributor

Note: I will be converting your PR to draft status. When your submitted PR 32200 is merged, please revert to "ready for review". That way, I will mark this PR as reviewed.

@jimwang118 jimwang118 marked this pull request as draft June 26, 2023 01:39
@liviaerxin
Copy link
Contributor Author

Note: I will be converting your PR to draft status. When your submitted PR 32200 is merged, please revert to "ready for review". That way, I will mark this PR as reviewed.

Thanks!

@jimwang118
Copy link
Contributor

@liviaerxin Thanks for your PR, Is work still being done for this PR?

@liviaerxin
Copy link
Contributor Author

Still in progress, as #32200 gets some feedback nowadays.

@jimwang118
Copy link
Contributor

@liviaerxin Thanks for your PR, Is work still being done for this PR?

@jimwang118
Copy link
Contributor

Closing this PR since it seems that no progress is being made. Please ping us to reopen if work is still being done.

@jimwang118 jimwang118 closed this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[libb2] uses wrong install name in arm64-osx-dynamic triplet
5 participants