Skip Menu |

This queue is for tickets about the Perl-Dist CPAN distribution.

Report information
The Basics
Id: 32000
Status: resolved
Priority: 0/
Queue: Perl-Dist

People
Owner: Nobody in particular
Requestors: h.m.brand [...] xs4all.nl
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Tk won't build
Tk happens to be one of the most complicated/critical modules to build. I know, I build it on HP-UX (10.20, 11.00, 11.11, and 11.23) in both 32bit and 64bit (PA-RISC and Itanium 2) for both the native compiler and GNU gcc. That is why I am so happy ActivePerl bundles it, and I do not have to go through the trouble of building it myself. Strawberry perl has a bundled developer suite. Hooray! $ cpan.bat Text::CSV_XS runs fine out of the box. Hooray again! but $ cpan.bat Tk fails. gcc -c -IC:\strawberry\c\include -s -O2 -DWIN32 - DHAVE_DES_FCRYPT -DPERL_ IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing - DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\"804.028\" -DXS_VERSION=\"804.028\" "-IC: \strawber ry\perl\lib\CORE" -Wall -Wno-implicit-int -Wno-comment -Wno-unused - D__USE_FIX ED_PROTOTYPES__ Tk.c In file included from pTk/tkPort.h:28, from Tk.xs:16: pTk/tkWinPort.h:19:22: X11/Xlib.h: No such file or directory pTk/tkWinPort.h:20:28: X11/cursorfont.h: No such file or directory pTk/tkWinPort.h:21:24: X11/keysym.h: No such file or directory pTk/tkWinPort.h:22:23: X11/Xatom.h: No such file or directory pTk/tkWinPort.h:23:23: X11/Xutil.h: No such file or directory In file included from pTk/tkInt.h:21, from Tk.xs:17: pTk/tk.h:599: error: syntax error before "Window" pTk/tk.h:599: error: `Window' declared as function returning a function pTk/tk.h:599: warning: parameter names (without types) in function declaration pTk/tk.h:602: error: syntax error before "XEvent" pTk/tk.h:611: error: syntax error before "Tk_ClassCreateProc" pTk/tk.h:611: warning: no semicolon at end of struct or union pTk/tk.h:619: error: syntax error before '}' token etc etc
From: h.m.brand [...] xs4all.nl
Show quoted text
> $ cpan.bat Tk > > fails.
$ cd \strawberry\cpan\build\Tk* $ make distclean * fails * $ nmake distclean * fails * $ dmake distclean $ perl Makefile.PL MSWin32 $ dmake $ dmake test $ dmake install UNINST=1 * SUCCESS *
Subject: Re: [rt.cpan.org #32000] Tk won't build
Date: Mon, 31 Dec 2007 11:47:37 +1100
To: bug-Perl-Dist [...] rt.cpan.org
From: "Adam Kennedy" <adamkennedybackup [...] gmail.com>
It sounds like this is a Tk bug, it needs to be able to detect the platform, rather than needing to be told. Adam K On 30/12/2007, h.m.brand@xs4all.nl via RT <bug-Perl-Dist@rt.cpan.org> wrote: Show quoted text
> > > Queue: Perl-Dist > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=32000 > >
> > $ cpan.bat Tk > > > > fails.
> > $ cd \strawberry\cpan\build\Tk* > $ make distclean > * fails * > $ nmake distclean > * fails * > $ dmake distclean > $ perl Makefile.PL MSWin32 > $ dmake > $ dmake test > $ dmake install UNINST=1 > > * SUCCESS * >
This is a Tk bug (and a bug for it exists in the Tk queue) and not a fault with Perl::Dist.
On Mon Sep 29 05:05:16 2008, ADAMK wrote: Show quoted text
> This is a Tk bug (and a bug for it exists in the Tk queue) and not a > fault with Perl::Dist.
No. The problem is that the Strawberry Perl's default CPAN.pm configuration sets INC and LIBS in makepl_args. This seems to overwrite the internal settings in Tk's own Makefile.PL, leading to the compile error. Building Perl/Tk using perl Makefile.PL && dmake however works, because INC and LIBS is not changed. You can or cannot set "MSWin32" in the perl Makefile.PL command line, it does not matter. This is only used for cygwin builds, where you can use either native Windows or X11 libs. I think you should just set incpth and libpth in perl's Config.pm instead. This way the correct include and library files should be used regardless if CPAN.pm, CPANPLUS, or a build from command line was used. Regards, Slaven