pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: problem with math/blas/files/Makefile.blas
On Thursday 04 December 2008 09:29:05 Russell McManus wrote:
> ImportError: /glib/pkgsrc-2008Q3/x86_64/lib/libF77.so.0: undefined
> symbol: MAIN__
>
> This problem is similar to the one described here:
>
> http://mail-index.netbsd.org/pkgsrc-users/2008/10/21/msg008397.html
>
> From the above error message, one might think that the problem is
> related to libF77.so.0. However the problem is actually in math/blas.
No the problem is actually with f2c. Anything built with f2c will have a
reference to MAIN__ (the "fortran main") so the application has to provide
one - normally a null function
int MAIN__()
{
return 0;
}
Many fortran using applications have this hack already but increasingly
newer ones don't as other/newer fortran compilers don't need it.
> I also think that math/lapack is affected in a similar way.
> What is the correct fix?
Provide the function or compile all fortran with a different compiler.
Attached is the patch that deals with it in the wip/py-numpy package.
cheers
mark
$NetBSD$
--- numpy/linalg/lapack_litemodule.c.orig 2008-05-26 19:39:50.000000000
+1200
+++ numpy/linalg/lapack_litemodule.c
@@ -16,6 +16,8 @@ typedef struct { float r, i; } f2c_compl
typedef struct { double r, i; } f2c_doublecomplex;
/* typedef long int (*L_fp)(); */
+int FNAME(MAIN_)() { return 0; }
+
extern int FNAME(dgeev)(char *jobvl, char *jobvr, int *n,
double a[], int *lda, double wr[], double wi[],
double vl[], int *ldvl, double vr[], int *ldvr,
Home |
Main Index |
Thread Index |
Old Index