help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch to make octave check for ATLAS BLAS libs, etcetera


From: John W. Eaton
Subject: Re: patch to make octave check for ATLAS BLAS libs, etcetera
Date: Fri, 28 Apr 2000 01:34:01 -0500 (CDT)

On 27-Apr-2000, Joao Cardoso <address@hidden> wrote:

| -lg2c correctly appears in FLIBS, but not (correctly) in LIBS. The fact
| that -lg2c does not appears in LIBS but -latlas appears produces
| undefined references when linking pure C code:

| [jcard] gcc ca.c -o ca -lf77blas -lcblas -latlas -lm
| Undefined                       first referenced
|  symbol                             in file
| e_wsfe                              /usr/local/lib/libf77blas.so
| do_fio                              /usr/local/lib/libf77blas.so
| s_stop                              /usr/local/lib/libf77blas.so
| s_wsfe                              /usr/local/lib/libf77blas.so
| 
| This might be particular to my system, as it compiles and runs OK with
| 
|    gcc -Wl,-z -Wl,nodefs ca.c -o ca -lf77blas -lcblas -latlas -lm
| 
| as I say to the linker to ignore undefined symbols.

Sure, that will probably work fine until you hit some case that
requires one of those undefined symbols that you chose to ignore.  :-)

The symbols that you are ignoring are from the Fortran (f2c/g2c)
run-time library.  Apparently libf77blas library uses the STOP
statement and maybe also does a little I/O.

This must not be pure C code, since it seems to reference Fortran
run-time stuff.  If the source for f77blas really is all C, then I'd
guess that at least part of it was generated by f2c.

It may be that the functions that you call can never access the
undefined functions, so you are OK.

Do you see the same unresolved references if you link to the static
(.a) library?  If not, then you are probably OK.  The dynamic linkers
on some systems seem to want to resolve all symbols in all functions
in shared libraries.

jwe



-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
Subscription information:  http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]