Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Linking and .private_extern symbols

Linking and .private_extern symbols
Thread Tools
Fresh-Faced Recruit
Join Date: Oct 2000
Status: Offline
Reply With Quote
Mar 27, 2001, 03:03 AM
 
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
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:49 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2