Closed swils closed 2 years ago
Hi @swils!
Thank you for reporting this issue!
I suppose we must somehow differentiate between M1 macs and Intel macs?
There are already some other cases where a separate shell script is used to determine the value of include paths or libraries (e.g. scripts/get_sword_include_path.sh
)
If you go the separate script route, you would have to check in the script whether you are running on Intel or ARM ... or you check implicitly via the existence of the folders you mentioned above?
Could you imagine to contribute a PR to resolve this?
Homebrew on M1 Macbooks installs its ARM-specific packages under
/opt/homebrew
rather than/usr/local/opt
. But the following dependencies are hardcoded inbinding.gyp
:This causes the build of
node-sword-interface
to fail on my laptop.Sadly, we also can't simply use
pkg-config
similar to what is done forlibcurl
, because Homebrew putslibicu
in aCellar
, which is excluded frompkg-config
by default, unless you specifyPKG_CONFIG_PATH
.I think my Homebrew setup is rather standard, so I expect other people wishing to compile
node-sword-interface
on an M1 MacBook will run into the same problems. Do you have a preferred way of resolving this?