ROOT 5.34.03 in 32 bits on MacOSX

Hi,

I have a software project which interfaces a couple of python packages, one of which can only run in 32-bit mode at the moment. So I am trying to setup ROOT in 32-bit on my macbook pro with Mountain Lion. Everything seems fine during configuration. I use:

sudo ./configure macosx --with-python-incdir=/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 --with-python-libdir=/Library/Frameworks/Python.framework/Versions/2.7/lib --disable-x11

I disable X11 because apparently libX11 is hard to find when you are running with XQuartz (you don’t really have any choice in Mountain Lion), but I really don’t care about windowing support for root in this use case. In any case, I see:

...
Checking whether to build included libpcre ... no
Checking for zlib.h ... /opt/local/include
Checking for libz ... /usr/lib
...

and into config.log:

Checking if /usr/lib/libz.dylib contains compatible code
 lipo -info /usr/lib/libz.dylib | grep ' i386'
 result: 1
 is a compatible library

So it looks like it finds the right libz library to use in /usr/lib. But then, when I do make, I get the following:

ld: warning: ld: warning: ignoring file /opt/local/lib/libpcre.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /opt/local/lib/libpcre.dylibignoring file /opt/local/lib/libz.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /opt/local/lib/libz.dylib

Undefined symbols for architecture i386:
  "_deflate", referenced from:
      _R__zipMultipleAlgorithm in ZDeflate.o
  "_deflateEnd", referenced from:
      _R__zipMultipleAlgorithm in ZDeflate.o
  "_deflateInit_", referenced from:
      _R__zipMultipleAlgorithm in ZDeflate.o
  "_inflate", referenced from:
      _R__unzip in ZInflate.o
  "_inflateEnd", referenced from:
      _R__unzip in ZInflate.o
  "_inflateInit_", referenced from:
      _R__unzip in ZInflate.o
  "_pcre_compile", referenced from:
      TPRegexp::Compile() in TPRegexp.o
  "_pcre_exec", referenced from:
      TPRegexp::MatchInternal(TString const&, int, int, TArrayI*) in TPRegexp.o
      TPRegexp::SubstituteInternal(TString&, TString const&, int, int, bool) in TPRegexp.o
  "_pcre_free", referenced from:
      TPRegexp::~TPRegexp() in TPRegexp.o
      TPRegexp::operator=(TPRegexp const&) in TPRegexp.o
      TPRegexp::Compile() in TPRegexp.o
      TPRegexp::Optimize() in TPRegexp.o
  "_pcre_study", referenced from:
      TPRegexp::Optimize() in TPRegexp.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [lib/libCore.so] Error 1

What I don’t understand is that ./configure clearly picks libz.dylib in /usr/lib but then tries to compile with libz.dylib in /opt/local/lib, which happens not to be a universal binary (only x86_64), so it doesn’t work… Isn’t make supposed to be using the paths found in configure? How can I force it to compile using /usr/lib/libz.dylib?

Cheers and happy holidays,
Michel.