mkoctfile does not understand "-fopenmp" from ImageMagick

John W. Eaton jwe at octave.org
Sun Jan 4 22:13:04 CST 2009


On  4-Jan-2009, Alex Lancaster wrote:

| I'm one of the maintainers of the octave/octave-forge packages on
| Fedora and it appears that there are some problems with mkoctfile not
| accepting certain flags from ImageMagick's "Magick++-config",
| specifically it doesn't (yet) understand the -fopenmp GCC flag:
| 
| Magick++-config --cppflags` `Magick++-config --ldflags` 
| mkoctfile: unrecognized argument -fopenmp 
| 
| This occurs with octave 3.0.3, compiling one of the octave-forge
| subpackages and currently means that the Fedora octave-forge package
| on rawhide fails to build.  The ImageMagick maintainer says:
| 
|  "Either way, as ImageMagick gets compiled with -fopenmp, adding
|  -fopenmp to its LDFLAGS is correct. So I'm closing this as not a
|  bug. for octave-forge I advice you to replace -fopenmp in the flags
|  with -lgomp."
| 
| (from http://bugzilla.redhat.com/show_bug.cgi?id=477577#c2 )
| 
| For more information and background see the Fedora bug here:
| 
| http://bugzilla.redhat.com/show_bug.cgi?id=477577
| 
| Please advise how best to proceed and if octave can be modified to
| allow the build to proceed (we can carry a local patch until such time
| as the fix is applied upstream).

I don't think mkoctfile should be modified every time some new linker
flags appear.

If you need to pass flags specifically to the linker, then you can use
the -Wl,... option.  For example, use

  -Wl,-fopenmp

Since you are getting the flags from a config script, you'll need to
process them first to prepend each of the ldflags with "-Wl,", then
pass the result to mkoctfile.

jwe


More information about the Bug-octave mailing list