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

Apple Silicon M1 compatibility #28

Open
n3d1117 opened this issue Apr 16, 2021 · 8 comments
Open

Apple Silicon M1 compatibility #28

n3d1117 opened this issue Apr 16, 2021 · 8 comments

Comments

@n3d1117
Copy link

n3d1117 commented Apr 16, 2021

Hello! I'm having trouble compiling this project on a mac with M1 processor.
I successfully installed gd with brew install gd.

When compiling I get the error 'gd.h' file not found; it looks like SPM is not picking up headers correctly

$ pkg-config --cflags gdlib                                   
-I/opt/homebrew/Cellar/gd/2.3.2/include
$ ls /usr/local/include | grep gd 
gd.h
gd_color_map.h
gd_errors.h
gd_io.h
gdcache.h
gdfontg.h
gdfontl.h
gdfontmb.h
gdfonts.h
gdfontt.h
gdfx.h
gdpp.h

Is there any workaround available or am I doing something wrong?

@vitalz
Copy link

vitalz commented Apr 26, 2021

I also noticed this error in XCode even for Intel i7 in past.

@miroslavkovac
Copy link

Anybody knows how to fix this? Or perhaps how other frameworks have done it for M1?

@mynona
Copy link

mynona commented Jan 14, 2023

Will this repository be updated for M1 / M2 / later intel?

@adam-rocska
Copy link

any news on this? ran into it just now

@adam-rocska
Copy link

I doubt it has anything to do with an Apple Silicon, since it's failing on my i9 too ¯_(ツ)_/¯

Inspired by @n3d1117 here are my pkg-config stuff:

Rocska-MBP:~ rocskaadam$ pkg-config --cflags gdlib
-I/Users/rocskaadam/Cellar/gd/2.3.3_4/include
Rocska-MBP:~ rocskaadam$ ls -la /Users/rocskaadam/Cellar/gd/2.3.3_4/include | grep gd
-rw-r--r--   1 rocskaadam  staff  60218 Sze 11  2021 gd.h
-rw-r--r--   1 rocskaadam  staff    478 Sze 11  2021 gd_color_map.h
-rw-r--r--   1 rocskaadam  staff   1503 Sze 11  2021 gd_errors.h
-rw-r--r--   1 rocskaadam  staff   2931 Sze 11  2021 gd_io.h
-rw-r--r--   1 rocskaadam  staff   2994 Sze 11  2021 gdcache.h
-rw-r--r--   1 rocskaadam  staff    553 Sze 11  2021 gdfontg.h
-rw-r--r--   1 rocskaadam  staff    551 Sze 11  2021 gdfontl.h
-rw-r--r--   1 rocskaadam  staff    519 Sze 11  2021 gdfontmb.h
-rw-r--r--   1 rocskaadam  staff    515 Sze 11  2021 gdfonts.h
-rw-r--r--   1 rocskaadam  staff    546 Sze 11  2021 gdfontt.h
-rw-r--r--   1 rocskaadam  staff    496 Sze 11  2021 gdfx.h
-rw-r--r--   1 rocskaadam  staff  51975 Sze 11  2021 gdpp.h
Rocska-MBP:~ rocskaadam$ 

@zhtut
Copy link

zhtut commented Apr 17, 2023

.package(url: "https://github.com/twostraws/SwiftGD.git", branch: "main"),
use main branch worked for me

The reason for the error is that gd.h and the gd library have the same name, so the system doesn't know which one to choose.

@adam-rocska
Copy link

@zhtut I switched to https://github.com/t-ae/Swim

Much better quality, much better API, written by a much better programmer.

I'll unsubscribe from this thread now, just wanted to put that link out here if anyone else is playing around with this toy, it's better to check on Swim.

@twostraws
Copy link
Owner

@adam-rocska It's possible to leave comments without being a jerk about it. I'm glad you found an alternative you're happy with!

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

7 participants