LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-27-2010, 02:39 PM   #1
dsmith
LQ Newbie
 
Registered: Dec 2009
Posts: 2

Rep: Reputation: 0
lapack/blas linking problem


very similar to Lapack linking issue posted 11-10-09

Building lapack locally on RedHat, end goal is a static build of lapack++ that can be deployed as a 3rd party lib in a directory other than /usr/lib

make options for lapack/blas:
FORTRAN = gfortran -fimplicit-none -g
OPTS = -fpic -static
DRVOPTS = $(OPTS)
NOOPT =
LOADER = gfortran -g
LOADOPTS =
#


configure options for lapack++:
./configure --prefix=/home/dsmith/lapackpp-2.5.3-install-debug --enable-debug --enable-static=yes --enable-shared=no --with-pic --with-lapack=/home/dsmith/lapack-3.2.1/liblapack.a --with-blas=/home/dsmith/lapack-3.2.1/libblas.a

Note: had problem with config script, --enable-static did NOT put -static on the compile line, I had to force it by modifying CXX_FLAGS


log file for lapack++ build enclosed (I hope)
highlights:

*** Warning: Linking the shared library liblapackpp.la against the
*** static library /home/dsmith/lapack-3.2.1/liblapack.a is not portable!

*** Warning: Linking the shared library liblapackpp.la against the
*** static library /home/dsmith/lapack-3.2.1/libblas.a is not portable!

Archives lapack & blas:
ar cru .libs/liblapackpp.a /home/dsmith/lapack-3.2.1/liblapack.a /home/dsmith/lapack-3.2.1/libblas.a dopla.o dtimmg.o eigslv.o genmd.o laprefs.o lasvd.o lautil.o linslv.o systime.o .libs/liblapackpp.lax/liblamatrixpp.a/uutgmd.o .libs/liblapackpp.lax/liblamatrixpp.a/sybfd.o .libs/liblapackpp.lax/liblamatrixpp.a/gfqrd.o .libs/liblapackpp.lax/liblamatrixpp.a/vf.o .libs/liblapackpp.lax/liblamatrixpp.a/laexcp.o .libs/liblapackpp.lax/liblamatrixpp.a/utgmd.o .libs/liblapackpp.lax/liblamatrixpp.a/symd.o .libs/liblapackpp.lax/liblamatrixpp.a/lavc.o .libs/liblapackpp.lax/liblamatrixpp.a/sytrmd.o .libs/liblapackpp.lax/liblamatrixpp.a/vd.o .libs/liblapackpp.lax/liblamatrixpp.a/trmd.o .libs/liblapackpp.lax/liblamatrixpp.a/gmi.o .libs/liblapackpp.lax/liblamatrixpp.a/lavli.o .libs/liblapackpp.lax/liblamatrixpp.a/spdtrmd.o .libs/liblapackpp.lax/liblamatrixpp.a/gmli.o .libs/liblapackpp.lax/liblamatrixpp.a/lavd.o .libs/liblapackpp.lax/liblamatrixpp.a/vc.o .libs/liblapackpp.lax/liblamatrixpp.a/sybmd.o .libs/liblapackpp.lax/liblamatrixpp.a/gmtmpl.o .libs/liblapackpp.lax/liblamatrixpp.a/vli.o .libs/liblapackpp.lax/liblamatrixpp.a/gmconv.o .libs/liblapackpp.lax/liblamatrixpp.a/ltgmd.o .libs/liblapackpp.lax/liblamatrixpp.a/lavi.o .libs/liblapackpp.lax/liblamatrixpp.a/vi.o .libs/liblapackpp.lax/liblamatrixpp.a/spdbmd.o .libs/liblapackpp.lax/liblamatrixpp.a/laindex.o .libs/liblapackpp.lax/liblamatrixpp.a/gfqrc.o .libs/liblapackpp.lax/liblamatrixpp.a/bmd.o .libs/liblapackpp.lax/liblamatrixpp.a/spdmd.o .libs/liblapackpp.lax/liblamatrixpp.a/gmc.o .libs/liblapackpp.lax/liblamatrixpp.a/gmf.o .libs/liblapackpp.lax/liblamatrixpp.a/gmd.o .libs/liblapackpp.lax/liblamatrixpp.a/ultgmd.o .libs/liblapackpp.lax/libblaspp.a/blas2pp.o .libs/liblapackpp.lax/libblaspp.a/blas3pp.o .libs/liblapackpp.lax/libblaspp.a/blaspp.o .libs/liblapackpp.lax/libblaspp.a/blas1pp.o /home/dsmith/lapack-3.2.1/liblapack.a /home/dsmith/lapack-3.2.1/libblas.a
ranlib .libs/liblapackpp.a


Resulting lapackpp builds fine with my application but when I run the application I get:

symbol lookup error: ore-3.1.0-PIL-SNAPSHOT.so: undefined symbol: dscal_

symbol is defined in blas, why is it undefined in my app?
Attached Files
File Type: txt make-lapackpp.txt (31.2 KB, 14 views)

Last edited by dsmith; 01-27-2010 at 02:42 PM. Reason: add attachment
 
Old 01-29-2010, 06:24 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
Not that I know much about lapackpp, just my considerations ..

cd lapackpp-2.5.3/ ( Example )

./configure --enable-static
.. is what it takes.

( If you want a debug version, better make it later / seperately
Can't imagine "debug" is required by your application.)

'make' will then create lapackpp.a in lapackpp-2.5.3/src/.libs/
And I get no errors with that.
Fortran 77, ATLAS, f77blas, cblas, gfortran, lapack are all checked
in automatically by " ./configure ".

But why use it ? liblapackpp.so.14.2.0 etc. is just as portable.
You can place it anywhere and start your application with a script :

#!/bin/sh
export LD_LIBRARY_PATH=./lib
exec ./<executable>

.. when you e.g. have the "lib/" folder in the same directory.

.....
.....
The best known example is Firefox with some 15 shared libraries
in the folder firefox/ . All included with the script "firefox" etc.
.....

Last edited by knudfl; 01-29-2010 at 08:59 AM.
 
  


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
Confused about LAPACK, ATLAS and BLAS statguy Slackware 14 01-29-2014 02:53 AM
Lapack linking issue mfitzpat Linux - Software 6 01-27-2010 01:41 PM
problem about blas ztdep Linux - Software 1 11-10-2006 12:39 PM
some problem about LAPACK and BLAS ztdep Linux - Software 8 08-03-2005 05:32 AM
lapack library problem marlinux Red Hat 3 09-02-2003 09:57 AM

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

All times are GMT -5. The time now is 03:47 PM.

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