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

Running on Apple M1 Silicone #48

Closed
LainShot opened this issue Dec 23, 2020 · 3 comments
Closed

Running on Apple M1 Silicone #48

LainShot opened this issue Dec 23, 2020 · 3 comments

Comments

@LainShot
Copy link

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

Screenshot 2020-12-23 at 01 07 50

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

@LainShot
Copy link
Author

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.

@LainShot
Copy link
Author

LainShot commented Dec 23, 2020

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.

Screenshot 2020-12-23 at 02 00 13

@cnlohr rawdraw can run on M1 not sure if i am the first person to do this but there you go.

Screenshot 2020-12-23 at 02 04 25

@LainShot
Copy link
Author

Fully tested and working I will now close this issue.

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

1 participant