Help building

I’ve been a long time, happy user of MPL, but I’m having some problems building the latest version (0.98.5.3) on the Mac (python 2.6.2).

The bottom line is that when I build, I get the error message:

ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file is not o
f required architecture for architecture ppc
collect2: ld returned 1 exit status
lipo: can’t open input file: /var/folders/tu/tuLdYMqlEm00c5EVXrMQ+U+++TQ/-Tmp-//
cci4zDq4.out (No such file or directory)
error: command ‘g++’ failed with exit status 1

However, I have a freshly-built version of libpng installed from source in /usr/local/lib. I don’t think MPL is finding it, though, since during config I see:

            libpng: found, but unknown version (no pkg-config)

(However, when I install libpng, I do install the pc file, viz:
cd /usr/local/lib/pkgconfig; rm -f libpng.pc
cd /usr/local/lib/pkgconfig; ln -s libpng12.pc libpng.pc)

I’m probably doing something dumb. Is there a workaround to this?

Thanks in advance,

Rick

···


Rick Muller
rpmuller@…287…

What does

  pkg-config libpng --modversion --libs --cflags

give?

The pkg-config error may actually be a red herring, since matplotlib will look in /usr/local even if pkg-config fails, and it obviously found the headers or it wouldn't have gotten to the linking stage. As the author of the pkg-config support I would like to rule that out as the problem though.

I think it's more likely that the libpng isn't being built correctly to match the kind of binary matplotlib is building. I'm afraid that's where I hit the end of my knowledge as a non-Mac user, but I'm sure another Mac developer will chime in.

Cheers,
Mike

Rick Muller wrote:

···

I've been a long time, happy user of MPL, but I'm having some problems building the latest version (0.98.5.3) on the Mac (python 2.6.2).

The bottom line is that when I build, I get the error message:

ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file is not o
f required architecture for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/tu/tuLdYMqlEm00c5EVXrMQ+U+++TQ/-Tmp-//
cci4zDq4.out (No such file or directory)
error: command 'g++' failed with exit status 1

However, I have a freshly-built version of libpng installed from source in /usr/local/lib. I don't think MPL is finding it, though, since during config I see:

                libpng: found, but unknown version (no pkg-config)

(However, when I install libpng, I do install the pc file, viz:
cd /usr/local/lib/pkgconfig; rm -f libpng.pc
cd /usr/local/lib/pkgconfig; ln -s libpng12.pc libpng.pc)

I'm probably doing something dumb. Is there a workaround to this?

Thanks in advance,

Rick

--
Rick Muller
rpmuller@...287... <mailto:rpmuller@…287…>
------------------------------------------------------------------------

------------------------------------------------------------------------------
  ------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

What does

pkg-config libpng --modversion --libs --cflags

give?

I guess I don’t have pkg-config installed. Is this a requirement? I haven’t had it installed before?

The pkg-config error may actually be a red herring, since matplotlib will look in /usr/local even if pkg-config fails, and it obviously found the headers or it wouldn’t have gotten to the linking stage. As the author of the pkg-config support I would like to rule that out as the problem though.

I think it’s more likely that the libpng isn’t being built correctly to match the kind of binary matplotlib is building. I’m afraid that’s where I hit the end of my knowledge as a non-Mac user, but I’m sure another Mac developer will chime in.

I think it’s just finding the wrong version of libpng. For whatever reason, it has decided that an old version in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib is the proper version, despite there being a newer version in /usr/local/lib.

Is there any way I can rearrange the search path so that it finds the /usr/local/lib version?

Rick

···

On Tue, Jun 30, 2009 at 9:14 AM, Michael Droettboom <mdroe@…120…86…> wrote:


Rick Muller
rpmuller@…287…

Okay, I just installed pkg-config, and it now finds the proper libpng…

            libpng: 1.2.37

However, I still get exactly the same compile problem:

g++ -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -u

ndefined dynamic_lookup build/temp.macosx-10.3-fat-2.6/src/ft2font.o build/temp.
macosx-10.3-fat-2.6/src/mplutils.o build/temp.macosx-10.3-fat-2.6/CXX/cxx_extens
ions.o build/temp.macosx-10.3-fat-2.6/CXX/cxxsupport.o build/temp.macosx-10.3-fa

t-2.6/CXX/IndirectPythonInterface.o build/temp.macosx-10.3-fat-2.6/CXX/cxxextens
ions.o -L/usr/local/lib -L/usr/lib -L/usr/X11R6/lib -lfreetype -lz -lstdc++ -lm
-o build/lib.macosx-10.3-fat-2.6/matplotlib/ft2font.so

ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file is not o
f required architecture for architecture ppc
collect2: ld returned 1 exit status
lipo: can’t open input file: /var/folders/tu/tuLdYMqlEm00c5EVXrMQ+U+++TQ/-Tmp-//

ccU5pNn1.out (No such file or directory)
error: command ‘g++’ failed with exit status 1

···

On Tue, Jun 30, 2009 at 9:14 AM, Michael Droettboom <mdroe@…120…86…> wrote:

What does

pkg-config libpng --modversion --libs --cflags

give?

The pkg-config error may actually be a red herring, since matplotlib will look in /usr/local even if pkg-config fails, and it obviously found the headers or it wouldn’t have gotten to the linking stage. As the author of the pkg-config support I would like to rule that out as the problem though.

I think it’s more likely that the libpng isn’t being built correctly to match the kind of binary matplotlib is building. I’m afraid that’s where I hit the end of my knowledge as a non-Mac user, but I’m sure another Mac developer will chime in.


Rick Muller
rpmuller@…287…