Hi,
I've spent some time trying to port Octave, a program for numerical computing to OSX. (As I see it, this is a very important program in order for OSX to be used in scientific areas since Matlab(TM) apparently won't be ported by the Mathworks)
With previous builds of Apples dev-tools octave wouldn't compile properly but with the latest set it compiles, but chokes in the final linking stage:
c++ -I. -I.. -I../liboctave -I../src -I../libcruft/misc -I../glob
-I../glob -DHAVE_CONFIG_H -fno-implicit-templates
-keep_private_externs \
-L.. -fPIC -g -o octave \
octave.o builtins.o ops.o ../libcruft/blas-xtra/xerbla.o balance.o
besselj.o betainc.o chol.o colloc.o dassl.o det.o eig.o expm.o
fft.o fft2.o filter.o find.o fsolve.o gammainc.o getgrent.o
getpwent.o getrusage.o givens.o hess.o ifft.o ifft2.o inv.o
log.o lpsolve.o lsode.o lu.o minmax.o pinv.o qr.o quad.o qz.o
rand.o schur.o sort.o svd.o syl.o time.o \
-L../liboctave -L../libcruft -L../src \
../src/liboctinterp.a ../liboctave/liboctave.a ../libcruft/libcruft.a
../readline/libreadline.a ../kpathsea/libkpathsea.a ../glob/glob.o
../glob/fnmatch.o \
-lcurses -lz -lm -lf2c
/usr/bin/ld: Undefined symbols:
__._t5Array1Z12octave_value
__._t5Array1Zd
__._t5Array1Zt12basic_string3ZcZt18string_char_tra its1ZcZt24__default_alloc_template2b0i0
__._t5Array1Zt7complex1Zd
_fortran_vec__t5Array1Zd
...
The list of undefinded symbols continues for a while.
I started looking for one of the symbols:
_fortran_vec__t5Array1Zt7complex1Zd
and in Array-C.o it turned up as
000007a8 S _fortran_vec__t5Array1Zt7complex1Zd
where it should have been
000007a8 T _fortran_vec__t5Array1Zt7complex1Zd
by compiling with assembler output on, it turned up as
.private_extern _fortran_vec__t5Array1Zt7complex1Zd
c++ -DHAVE_CONFIG_H -I.. -I../libcruft/misc/ -g -c -save-temps Array-C.cc
.private_extern _fortran_vec__t5Array1Zt7complex1Zd
_fortran_vec__t5Array1Zt7complex1Zd:
LFB11:
mflr r0
stmw r27,-20(r1)
stw r0,8(r1)
stwu r1,-96(r1)
The documentation I've found on .private_extern is samewhat vague and setting -keep_private_externs when compiling does not resolve the issue.
Could anyone enlighten me on the matter and/or provide a workaround?
/Per