Kingsley Oteng-Amoako | 20 Dec 05:17 2010
Picon

Fwd: Perl-Tk Make Error

Hello Macports,

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 installHowever 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
Does anyone have suggestions on how to make the file and/or what might be causing the error?
Frank


<div>
<div class="gmail_quote">Hello Macports,<div><br></div>
<div>I am trying to install Perl Tk on my MacBook Pro. I downloaded&nbsp;Tk-804.029 on my pac and followed the following process,&nbsp;</div>
<div>
cd Tk-804.029
perl Makefile.PL
make
make test
sudo make installHowever 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<span>
</span><br>Does anyone have suggestions on how to make the file and/or what might be causing the error?
<br>Frank<div><br></div>
</div>
</div>
<br>
</div>
Ryan Schmidt | 20 Dec 05:47 2010

Re: Perl-Tk Make Error

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.

> 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.

Kingsley Oteng-Amoako | 20 Dec 06:20 2010
Picon

Re: Perl-Tk Make Error

Hello Ryan, 


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


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?




On Sun, Dec 19, 2010 at 11:47 PM, Ryan Schmidt <ryandesign <at> macports.org> 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.


> 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.



<div>
<p>Hello Ryan,&nbsp;</p>
<div><br></div>
<div>Below is the previous error plus the couple of lines that occur before the error,</div>
<div><br></div>
<div>
<div>gcc-4.2 &nbsp; -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include &nbsp; -DUSE_MMAP &nbsp; -c -o inffast.o inffast.c</div>
<div>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&nbsp;</div>
<div>ar: libz.a is a fat file (use libtool(1) or lipo(1) and ar(1) on it)</div>
<div>ar: libz.a: Inappropriate file type or format</div>
<div>make[2]: *** [libz.a] Error 1</div>
<div>make[1]: *** [zlib/libz.a] Error 2</div>
<div>make: *** [subdirs] Error 2</div>
<div><br></div>
<div><br></div>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,</div>
<div><br></div>
<div><span class="Apple-style-span">tlmgr gui</span></div>
<div><span class="Apple-style-span"><br></span></div>
<div><span class="Apple-style-span">Do you still think it would suffice to simply install the port, given I am using it for tlmgr?</span></div>
<div><span class="Apple-style-span"><br></span></div>
<div><span class="Apple-style-span"><br></span></div>
<div><span class="Apple-style-span"><br></span></div>
<div><span class="Apple-style-span"><br></span></div>
<div>
<div class="gmail_quote">On Sun, Dec 19, 2010 at 11:47 PM, Ryan Schmidt <span dir="ltr">&lt;<a href="mailto:ryandesign <at> macports.org">ryandesign <at> macports.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
<div class="im">On Dec 19, 2010, at 22:17, Kingsley Oteng-Amoako wrote:<br><br>
&gt; I am trying to install Perl Tk on my MacBook Pro. I downloaded Tk-804.029 on my pac and followed the following process,<br>
&gt; cd Tk-804.029<br>
&gt; perl Makefile.PL<br>
&gt; make<br>
&gt; make test<br>
&gt; sudo make install<br>
&gt;<br>
&gt; However after typing the second set of commands, I get a series of errors after the make attempt. The errors were,<br>
&gt; make[3]: *** [libpng12_la-png.lo] Error 1<br>
&gt; make[2]: *** [all] Error 2<br>
&gt; make[1]: *** [libpng/libpng.a] Error 2<br>
&gt; make: *** [subdirs] Error 2<br><br>
</div>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.<br><div class="im">
<br><br>
&gt; Does anyone have suggestions on how to make the file and/or what might be causing the error?<br><br>
</div>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.<br><br><br>
</blockquote>
</div>
<br>
</div>
</div>
Ryan Schmidt | 20 Dec 07:35 2010

Re: Perl-Tk Make Error

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.


Gmane