pret / agbcc

C compiler
104 stars 75 forks source link

Segfault when building on Mac with M1 #43

Open PikalaxALT opened 2 years ago

PikalaxALT commented 2 years ago

Segfault seems to be specific to Macs with M1 Tried to ./build.sh on three differents macs running Big Sur 11.4, had no success with the M1 one (segfault 11)

Originally posted by @TGFbSMAD in https://github.com/pret/agbcc/issues/38#issuecomment-875438895

PikalaxALT commented 2 years ago

@TGFbSMAD please reply to this issue with additional details. What does the script try to do immediately before the segfault?

TGFbSMAD commented 2 years ago

Where it start :

Capture d’écran 2021-07-07 à 14 06 30

End of the script :

Capture d’écran 2021-07-07 à 14 06 05

Using the agbcc from https://github.com/pizza2004/agbcc

ScottNortonPhD commented 2 years ago

It seems you're using a different, third-party fork of agbcc. Could you verify please that the same issue occurs on this fork as well?

TGFbSMAD commented 2 years ago

Using the pret abcc leads to another error which has been fixed by pizza2004’s fork. I think that the same error would occure if the fix was applied here.

Manurocker95 commented 2 years ago

So... still no fix for M1? :(

PikalaxALT commented 2 years ago

So... still no fix for M1? :(

We would need for one of the devs to obtain an M1 Mac before work can begin on this. As such, there is no timeline to fix this.

Manurocker95 commented 2 years ago

So... still no fix for M1? :(

We would need for one of the devs to obtain an M1 Mac before work can begin on this. As such, there is no timeline to fix this.

Do you know if there was any new about this?

luckytyphlosion commented 2 years ago

This actually might have been resolved, according to a post made by pfero in the Discord:

Update on M1 support: Turns out it was a confusion with different components being installed under rosetta and not. Please make sure to install everything under rosetta, including devkitpro and homebrew+libpng (which should be installed in /usr/local, not /opt/homebrew). Building natively/without rosetta isn't properly supported yet, more info if you'd like to help can be found at: https://discord.com/channels/442462691542695948/442465020291317760/897562585195499620 You'll need to join the Discord to view that link.

tkolarik commented 2 years ago

I am still having the same issue, How can I ensure I am installing everything under rosetta?

tkolarik commented 2 years ago

Following these steps and installing libpng under rosetta fixed it for me https://indiespark.top/software/run-command-line-apple-silicon/

holmesmr commented 2 years ago

There's confirmation that the changes in the above PR (#52) resolve this issue.

thomason-jesse commented 1 year ago

Additional confirmation that the referenced PR (#52) resolves this issue; just came here with it and found this solution. Seems like it's not merged into main yet