octave3-0-headers gives the wrong library directories for gfortran

Bug #348472 reported by Paul Novotny
4
Affects Status Importance Assigned to Milestone
octave3.0 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: octave3.0-headers

Release: intrepid amd64
Package: octave3.0-headers (1:3.0.1-6ubuntu1)

When compiling a cc file with mkoctfile I get the following:

/usr/bin/ld: cannot find -lgfortranbegin
collect2: ld returned 1 exit status

This is because in /usr/include/octave/oct-conf.h has the following line:

#define OCTAVE_CONF_FLIBS "-L/usr/lib/gcc/x86_64-linux-gnu/4.3.1 -L/usr/lib/gcc/x86_64-linux-gnu/4.3.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.3.1/../../.. -lhdf5 -lz -lgfortranbegin -lgfortran -lm"

On my machine (intrepid amd64), there is no /usr/lib/gcc/x86_64-linux-gnu/4.3.1 directory or no link to /usr/lib/gcc/x86_64-linux-gnu/4.3. Adding a softlink from /usr/lib/gcc/x86_64-linux-gnu/4.3.1 to /usr/lib/gcc/x86_64-linux-gnu/4.3 solves the problem.

Or, correcting oct-conf.h to look in 4.3.2 would also solve the problem.

Revision history for this message
Rebecca Palmer (rebecca-palmer) wrote :

Could you post a .cc file that triggers this bug? My amd64 Intrepid also has this apparently broken link, but compiles Octave-Forge packages from source (including arpack, which is a binding for a Fortran library) without this problem.

Revision history for this message
Paul Novotny (paul-novotny) wrote :

Here is the .cc file that gave me the error above. BTW, I compiled it with the following command:

mkoctfile -DHAVE_CONFIG_H __convn__.cc

Revision history for this message
Rebecca Palmer (rebecca-palmer) wrote :

Appears to be fixed in Jaunty: oct-conf.h now points to 4.3.3, where the libraries in question do exist, and this file now compiles without error.

Changed in octave3.0 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.