Dan

Thanks for the reply.  Yes it is SWIG I'm trying to compile.  Later I tried using MacPorts and it worked ok - but I only get 2.0.3  which lacks the octave 3.4.0 support.

I just tried your suggested FLAGS and that didn't go so well:


SEsMacPro:trunk stu$ env CFLAGS=-m32 CXXFLAGS=-m32 ./configure
....
....

config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged   #  which looks promising ......

SEsMacPro:trunk stu$ make

....
....

Swig/wrapfunc.o  -ldl  -L/opt/local/lib -lpcre
ld: warning: in CParse/cscanner.o, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in CParse/parser.o, file was built for unsupported file format which is not the architecture being linked (i386)
....
....

ld: warning: in /opt/local/lib/libpcre.dylib, file was built for unsupported file format which is not the architecture being linked (i386)  # pcre was installed as a dependent 
# library during the MacPorts installation - I don't see it bundled with SWIG in the lib directory.

Undefined symbols:
  "_main", referenced from:
      start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [eswig] Error 1
make[1]: *** [all] Error 2
make: *** [source] Error 2

So I went back to 64 bit mode During configure the following message appears:

Checking packages required for SWIG developers.
Note : None of the following packages are required for users to compile and install SWIG

checking for bison... bison -y
checking for ranlib... ranlib
checking for ar... ar
checking for yodl2man... no
checking for yodl2html... no

'configure' and 'make' complete successfully but at the end of 'make install' the following error occurs

SEsMacPro:trunk stu$ sudo make install
Password:
Installing SWIG executable
Installing /usr/local/bin/swig
Installing the SWIG library
....
....

Installing /usr/local/share/swig/2.0.5/std/std_carray.swg
make[1]: yodl2man: No such file or directory                               #this seems strange given that yodl2man is only required for developers per the config message
Installing ccache-swig
Installing /usr/local/bin/ccache-swig
Installing /usr/local/share/man/man1/ccache-swig.1
install: ./ccache-swig.1: No such file or directory
make[1]: *** [install] Error 71
make: *** [install-ccache] Error 2

I'm not quite sure what I have now.  Looks like a partial install, but I'm not sure how to check that.

thx again

best

Stu



On May 25, 2011, at 11:59 AM, Daniel Blezek wrote:

Stu,

 To be clear: are you compiling SWIG? or Octave?

If you are compiling SWIG, it looks as though the configure step found the
Octave pcre library, which was compiled 32-bit, when your SWIG is compiled
64-bit.  Can you re-run configure, like this:

env CFLAGS=-m32 CXXFLAGS=-m32 ./configure

If this doesn't solve the problem, you may need to compile pcre yourself
(but I thought it came bundled with SWIG?!?).

By default, 10.6 ships with a GCC that compiles x86_64 (64-bit) object
files.  These will not link against 32-bit (i386) libraries, unless they are
"fat" libraries.

Best,
-dan

On 5/24/11 5:02 PM, "Stuart Edwards" <sedwards2@cinci.rr.com> wrote:

Hi -

I'm trying to install SWIG in order to support an Octave package for which it
is a dependency.  I'm using OS X 10.6.7 and Octave 3.4.0. (I was pleased to
see that this release of SWIG will support Octave 3.4.0)

However, at 'make' I get the following error:

ld: warning: in /Applications/Octave.app/Contents/Resources/lib/libpcre.dylib,
missing required architecture x86_64 in file
Undefined symbols:
 "_pcre_version", referenced from:
     _Swig_pcre_version in misc.o
    (maybe you meant: _Swig_pcre_version)
 "_pcre_compile", referenced from:
     _Swig_string_regex in misc.o
     _Swig_name_regexmatch_value in naming.o
 "_pcre_free", referenced from:
     _Swig_string_regex in misc.o
     _Swig_string_regex in misc.o
     _Swig_name_regexmatch_value in naming.o
 "_pcre_exec", referenced from:
     _Swig_string_regex in misc.o
     _Swig_name_regexmatch_value in naming.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [eswig] Error 1
make[1]: *** [all] Error 2
make: *** [source] Error 2


I switched Octave back to 3.2.3 and got an i386 warning but generally similar
results:

ld: warning: in /Applications/Octave.app/Contents/Resources/lib/libpcre.dylib,
file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols:
 "_pcre_version", referenced from:
     _Swig_pcre_version in misc.o
    (maybe you meant: _Swig_pcre_version)
 "_pcre_compile", referenced from:
     _Swig_string_regex in misc.o
     _Swig_name_regexmatch_value in naming.o
 "_pcre_free", referenced from:
     _Swig_string_regex in misc.o
     _Swig_string_regex in misc.o
     _Swig_name_regexmatch_value in naming.o
 "_pcre_exec", referenced from:
     _Swig_string_regex in misc.o
     _Swig_name_regexmatch_value in naming.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [eswig] Error 1
make[1]: *** [all] Error 2
make: *** [source] Error 2
SEsMacPro:trunk stu$

Any assistance much appreciated.

Stu


------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Swig-user mailing list
Swig-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user

--
Daniel Blezek, PhD
Medical Imaging Informatics Innovation Center

P 127 or (77) 8 8886
T 507 538 8886
E blezek.daniel@mayo.edu

Mayo Clinic
200 First St. S.W.
Harwick SL-44
Rochester, MN 55905
mayoclinic.org
"It is more complicated than you think." -- RFC 1925