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

LC_ID_DYLIB of Mac prebuild dylib (maybe) is wrong #4840

Closed
potatojuicemachine opened this issue Dec 1, 2020 · 1 comment
Closed

LC_ID_DYLIB of Mac prebuild dylib (maybe) is wrong #4840

potatojuicemachine opened this issue Dec 1, 2020 · 1 comment

Comments

@potatojuicemachine
Copy link

potatojuicemachine commented Dec 1, 2020

In the MACOSX prebuild the LC_ID_DYLIB of the RPATH of the libz3.dylib is (maybe) wrong.

if I look at the dylib with otool -l libz3.dylib it shows

Load command 3
cmd LC_ID_DYLIB
cmdsize 40
name libz3.dylib (offset 24)
time stamp 1 Thu Jan  1 01:00:01 1970
current version 0.0.0
compatibility version 0.0.0

Instead it should be like this

Load command 3
cmd LC_ID_DYLIB
cmdsize 40
name @rpath/libz3.dylib (offset 24)
time stamp 1 Thu Jan  1 01:00:01 1970
current version 0.0.0
compatibility version 0.0.0

If I try to link libz3.dylib into a executable, the rpath of the executable isn't correctly set and it can't find the libz3.dylib at runtime.

This only happens with the prebuilds and not if I build it locally.

I wrote maybe because im not sure if this behavior is intentionally.

Edit:
Refactored code to multiline

@NikolajBjorner
Copy link
Contributor

I am unsure what to do with this report.
The source for the pre-builds is in the scripts directory.
The release.yml calls the mk_unix_dist.py script for MacOS.
You can run these scripts on your own and observe how it creates makefiles and then feel free to upload a pull request with what you deem is a fix. I am not sure whether this has impacted any Mac users.

arbipher added a commit to arbipher/z3 that referenced this issue Oct 25, 2021
NikolajBjorner pushed a commit that referenced this issue Oct 25, 2021
* Add path flags for cc loader (linux).

* Fix os linking and loading problem (maybe on #4840).

* Add post-install test of OCaml binding on ubuntu.

* Minor.

* Tentative CI for macos.
NikolajBjorner pushed a commit that referenced this issue Oct 25, 2021
* Add path flags for cc loader (linux).

* Fix os linking and loading problem (maybe on #4840).
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