This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Error compiling with suiteSparse SPQR

Tags: None
(comma "," separated)
szhou
Registered Member
Posts
2
Karma
0

Error compiling with suiteSparse SPQR

Thu Apr 03, 2014 10:14 pm
I'm having problem using the suiteSparse SPQR in eigen. I setup a very simple CMakeLists.txt file :

>>
project(MyProject)
cmake_minimum_required(VERSION 2.6.2)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(EIGEN3_INCLUDE_DIR "/home/zhou/projects/test/linear/eigen")
include_directories("${EIGEN3_INCLUDE_DIR}")
find_package(Cholmod)
find_package(SPQR)
set(SRCS main.cpp)
add_executable(myproject ${SRCS})
>>
where U copy the eigen/cmake scripts to my source folder. I also download the current suiteSparse library and make install to default location (usr/local/). Then I run my cmake it pass without error.

However, when I try to make. It return with error:
undefined reference to 'cholmod_l_start',
undefined reference to 'cholmod_l_finish'.

It seems like a linking problem. I also tried to run the eigen test. Cmake finds suiteSparse SPQR, but fail to compile umfpack_support_1 and umfpack_support_2 with similar errors:
Linking CXX executable umfpack_support_2
/usr/local/lib/libumfpack.a(umfpack_gn_tictoc.o): In function `umfpack_tic':
umfpack_tictoc.c:(.text+0x5): undefined reference to `SuiteSparse_time'
/usr/local/lib/libumfpack.a(umfpack_gn_tictoc.o): In function `umfpack_toc':
umfpack_tictoc.c:(.text+0x25): undefined reference to `SuiteSparse_time'
/usr/local/lib/libumfpack.a(umf_i_cholmod.o): In function `umf_i_cholmod':
umf_cholmod.c:(.text+0x9e): undefined reference to `cholmod_start'
umf_cholmod.c:(.text+0x1f6): undefined reference to `cholmod_analyze'
umf_cholmod.c:(.text+0x210): undefined reference to `cholmod_free_sparse'
umf_cholmod.c:(.text+0x2c3): undefined reference to `cholmod_free_factor'
umf_cholmod.c:(.text+0x2d9): undefined reference to `cholmod_print_common'
umf_cholmod.c:(.text+0x2e3): undefined reference to `cholmod_finish'
umf_cholmod.c:(.text+0x47b): undefined reference to `cholmod_transpose'
collect2: ld returned 1 exit status
make[3]: *** [test/umfpack_support_2] Error 1

I run out of idea why this happen. What am I missing?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]