On Dec 19, 2010, at 23:20, Kingsley Oteng-Amoako wrote:
> On Sun, Dec 19, 2010 at 11:47 PM, Ryan Schmidt wrote:
>> On Dec 19, 2010, at 22:17, Kingsley Oteng-Amoako wrote:
>> 
>> > I am trying to install Perl Tk on my MacBook Pro. I downloaded Tk-804.029 
>> > on my pac and followed the following process,
>> > cd Tk-804.029
>> > perl Makefile.PL
>> > make
>> > make test
>> > sudo make install
>> >
>> > However after typing the second set of commands, I get a series of errors 
>> > after the make attempt. The errors were,
>> > make[3]: *** [libpng12_la-png.lo] Error 1
>> > make[2]: *** [all] Error 2
>> > make[1]: *** [libpng/libpng.a] Error 2
>> > make: *** [subdirs] Error 2
>> 
>> The actual error message would have been on a line earlier than that, so you 
>> would need to supply more of the log to know what went wrong.
> 
> Below is the previous error plus the couple of lines that occur before the 
> error,
> 
> gcc-4.2   -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common 
> -DPERL_DARWIN -fno-strict-aliasing -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

The error you showed previously was for libpng.a; this error is for libz.a. 
Probably similar though. It looks like Perl-Tk has an included copy of zlib, 
libpng and jpeg that it will build if it cannot find one on your system. And it 
looks like you (or the build system) requested the build happen for three 
architectures: x86_64, i386 and ppc. And the build system does not support fat 
libraries, because it tries to run "ar rc" on them, which you can't run on fat 
files. You would need to change the Makefile to run "ar rcs" instead, I think. 
But it would be better to use separate up-to-date zlib, libpng, and jpeg 
libraries, such as the ones provided by MacPorts. And then it would be better 
to use the p5-tk port since it already knows how to do that.

In MacPorts, I'm able to build p5-tk, unless I deactivate my zlib, libpng and 
jpeg ports, in which case I get an error when trying to build the included 
libpng. A different error, but also related to using multiple -arch flags. So 
p5-tk needs dependencies on those ports, which I have now added:

http://trac.macports.org/changeset/74521


>> > Does anyone have suggestions on how to make the file and/or what might be 
>> > causing the error?
>> 
>> Is this the same as the software that's in the p5-tk port? If so, you should 
>> install that port, rather than trying to build it by hand.
> 
> I am actually installing TK as it is need for a Latex Packet manager tlmgr. 
> So assuming TK was installed properly, the gui for the packet manager would 
> be started as,
> 
> tlmgr gui
> 
> Do you still think it would suffice to simply install the port, given I am 
> using it for tlmgr?

As a rule, I prefer to install software with MacPorts, since it means someone 
else has already figured out the details of how to do that on Mac OS X and I 
wouldn't for example generally run into surprises like the ones you're now 
running into. However, I have no idea how tlmgr works, or how it finds its perl 
binary or modules. If possible, you would need to tell tlmgr to use the perl 
installed by MacPorts in /opt/local/bin/perl, or add MacPorts perl's module 
paths to the perl that tlmgr uses.


_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Reply via email to