Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A friend tried to install Perl/Tk 804.029 from source on his MacBook Pro, but it failed during the build of the internal zlib archive:

$ cpanp -i Tk
cd zlib && make libz.a "CC=llvm-gcc-4.2  " RANLIB="/usr/bin/ar s"
llvm-gcc-4.2   -arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include   -DUSE_MMAP   -c -o inffast.o inffast.c
ar rc libz.a adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o 
ar: libz.a is a fat file (use libtool(1) or lipo(1) and ar(1) on it)
ar: libz.a: Inappropriate file type or format
make[2]: *** [libz.a] Error 1
make[1]: *** [zlib/libz.a] Error 2
make: *** [subdirs] Error 2
share|improve this question
sudo port install p5-tk – Jared Burrows Sep 9 '13 at 5:11

See this discussion on the MacPorts mailing list. The primary suggestion is to use MacPorts and install the p5-tk port, which will include all its dependencies. I would agree with that, but if you're not interested in using MacPorts, then you would be best to build zlib outside of your Perl/Tk installation. The key thing is that the two architectures you have there, x86_64 and i386, create a fat library file which is not supported by the build system.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .