ngs icon indicating copy to clipboard operation
ngs copied to clipboard

Remove /usr/local and /opt/homebrew

Open ryandesign opened this issue 1 year ago • 4 comments

This code is wrong, or at least partly unnecessary and partly inconvenient:

https://github.com/ngs-lang/ngs/blob/dd1bc7021e7315878613e20e6393b1c33f3925c3/CMakeLists.txt#L24-L25

/usr/local does not need to be mentioned here because compilers look in /usr/local by default.

/opt/homebrew should not be mentioned here because the user may not be using Homebrew or may not want to use its software.

For example, a user installing ngs without Homebrew installed will see the warning:

ld: warning: directory not found for option '-L/opt/homebrew/lib'

Another example: if a user is installing ngs with MacPorts, but they also happen to have Homebrew installed (which MacPorts does not support and strongly discourages but some users can't help themselves), then they definitely do not want ngs's dependencies to be satisfied by things installed using Homebrew.

ryandesign avatar Jun 18 '24 07:06 ryandesign

Thanks! This will take some time to fix as I'll need to reproduce the issues that caused me to add this and solve them somehow differently.

ilyash-b avatar Jun 18 '24 07:06 ilyash-b

Presumably you were building ngs from source and you wanted to use dependencies installed with Homebrew on Apple Silicon. (On Intel, Homebrew installs to /usr/local which as I said compilers use by default.) The solution would be to specify the -I/opt/homebrew/include and -L/opt/homebrew/lib flags in CFLAGS/CXXFLAGS and LDFLAGS respectively when invoking cmake.

ryandesign avatar Jun 18 '24 07:06 ryandesign

Sounds about right. Still need to check though.

ilyash-b avatar Jun 18 '24 07:06 ilyash-b

Fixed in dev branch. How much it helps there (and not yet merged into master), @ryandesign ?

ilyash-b avatar Jul 10 '24 07:07 ilyash-b

Released

ilyash-b avatar Apr 05 '25 10:04 ilyash-b