Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#22586 closed defect (wontfix)

install octave-linear-algebra fails

Reported by: borschel@… Owned by: anddam (Andrea D'Amore)
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: Cc: alakazam@…
Port: octave-linear-algebra

Description (last modified by anddam (Andrea D'Amore))

There is undefined symbol error when building linear-algebra package from octave-forge.

Check attachment for actual output.

Attachments (3)

original output.txt (1.5 KB) - added by anddam (Andrea D'Amore) 14 years ago.
linear-algebra debug output.txt (19.0 KB) - added by anddam (Andrea D'Amore) 14 years ago.
octave-linear-algebra.debug (119.2 KB) - added by borschel@… 14 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 14 years ago by mf2k (Frank Schima)

Cc: alakazam@… added
Description: modified (diff)
Owner: changed from macports-tickets@… to and.damore@…
Port: octave-linear-algebra added

comment:2 Changed 14 years ago by mf2k (Frank Schima)

I see the same problem on Mac OS X 10.6.2. Xcode 3.2.1.

comment:3 Changed 14 years ago by anddam (Andrea D'Amore)

Status: newassigned

comment:4 Changed 14 years ago by anddam (Andrea D'Amore)

Description: modified (diff)

I can reproduce the same problem on Leopard G4.

From this page I can read

The code is a wrapper to the corresponding Lapack dggsvd and zggsvd routines.

and I see I don't have lapack that is in turn provided by atlas in macports.

Unluckily at the moment atlas is broken at least here on my machine, as per #22378 so I can't really help with this for now, in the meanwhile you could paste here the output of port installed atlas on your machines.

When reporting an error remember to run port with '-d' option in order to have debugging output.

I'm editing the original message as the <pre> block breaks html page formatting.

Changed 14 years ago by anddam (Andrea D'Amore)

Attachment: original output.txt added

Changed 14 years ago by anddam (Andrea D'Amore)

Changed 14 years ago by borschel@…

Attachment: octave-linear-algebra.debug added

comment:5 Changed 14 years ago by borschel@…

I installed atlas without issues :) However, that didn't solve the problem with octave-linear-algebra :(

I am not really surprised, because if a missing library would be the cause for the problem, then the linker would tell us that it cannot find the missing library. Instead, the linker just couldn't find the 2 symbols in any of the libraries it was told to link against.

So my guess is, that there must be something wrong in the makefile, failing to tell the linker to link against the correct library.

I am attaching the full debug output. (octave-linear-algebra.debug)

comment:6 Changed 14 years ago by borschel@…

I looked into the ATLAS headers and it appears the ATLAS contains only a subset of the LAPACK functions, and as far as I can see it does not contain the functions the linker is complaining about. However, OS-X comes with full LAPCK and BLAS libraries as part of the vecLib framework, but they apparently are not linked.

comment:7 in reply to:  6 Changed 14 years ago by anddam (Andrea D'Amore)

Replying to borschel@…:

However, OS-X comes with full LAPCK and BLAS libraries as part of the vecLib framework, but they apparently are not linked.

And they won't, check this FAQ.

We have either the option to get those symbols into macports' atlas or create a new library but, as said, at the moment I can't built atlas on my computer.

comment:8 Changed 14 years ago by borschel@…

ok, I resolved it. Like I guessed, the problem was that the linker was not told to link against lapack.

Unfortunately, the makefile doesn't call the linker directly. Rather it calls the octave script mkoctfile which then calls the linker. I just solved the problem in a dirty way, by changing line 95 in that mkoctfile script from : ${BLAS_LIBS=""} to : ${BLAS_LIBS=-lcblas -llapack}

Interestingly, the variable BLAS_LIBS was empty and there is not even a variable LAPACK_LIBS, so I just smuggled lapack in with blas.

So, like I said, this is a quick and dirty way to just get it working. I would appreciate it, if you could tell me what the clean (i.e. correct) way of fixing this would be.

Regards, Benno

comment:9 in reply to:  8 Changed 14 years ago by anddam (Andrea D'Amore)

Resolution: wontfix
Status: assignedclosed

Replying to borschel@…:

Unfortunately, the makefile doesn't call the linker directly. Rather it calls the octave script mkoctfile which then calls the linker.

This is made on purpose, letting the octave pkg manager to install the module let macports have a good number of octave-forge packages.

Interestingly, the variable BLAS_LIBS was empty and there is not even a variable LAPACK_LIBS, so I just smuggled lapack in with blas. So, like I said, this is a quick and dirty way to just get it working. I would appreciate it, if you could tell me what the clean (i.e. correct) way of fixing this would be.

${prefix}/bin/mkoctfile script comes from octave port, the configure options have --with-blas with a -framework value and --with-lapack but I'm unsure if this should let the configure script to autodetect macports' atlas library (that I can't install anyway).

For this you should file in a ticket about the octave port and ask to set up configure.args properly in Portfile.

comment:10 Changed 14 years ago by alakazam@…

That would (probably) be ticket #21797 which I haven't yet taken time to handle.

Note: See TracTickets for help on using tickets.