eserte / perl-tk

the perl module Tk
https://metacpan.org/release/Tk
Other
44 stars 31 forks source link

perl/Tk can't find X11 on OS X Yosemite #11

Closed timj closed 9 years ago

timj commented 9 years ago

Trying to build perl Tk 804.032 on Yosemite:

Test Compiling config/perlrx.c
Test Compiling config/pmop.c
Test Compiling config/pregcomp2.c
Test Compiling config/regexp511.c
Test Compiling config/signedchar.c
Test Compiling config/Ksprintf.c
Test Compiling config/svtrv.c
Test Compiling config/copstashset.c
Test Compiling config/tod.c
Generic gettimeofday()
Cannot find -lX11 anywhere --- cannot build Perl/Tk

Xquartz now installs into /opt/X11 which doesn't seem to be a search path known to perl/Tk. Adding -I/opt/X11/include to perl's Config ccflags and -L/opt/X11/lib to Config ldflags didn't make any difference. I'm not sure which of the myriad Makefile.PL I'm supposed to edit to teach perl/Tk to look in the new place.

dod38fr commented 9 years ago

I think you need to tweak myConfig in the top level directory.

HTH

timj commented 9 years ago

Thanks. This patch fixes it for me. I'll make a pull request for it.

--- myConfig.ori    2014-11-06 08:39:09.000000000 -0700
+++ myConfig    2014-11-06 08:43:21.000000000 -0700
@@ -360,7 +360,8 @@
   #
   unless (defined $xlib)
     {
-      $xlib = &lX11(0,chooseX11(</usr/X11*/lib>),chooseX11(</usr/lib/X11*>),</usr/Xfree*/lib>,'/usr/X386/lib')
+      $xlib = &lX11(0,chooseX11(</usr/X11*/lib>),chooseX11(</usr/lib/X11*>),</usr/Xfree*/lib>,'/usr/X386/lib',
+                    '/opt/X11/lib')
     }

   #
timj commented 9 years ago

Pull request now done in #12