Running on Apple M1 Silicone
LainShot opened this issue · 3 comments
I appreciate that this is most likely not an issue with this LIB but I am hoping someone can see if I have made any obvious errors.
I installed home-brew and everything like X11 was compiled from source for M1. I am then trying to compile the example using the following GCC command. This is where I think the issue is but I cant for the life of me work out what the issue is.
gcc program.c -v -I /opt/homebrew/include/ -I /opt/homebrew/opt/xorgproto/include/ -I /opt/homebrew/lib/ -I /opt/homebrew -lm -lX11 /opt/homebrew/Cellar/libx11/1.7.0/lib/libX11.6.dylib
I have been trying to get this to run now for over 5 hours so if its something obvious then I will cry my self to sleep.
What I cant understand is why it cant find symbols for ARM64 when all the libs were compiled on this machine.
Any help is appreciated
I have now got it to compile. I had to do the following
sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/* /usr/local/include/
this adds back C headers because apple removed them/ moved them 😎
Then it seems I was using the LM part of my gcc wrong.
gcc program.c -v -I /opt/homebrew/include/ -I /opt/homebrew/opt/xorgproto/include/ -I /opt/homebrew/lib/ -I /opt/homebrew -LM /opt/homebrew/Cellar/libx11/1.7.0/lib/libX11.6.dylib -lX11 -o simple
With it setup like this is now has compiled I need to setup X11 forwarding over SSH to test but will update tomorrow but now I must sleep.
Okay well who needs sleep.
I have got it setup and running and will do more tests tomorrow if all is well I will close the issue.
@cnlohr rawdraw can run on M1 not sure if i am the first person to do this but there you go.
Fully tested and working I will now close this issue.