LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-02-2011, 03:29 AM   #1
corydalus
LQ Newbie
 
Registered: May 2010
Posts: 2

Rep: Reputation: 0
Armadillo compilation problem


When trying to compile Armadillo on a computer cluster I get the following error after running "cmake ." (works OK) and "make":

/usr/bin/ld: /share/apps/opt_intel/lib/libblas.a(dgemm.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/share/apps/opt_intel/lib/libblas.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libarmadillo.so.1.0.2] Error 1
make[1]: *** [CMakeFiles/armadillo.dir/all] Error 2
make: *** [all] Error 2


cmake says it has successgully found BLAS, but there is still a linking problem. How can I deal with it?
 
Old 02-02-2011, 06:41 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

"".. recompile with -fPIC"" :
Means, that a shared library, liblapack.so is required.

Quote:
-- Found a LAPACK library: /usr/lib/liblapack.so
-- Found a BLAS library: /usr/lib/libblas.so
-- Found a CLAPACK library: /usr/lib/atlas/libclapack.so
-- Found a CBLAS library: /usr/lib/atlas/libcblas.so
Good luck !

P.S. : cd armadillo-1.0.2/ && mkdir build && cd build/
&& cmake .. && make :
Most "cmake applications" require a build directory.

..

Last edited by knudfl; 02-02-2011 at 06:45 AM.
 
1 members found this post helpful.
Old 02-02-2011, 07:08 AM   #3
corydalus
LQ Newbie
 
Registered: May 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you for your reply, knudfl, but it looks like cmake has found the liblapack.so. It says:

Code:
-- Found a LAPACK library: /usr/lib/liblapack.so
-- Found a BLAS library: /usr/lib/libblas.so
-- LAPACK_FOUND  = YES
-- BLAS_FOUND    = YES
-- CLAPACK_FOUND = NO
-- CBLAS_FOUND   = NO
-- *** 
-- *** The Armadillo run-time library component will be an alias for the following libraries:
-- *** ARMA_LIBS = /usr/lib/libblas.so;/usr/lib/liblapack.so
-- ***
 
Old 02-02-2011, 07:21 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
May be hide away this, while you are compiling :
""/share/apps/opt_intel/lib/libblas.a""

Not much help, that the "cmake configure" finds libblas.so,
when ld has libblas.a first in its search path.

..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
compilation problem shariefbe Linux - Software 6 08-18-2008 09:12 AM
compilation problem lamtab Linux - Newbie 5 11-12-2007 05:28 PM
compilation problem girish_hilage AIX 3 05-31-2006 08:01 AM
Compilation Problem jonty_11 Programming 4 03-24-2005 09:45 PM
c compilation problem edreddy Programming 5 06-02-2004 12:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration