Security-Card-Game / seccardgamecli

Apache License 2.0
3 stars 0 forks source link

Test on a Mac #13

Closed maschmi closed 5 months ago

lisihocke commented 5 months ago

I've tried it today for release version 0.5.1 and get the following error:

dyld[50626]: Library not loaded: /usr/local/opt/openssl@3/lib/libssl.3.dylib
  Referenced from: <20B84643-C252-3706-92BA-9768FCE084B3> /Users/user/seccardgame
  Reason: tried: '/usr/local/opt/openssl@3/lib/libssl.3.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/openssl@3/lib/libssl.3.dylib' (no such file), '/usr/local/opt/openssl@3/lib/libssl.3.dylib' (no such file), '/usr/local/lib/libssl.3.dylib' (no such file), '/usr/lib/libssl.3.dylib' (no such file, not in dyld cache)
[1]    50626 abort      ./seccardgame

A rather quick and not too deep search revealed that this is not uncommon issue, e.g. see

On my system, openssl@3 is installed already, re-installing didn't help, as was exporting the path. The part most resources I came across had in common is to reinstall the library that depends on openssl@3 - the question for us would be then to figure out which one does?

maschmi commented 5 months ago

Thank you for testing and the research. I will try to set up a native cross compiled to apple silicon. I remember it did not work out of the box.

As I do not have hands on an apple silicon computer, is there a chance you can try and compile it from source? If not I will ask around at work.

lisihocke commented 5 months ago

Good idea :) Also, totally forgot to provide the environment I was testing on, oops 😅 Just ran the game locally on my M3 and it worked, didn't face any problem setting things up at all (installed rust via homebrew). So I think that's fine for the current state; I can build it and upload it to the release until we can fix cross-compilation, and alternatively people on Apple Silicon architecture can build the game locally as well. Also, good news is that on my Intel Macbook the provided build still just works without issues.

maschmi commented 5 months ago

That is great to hear. I just had a look into cross-compilation. Locally I can cross-compile to aarc64-darwin when setting the openssl to vendored as dependency for this architecture. I then had a look at the github runners and realized macOS-13 runners are the last running on x86. With adjusted runners and dependency the build works for x86_64 and aarch64 darwin (maxOS) targets. However, I cannot test it due to missing hardware. Can you test this release 0.5.2?

lisihocke commented 5 months ago

Congrats, it worked! Runs like a charm in both the Intel and the Apple Silicon versions now for Mac 🎉

maschmi commented 5 months ago

Thank you so much for testing!