LLNL / sundials

Official development repository for SUNDIALS - a SUite of Nonlinear and DIfferential/ALgebraic equation Solvers. Pull requests are welcome for bug fixes and minor changes.
https://computing.llnl.gov/projects/sundials
BSD 3-Clause "New" or "Revised" License
507 stars 123 forks source link

ENABLE_LAPACK=ON fails because it ignores LDFLAGS #74

Open yurivict opened 3 years ago

yurivict commented 3 years ago
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/ltest.dir/link.txt --verbose=1
/usr/bin/cc -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing CMakeFiles/ltest.dir/ltest.o -o ltest  -lopenblas -lopenblas 
ld: error: unable to find library -lopenblas
ld: error: unable to find library -lopenblas
cc: error: linker command failed with exit code 1 (use -v to see invocation)

These LDFLAGS were ignored: LDFLAGS="-Wl,-rpath=/usr/local/lib/gcc10 -L/usr/local/lib/gcc10 -B/usr/local/bin -L/usr/local/lib -fstack-protector-strong -L/usr/local/lib"

OS: FreeBSD 13

balos1 commented 3 years ago

What version of SUNDIALS is this with?

yurivict commented 3 years ago

5.7.0

balos1 commented 3 years ago

Can you provide the CMakeCache.txt?

yurivict commented 3 years ago

https://people.freebsd.org/~yuri/sundials-5.7.0-CMakeCache.txt

jhgit commented 3 years ago

It would be good if 'openblas' support could be detected by default using the method that uses pkgconf (aka pkg-config). For example:

% pkgconf --libs openblas -L/usr/local/lib -lopenblas