blackfoot has asked for the wisdom of the Perl Monks concerning the following question:

It seems like I have followed all the instructions to get Tk working on my mac powerbook and it still fails. I have all the mac patches, the development kit installed, recompiled perl 5.8.4, have Xdarwin installed and I added the X libs to my path, but Tk fails to compile on versions 24 and 27. HELP! The output is abreviated.

Here is the output for 24...

[blackfoot /usr/local/src/Tk800.024] sudo perl Makefile.PL ]perl is installed in /usr/lib/perl5/5.8.4/darwin okay PPM for perl5.008004 ... Test Compiling -DTIMEOFDAY_TZ config/tod.c TZ gettimeofday() Using -L/usr/X11R6/lib to find /usr/X11R6/lib/libX11.dylib Using -I/usr/X11R6/include to find /usr/X11R6/include/X11/Xlib.h Generating Dependencies for darwin, win_arch=x ... Writing Makefile for Tk [blackfoot /usr/local/src/Tk800.024] sudo make cd pTk && make DEFINE="" ... /usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" ../blib/script/wi +dget Unrecognized switch: --center (-h will show valid options). make[1]: *** [manifypods] Error 255 make: *** [subdirs] Error 2
Here is the output for 27...
[/usr/local/src/Tk-804.027] sudo perl Makefile.PL perl is installed in /usr/lib/perl5/5.8.4/darwin okay ... Using -L/usr/X11R6/lib to find /usr/X11R6/lib/libX11.dylib Using -I/usr/X11R6/include to find /usr/X11R6/include/X11/Xlib.h XFT not requested .... No HASH(0x3fa5ac) at ./Makefile.PL line 132 ... checking for gcc... cc checking whether the C compiler (cc -pipe -fno-common -DPERL_DARWIN -n +o-cpp-precomp -fno-strict-aliasing -I/usr/local/include -pipe -fno- +common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/loca +l/include -flat_namespace -L/usr/local/lib) works... yes checking whether the C compiler (cc -pipe -fno-common -DPERL_DARWIN -n +o-cpp-precomp -fno-strict-aliasing -I/usr/local/include -pipe -fno- +common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/loca +l/include -flat_namespace -L/usr/local/lib) is a cross-compiler... n +o checking whether we are using GNU C... yes checking how to run the C preprocessor... cc -E .... Writing Makefile for Tk::IO [/usr/local/src/Tk-804.027] sudo make cd pTk && make DEFINE="" .... + /usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" ../blib/script/wi +dget Unrecognized switch: --center (-h will show valid options). make[1]: *** [manifypods] Error 255 make: *** [subdirs] Error 2

edit (broquaint): added <code> tags and a <readmore>

Replies are listed 'Best First'.
Re: Mac OS X 10.2 and Tk
by eserte (Deacon) on May 04, 2004 at 16:12 UTC
    Unrecognized switch: --center (-h will show valid options).

    I am pretty sure that this error is only apparent in Tk 800.024 and earlier. A workaround to this problem is to use "make -k" instead of "make" to ignore the podify errors.

      Thank you for the suggestion, eserte. I tried make clean and then reran make -k, but I still get the center error. I would prefer to go with the newer option if that is possible, but either one would be good at this point.
        Yes, you get the error, but the build should continue and give you a working Tk, just without the documentation.
        When I try to install Tk off CPAN, I get the following different error.

        make[2]: *** [../../blib/arch/auto/Tk/X/X.bundle] Error 1 make[1]: *** [subdirs] Error 2 make: *** [subdirs] Error 2 /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible
Re: Mac OS X 10.2 and Tk
by adrianh (Chancellor) on May 04, 2004 at 19:23 UTC
    It seems like I have followed all the instructions to get Tk working on my mac powerbook and it still fails.

    You might be interested in the Tkl/Tk Aqua, which apparently now supports Perl (although I've not had a chance to try it out myself yet). Includes a nice binary installation to save you the effort of compilation :-)

      I tried the Tkl/Tk Aqua and couldn't figure out how to add support. I tried the man -k again. I went back through the code and found an error crop up several times that I think is the root of my problem.

      ld: undefined symbols:
      I assume this means my perl install or path is setup incorrectly. I am going to investigate this possibility further.
        I erased the hard drive and installed 10.3, which comes with perl 5.8 installed. I installed xcode, X11, set my PATH, etc and it still failed. I went back and manually installed the X11SDK from the xcode installs and rebooted. When I rebooted Tk installed no problem. Hope this helps the next poor guy to try this. ;)