[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libcvd-members] Building libcvd
From: |
E. Rosten |
Subject: |
Re: [libcvd-members] Building libcvd |
Date: |
Mon, 5 Mar 2012 12:21:43 +0000 (GMT) |
User-agent: |
Alpine 2.00 (LSU 1167 2008-08-23) |
Hi Randall,
Thanks for the bug report and workaround.
Since it will most likely be weeks before anyone replies to this, I will
go ahead and answer my own post. Basically the problem is that the
LAPACK checks in the configure file are broken.
Almost certainly :)
Between the various different platforms, vendor strangeness, library
differences and general version drift over time, the LAPACK libraries have
been one of the most awkward parts of the configure script to get right
The way they are configured “MAY” work with the AMD version LAPACK,
however, to use something like ATLAS, you need to change all occurrences
of –llapack to -lgfortran -llapack -lf77blas -lcblas –latlas.
Which OS are you using? Or are you using static libraries?
With shared objects on most sane (more in a minute) operating systems,
liblapack.so ought to automatically bring in all dependencies (missing
dependencies in LAPACK have been a bane of this configure script over the
years).
Naturally, one of the more popular operating systems (ubuntu 11.10) is
completely not sane in this regard. They've added -W,-gc-sections to the
default arguments of gcc. This makes the linker remove unneeded shared
objects. While that sounds like a good idea, it actually breaks a lot of
stuff.
Firstly, the removal is far too aggressive, so like in the bad old days of
static libraries, you (sometimes) need to specify all the dependencies in
reverse order in the correct place on the commandline, otherwise it won't
link.
It also means that if a dependency is called only in a template function,
then the call is never emitted and so the dependent library is not
actually linked.
Using an older version of gcc, using stock gcc, adding -W,--no-gc-sections
to LDFLAGS or calling the linker directly eliminates the problem.
And then of course, you need to provide the extra paths to the configure when
you do the build.
LDFLAGS="-L/home/software/atlas_gcc/lib -L/home/software/ffmpeg_gcc/lib
-L/home/software/gvars3/lib" CPPFLAGS="-I /home/software/ffmpeg_gcc/includes
-I/home/software/TooN-2.0/include -I/home/software/gvars3/includes
-I/home/software/atlas_gcc/include" ./configure --prefix=/home/software/libcvd
--without-dc1394v2
--without-dc1394v1 --without-videodisplay
If I have time, I will submit my changes as a patch.
Have you solved the ffmpeg problem yet? Unfortunately, libCVD doesn't yet
work with the newest versions of ffmpeg. There has been an API change but
none of the documentation tutorials had been updated (when I last looked).
As a result I haven't had the time yet to figure out how to fix it. The
obvious looking changes didn't work unfortunately.
Regards
-Ed
Randall Svancara
High Performance Computing Systems Administrator
Washington State University
509-335-3039
From: address@hidden [mailto:address@hidden On Behalf Of Svancara, Randall
Sent: Friday, March 02, 2012 2:52 PM
To: address@hidden
Subject: [libcvd-members] Building libcvd
Hi,
I am trying to build libcvd and I am experiencing difficulty with the software
finding lapack and ffmpeg. I have built the “reference” version of lapack,
which I know
is slow compared to ATLAS or MKL or AMCL. I am using Intel platform, and I
would prefer to use MKL, but for now, I just want to build the software with
the reference
LAPACK and ffmpeg.
Ffmeg is installed into /home/software/ffmpeg_gcc and LAPACK is installed into
/home/software/lapack_reference. When I run ./configure, I use the following
command:
LDFLAGS="-L/home/software/lapack_reference/lib -L/home/software/ffmpeg_gcc/lib
-L/home/software/gvars3/lib" CPPFLAGS="-I /home/software/ffmpeg_gcc/includes
-I/home/software/TooN-2.0/include -I/home/software/gvars3/includes
-I/home/software/lapack_reference/includes" ./configure
--prefix=/home/software/libcvd
--without-dc1394v2 --without-dc1394v1
------------------SNIP------------------------------------
Options:
inline_asm assembler v4l2buffer v4l1buffer posix_rt videodisplay tr1_shared_ptr
toon pthread png jpeg tiff glob memalign
Missing options for linux-gnu:
dc1394v1 dc1394v2 ffmpeg lapack
Dodgy things:
------------------SNIP--------------------------------------
LAPACK ffmpeg are never found at all. I even attempted to install the
antiquated ffmpeg libraries that come with RHEL 5.x, and the build still fails
to find ffmpeg.
---Sections from the config.log----
configure:7357: result: no
configure:7405: checking if blas is needed for LAPACK
configure:7407: result:
configure:7410: checking for zupmtr_ in -llapack
configure:7435: g++ -o conftest -g -Wall -Wextra -pipe -ggdb -fPIC -mmmx -msse
-msse -msse2 -msse3 -I /home/software/ffmpeg_gcc/includes
-I/home/software/TooN-2.0/include -I/home/software/gvars3/includes
-I/home/software/lapack_reference/includes -I/home/software/libcvd/include
-L/home/software/lapack_reference/lib -L/home/software/ffmpeg_gcc/lib
-L/home/software/gvars3/lib conftest.cpp -llapack -lGLU -lGL -lrt -L -lX11 -lXext
-lblas >&5
/usr/bin/ld: cannot find -llapack
collect2: ld returned 1 exit status
configure:7435: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "CVD"
| #define PACKAGE_TARNAME "cvd"
| #define PACKAGE_VERSION "0.8"
| #define PACKAGE_STRING "CVD 0.8"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define CVD_MAJOR_VERSION 0
| #define CVD_MINOR_VERSION 8
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
Any help would be appreciated.
--
Edward Rosten Machine Intelligence Laboratory
http://mi.eng.cam.ac.uk/~er258 Department of Engineering
+44 1223 7 65960 University of Cambridge