[CMake] "INCLUDE called with wrong number of arguments" error, please help.

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu Jan 4 17:48:41 EST 2007


On 2007-01-04 23:11+0100 Alexander Neundorf wrote:

> Hi,
>
> Von: kdsfinger at gmail.com
>
> ...
>> However, when I make the program, I got the following message seems
>> there is a link problem:
>> $ make
>> Scanning dependencies of target test
>> [100%] Building C object CMakeFiles/test.dir/testunsymm.o
>> Linking C executable test
>> /usr/bin/ld: cannot find -llapack
>> collect2: ld returned 1 exit status
>> make[2]: *** [test] Error 1
>> make[1]: *** [CMakeFiles/test.dir/all] Error 2
>> make: *** [all] Error 2
>>
>> Why it can not find the lapack package? Is there something wrong with
>> CMakeLists.txt? Thanks for comments.

> Please do a "make VERBOSE=1" so we can see the full command. I would guess
that FindLAPACK.cmake sets LAPACK_LIBRARIES simply to "-llapack", instead of
the full path to the library. Have a look at FindLAPACK.cmake and check
whether it uses FIND_LIBRARY() to set LAPACK_LIBRARIES.

Also, please print out ${LAPACK_LIBRARIES} (using

MESSAGE("LAPACK_LIBRARIES = ${LAPACK_LIBRARIES}")

so we know how the lapack cmake module is defining that variable.

The linker should normally be able to use the -llapack option to find the
lapack library on Linux.  Since it doesn't find it, I am wondering if the
lapack library is installed somewhere non-standard where the linker cannot
find it.  What happens if you

export LD_LIBRARY_PATH=/path

where /path is the path to where the lapack library has been installed?

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list