poseidon-framework / poseidon-hs

A toolset to work with modular genotype databases in the Poseidon format
https://poseidon-framework.github.io/#/trident
MIT License
7 stars 2 forks source link

trident v1.4.1.0 segmentation fault on mac OS #296

Closed joshuamschmidt closed 5 months ago

joshuamschmidt commented 5 months ago

Possibly related to #279, however that appears to be apple silicon specific. #46 seems to be unrelated issue of macOS security.

I encounter a segmentation fault with the binary relase of trident:

curl -L -o trident 'https://github.com/poseidon-framework/poseidon-hs/releases/download/v1.4.1.0/trident-macOS'
chmod +x trident
./trident --version
[1]    6248 segmentation fault  ./trident --version

This is not a problem with xerxes:

curl -L -o xerxes 'https://github.com/poseidon-framework/poseidon-analysis-hs/releases/download/v1.0.1.0/xerxes-macOS'
chmod +x xerxes
./xerxes --version
xerxes v1.0.1.0 for poseidon v2.5.0, v2.6.0, v2.7.0, v2.7.1
https://poseidon-framework.github.io

1.0.1.0

conda install also segfaults:

mamba install bioconda::poseidon-trident
trident
[1]    5186 segmentation fault  trident

Architecture: 2 GHz Quad-Core Intel Core i5 macOS 14.4.1

stschiff commented 5 months ago

I cannot reproduce this on my M1 Mac. We're looking into it. Thanks for reporting!

nevrome commented 5 months ago

I prepared a new trident release today with a completely overhauled release pipeline:

https://github.com/poseidon-framework/poseidon-hs/releases/tag/v1.5.0.0

In the process I learned that the executable compression we previously ran with UPX is not compatible with macOS Ventura and above. Maybe that is the reason why you could not run trident on macOS 14.4.1, @joshuamschmidt.

Maybe you could test the new release executable. And maybe you as well, @stschiff. Are you still running an older macOS version?

joshuamschmidt commented 5 months ago

thanks @nevrome and @stschiff. Unfortunately, I still get an error, albeit now it is cpu compatibility:

rm trident
curl -L -o trident 'https://github.com/poseidon-framework/poseidon-hs/releases/download/v1.5.0.0/trident-macOS'
chmod +x trident
./trident --version
zsh: bad CPU type in executable: ./trident
nevrome commented 5 months ago

That is progress. I used the GitHub runner macos-latest (atm. macos-14) for this build, which seems to use an M1 processor. Maybe I could add another build on macos-13 to also cover an intel-based architecture?

But before I do so I would like to be sure that the current executable at least runs on an M1 computer.

I also read that there are compatibility tools by Apple (Rosetta?) to solve this issue on the user side. Would this also work here?

stschiff commented 5 months ago

I checked, and the newest Mac release runs on my M1!

nevrome commented 5 months ago

Alright - I prepared a new release: https://github.com/poseidon-framework/poseidon-hs/releases/tag/v1.5.0.1

I think the new -X64 executable will work on the older Intel macOS computers. At least it did on my girlfriend's MacBook.

Please give it another spin, @joshuamschmidt.

joshuamschmidt commented 5 months ago

@nevrome happy to report success too. Thanks.

nevrome commented 5 months ago

Excellent! I'll consider this solved for now. We'll propagate this change to the conda version as well eventually.

stschiff commented 5 months ago

Also just checked, the new X64 exec works on Intel-Chips. Thanks!