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

Remove /usr/local and /opt/homebrew #668

Open
ryandesign opened this issue Jun 18, 2024 · 4 comments
Open

Remove /usr/local and /opt/homebrew #668

ryandesign opened this issue Jun 18, 2024 · 4 comments

Comments

@ryandesign
Copy link

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

ngs/CMakeLists.txt

Lines 24 to 25 in dd1bc70

include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${LIBFFI_INCLUDE_DIRS} /usr/local/include /opt/homebrew/include)
link_directories(/usr/local/lib /opt/homebrew/lib)

/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.

@ilyash-b
Copy link
Contributor

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 ilyash-b added the bug label Jun 18, 2024
@ryandesign
Copy link
Author

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.

@ilyash-b
Copy link
Contributor

Sounds about right. Still need to check though.

@ilyash-b
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants