amuse
amuse copied to clipboard
QHull detection fails on macOS with system clang and Homebrew qhull
Describe the bug On macOS, if you use a venv, the system clang and a Homebrew-installed qhull, then the configury fails to detect that qhull is available.
To Reproduce
brew install qhull
python3 -m venv venv
. venv/bin/activate
./setup
Expected behavior The qhull feature to be available and simplex to be enabled.
Logs From the blas tests in ./configure:
configure:12050: checking for sgemm_ in -lessl
configure:12081: clang -o conftest -g -O2 conftest.c -lessl -lblas -L/opt/homebrew/Cellar/gcc/14.2.0_1/bin/../lib/gcc/current/gcc/aarch64-apple-darwin24/14 -L/opt/homebrew/Cellar/gcc/14.2.0_1/bin/../lib/gcc/current/gcc -L/opt/homebrew/Cellar/gcc/14.2.0_1/bin/../lib/gcc/current/gcc/aarch64-apple-darwin24/14/../../.. -lemutls_w -lheapt_w -lgfortran -lquadmath -L/opt/homebrew/Cellar/gcc/14.2.0_1/bin/../lib/gcc/current/gcc/aarch64-apple-darwin24/14 -L/opt/homebrew/Cellar/gcc/14.2.0_1/bin/../lib/gcc/current/gcc -L/opt/homebrew/Cellar/gcc/14.2.0_1/bin/../lib/gcc/current/gcc/aarch64-apple-darwin24/14/../../.. -lemutls_w -lheapt_w -lgfortran -lquadmath >&5
ld: warning: ignoring duplicate libraries: '-lemutls_w', '-lgfortran', '-lheapt_w', '-lquadmath'
ld: library 'essl' not found
note the homebrew -L options. But for qhull:
configure:14718: checking for library containing qh_freeqhull
configure:14756: clang -o conftest conftest.c >&5
Undefined symbols for architecture arm64:
"_qh_freeqhull", referenced from:
_main in conftest-0b99c3.o
ld: symbol(s) not found for architecture arm64
Environment (please complete the following information):
- OS and version: macOS
- Compiler: XCode clang
Additional context Homebrew doesn't seem to set LDFLAGS or CLAGS, so it's unclear to me how those -L flags end up in the tests for the other libraries. At any rate, that's how it should work for qhull too.