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

build seems broken on Apple Silicon #5

Open
mrdomino opened this issue May 23, 2024 · 2 comments
Open

build seems broken on Apple Silicon #5

mrdomino opened this issue May 23, 2024 · 2 comments

Comments

@mrdomino
Copy link

When I follow the build instructions in the README, I wind up with a /usr/local/bin/passgen that does this when I run it:

% passgen
dyld[38396]: Library not loaded: @rpath/libpassgen.dylib
  Referenced from: <D3A13DA0-902F-316C-BA8F-5258C7A33D48> /usr/local/bin/passgen
  Reason: no LC_RPATH's found
zsh: abort      passgen

It has been a while since I knew all that much about OS X's rpath, but I'm led to believe that passgen would need to include an LC_RPATH in the executable somehow.

@xfbs
Copy link
Owner

xfbs commented May 29, 2024

I'll give this a try. Normally, when you do make install, CMake should automatically fix the RPATH stuff. How did you install it, did you use cmake --install or make install?

Otherwise, you could try setting -DPASSGEN_STATIC=ON when you initialize CMake. Then you won't need an RPATH because Passgen will be a static binary.

Ideally, I'd like to build and release macOS binaries, or maybe have a working Homebrew cask or something to make it easy to install on macOS.

@mrdomino
Copy link
Author

I get a binary that dies in the way I described regardless of whether by make install or cmake --install. Fwiw I'm using macports cmake 3.29.3.

Unfortunately, it fails in a different way with -DPASSGEN_STATIC=ON:

[ 71%] Linking C executable passgen
ld: library not found for -lcrt0.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)

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