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

Failure to link interp2dtest to MacPorts gsl #7

Closed
bkraessig opened this issue Sep 3, 2015 · 1 comment
Closed

Failure to link interp2dtest to MacPorts gsl #7

bkraessig opened this issue Sep 3, 2015 · 1 comment
Assignees

Comments

@bkraessig
Copy link

The cmake installation of interp2d on my Mac completed only partially. The static library was built successfully, but the linking of the interp2dtest failed:

[ 71%] Built target interp2d_static
[ 85%] Linking C executable interp2dtest
ld: library not found for -lgsl
collect2: error: ld returned 1 exit status
make[2]: *** [interp2dtest] Error 1
make[1]: *** [CMakeFiles/interp2dtest.dir/all] Error 2
make: *** [all] Error 2

The CMakeCache.txt contains all the necessary entries for gsl:

GSL_CFLAGS:INTERNAL=-I/opt/local/include
GSL_FOUND:INTERNAL=1
GSL_INCLUDEDIR:INTERNAL=/opt/local/include
GSL_INCLUDE_DIRS:INTERNAL=/opt/local/include
GSL_LDFLAGS:INTERNAL=-L/opt/local/lib;-lgsl;-lgslcblas;-lm
GSL_LIBDIR:INTERNAL=/opt/local/lib
GSL_LIBRARIES:INTERNAL=gsl;gslcblas;m
GSL_LIBRARY_DIRS:INTERNAL=/opt/local/lib

I wonder whether this info didn't trickle down into the link command for interp2dtest.

@diazona diazona self-assigned this Sep 4, 2015
@diazona
Copy link
Owner

diazona commented Sep 4, 2015

Yep, it took a little while to track down what needed to be done, but I'd omitted the command to add the directory to the linker search path. It works for me now. Check out commit 59e8038 and let me know whether it fixes the issue for you too.

@diazona diazona closed this as completed Sep 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants