Re: gfortran FFLAGS without paths?
Hi,
Perhaps pkgconfig could be used to solve this: create a fortran.pc
file with the paths.
I've been doing something similar (not in Debian yet, but at work)
using pkg-config in
Makefiles :
NETCDF_LIBS := ${if `pkg-config --exists netcdf`, \
`pkg-config --libs netcdf'`. \
-L/usr/local/lib -lnetcdf)
This allows the pkg-config file to be used if present, if not then
fall back to a default.
(netcdf in Debian and upstream does not have a .pc file yet , but its
present locally).
I'm using this on our systems at ICHEC (www.ichec.ie): we use modules
to select between
different versions of libraries. The module command (eg. 'module add
netcdf/4.0' ) sets the
PKG_CONFIG_DIR to include a path with the appropriate netcdf.pc file
for that version;
allowing you to do a :
$ module load netcdf/4.0 ; make
to build a version of the code against a specific module.
I plan to push pkgconfig files upstream and to Debian to aid this.
Regards
Alastair
On 18 Aug 2009, at 20:04, Thomas Weber wrote:
Hi,
I'm maintaining GNU Octave in Debian. I'm facing a problem with the
fact
that it consists of both C++ and Fortran and I better state that I
don't
know Fortran. Octave's FFLAGS as determined by configure are (breaks
added
for better readibility)
checking for Fortran 77 libraries of gfortran...
-L/usr/lib/gcc/x86_64-linux-gnu/4.3.2
-L/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib
-L/lib/../lib -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../..
-lhdf5 -lz -lgfortranbegin -lgfortran -lm
Is there a chance of getting rid of the "-L" paths there, that is it
is
a) possible without crude hacks?
b) sensible?
These flags are hardcoded with the compiler flags into one of Octave's
scripts. If the compiler version changes later on, I have a problem,
that's why I'm asking. See e.g.
https://bugs.launchpad.net/bugs/348472
Thanks
Thomas
--
To UNSUBSCRIBE, email to debian-science-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Regards,
Alastair
--
Alastair McKinstry , <alastair@sceal.ie> , <mckinstry@debian.org> http://blog.sceal.ie
Anyone who believes exponential growth can go on forever in a finite
world
is either a madman or an economist - Kenneth Boulter, Economist.
Reply to: