[32244] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3511 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 3 14:09:25 2011

Date: Mon, 3 Oct 2011 11:09:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 3 Oct 2011     Volume: 11 Number: 3511

Today's topics:
    Re: perl module for context grammar? <tzz@lifelogs.com>
    Re: so stop problematic <nickbergeronsemail@gmail.com>
        Tk installation woes <nickbergeronsemail@gmail.com>
    Re: Tk installation woes (Jens Thoms Toerring)
    Re: Tk installation woes <nickbergeronsemail@gmail.com>
    Re: Tk installation woes (Jens Thoms Toerring)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sun, 02 Oct 2011 19:37:10 -0400
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: perl module for context grammar?
Message-Id: <87ty7rge3d.fsf@lifelogs.com>

On Sat, 1 Oct 2011 22:19:52 +0800 "ela" <ela@yantai.org> wrote: 

e> "Ted Zlatanov" <tzz@lifelogs.com> wrote in message 
e> news:87ty7slufj.fsf@lifelogs.com...
>> No, the problem is how to parse, the solution (algorithm) is recursive
>> descent (not "decent" although it is decent for most problems :)

e> Thanks for correcting the typo.

Sure, the "descent" part is actually pretty interesting if you're ever
curious about parsing.  I recommend "Parsing Techniques: A Practical
Guide" by Grune and Jacobs; at least the first few chapters are easy to
understand and introduce parsing well.  It's free on the authors' web site.

Ted


------------------------------

Date: Sun, 2 Oct 2011 06:31:19 -0700 (PDT)
From: Miro <nickbergeronsemail@gmail.com>
Subject: Re: so stop problematic
Message-Id: <8939b8fe-796b-4f15-beed-3fb42c61e8b9@d4g2000yqk.googlegroups.com>

On Sep 29, 4:34=A0am, robin <r...@thevoid1.net> wrote:
> withchcraft laws and bad thought phones.
> -r

Yeah.


------------------------------

Date: Sun, 2 Oct 2011 06:30:59 -0700 (PDT)
From: Miro <nickbergeronsemail@gmail.com>
Subject: Tk installation woes
Message-Id: <eb4b51ea-11e1-4e19-bf3b-4d581a8be74e@j10g2000vbb.googlegroups.com>

Greetings, gents.

I picked up Mastering Perl/Tk at my local library, and, anxious to try
it out on my home Slackware system, I downloaded Tk from CPAN, and
cd'ed into the directory.

perl Makefile.PL worked with no problem, however "make" gives me
this...

cc -c  -I.. -I/usr/X11R6/include -I. -Ibitmaps -I/usr/X11R6/include -
D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -
march=i486 -mtune=i686   -DVERSION=\"804.027\" -DXS_VERSION=
\"804.027\" -fPIC "-I/usr/lib/perl5/5.12.3/i486-linux-thread-multi/
CORE"   -Wall -Wno-implicit-int -Wno-comment -Wno-unused -
D__USE_FIXED_PROTOTYPES__ Xlib_f.c
In file included from Xlib_f.c:8:0:
Xlib.h:22:15: error: conflicting types for 'XKeycodeToKeysym'
/usr/include/X11/Xlib.h:1694:15: note: previous declaration of
'XKeycodeToKeysym' was here
make[1]: *** [Xlib_f.o] Error 1
make[1]: Leaving directory `/home/miro/Downloads/Tk-804.027/pTk'
make: *** [pTk/libpTk.a] Error 2

I'm not exactly a Perl (or manual compilation) guru, can anyone tell
me what I must do?


------------------------------

Date: 2 Oct 2011 17:12:45 GMT
From: jt@toerring.de (Jens Thoms Toerring)
Subject: Re: Tk installation woes
Message-Id: <9erkccFuf3U1@mid.uni-berlin.de>

Miro <nickbergeronsemail@gmail.com> wrote:
> Greetings, gents.

> I picked up Mastering Perl/Tk at my local library, and, anxious to try
> it out on my home Slackware system, I downloaded Tk from CPAN, and
> cd'ed into the directory.

> perl Makefile.PL worked with no problem, however "make" gives me
> this...

> cc -c  -I.. -I/usr/X11R6/include -I. -Ibitmaps -I/usr/X11R6/include -
> D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector
> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -
> march=i486 -mtune=i686   -DVERSION=\"804.027\" -DXS_VERSION=
> \"804.027\" -fPIC "-I/usr/lib/perl5/5.12.3/i486-linux-thread-multi/
> CORE"   -Wall -Wno-implicit-int -Wno-comment -Wno-unused -
> D__USE_FIXED_PROTOTYPES__ Xlib_f.c
> In file included from Xlib_f.c:8:0:
> Xlib.h:22:15: error: conflicting types for 'XKeycodeToKeysym'
> /usr/include/X11/Xlib.h:1694:15: note: previous declaration of
> 'XKeycodeToKeysym' was here
> make[1]: *** [Xlib_f.o] Error 1
> make[1]: Leaving directory `/home/miro/Downloads/Tk-804.027/pTk'
> make: *** [pTk/libpTk.a] Error 2

> I'm not exactly a Perl (or manual compilation) guru, can anyone tell
> me what I must do?

It's not a Perl problem but might be a bug in the C code
of Tk, probably the one discussed here:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=613188

There's also a proposed patch by Dominique Dumont I append in full
at the end. It consists of inserting into 'perl-tk-804.029/pTk/Xlib.h'
(or 'perl-tk-804.027/pTk/Xlib.h' in your case) a line with

#ifndef _X11_XLIB_H_

before the line with

 extern XFontStruct *XLoadQueryFont  _ANSI_ARGS_((Display *, const char *));

and another line with

#endif /* _X11_XLIB_H_ */

after the line with

extern int XSubtractRegion _ANSI_ARGS_((Region, Region, Region));

I can't promise that this will really fix the problem but it
might be worth a try.
                                  Regards, Jens

-----------------------8<------------------------------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## fix-ftbs.dpatch by Dominique Dumont <domi.dumont@free.fr>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Added a test that protect against double inclusion with recent
## DP: versions of Xlib.h provided by Xorg. The original test with X_LIB_H_
## DP: was not changed to avoid breaking build when backporting perl-tk
## DP: on older versions of Xorg.

@DPATCH@
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git'
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr'
perl-tk-804.029~/pTk/Xlib.h perl-tk-804.029/pTk/Xlib.h
--- perl-tk-804.029~/pTk/Xlib.h	2007-02-10 09:55:23.000000000 +0100
+++ perl-tk-804.029/pTk/Xlib.h	2011-04-20 17:37:27.000000000 +0200
@@ -1,6 +1,7 @@
 #ifndef _XLIB
 #define _XLIB
 #ifndef _XLIB_H_
+#ifndef _X11_XLIB_H_
 extern XFontStruct *XLoadQueryFont  _ANSI_ARGS_((Display *, const char *));
 extern XModifierKeymap *XGetModifierMapping  _ANSI_ARGS_((Display *));
 extern XImage *XCreateImage  _ANSI_ARGS_((Display *, Visual *, unsigned int,
 int, int, char *, unsigned int, unsigned int, int, int));
@@ -143,6 +144,7 @@
 extern Window XGetSelectionOwner _ANSI_ARGS_((Display *, Atom));
 extern int XRectInRegion _ANSI_ARGS_((Region,int,int,unsigned,unsigned));
 extern int XSubtractRegion _ANSI_ARGS_((Region, Region, Region));
+#endif /* _X11_XLIB_H_ */
 #endif /* _XLIB_H_ */
 extern int _XInitImageFuncPtrs _ANSI_ARGS_((XImage *image));
 #endif /* _XLIB */
-----------------------8<------------------------------------

-- 
  \   Jens Thoms Toerring  ___      jt@toerring.de
   \__________________________      http://toerring.de


------------------------------

Date: Sun, 2 Oct 2011 11:19:27 -0700 (PDT)
From: Miro <nickbergeronsemail@gmail.com>
Subject: Re: Tk installation woes
Message-Id: <ea82dd25-1f82-435e-a23f-abd497328c83@j20g2000vby.googlegroups.com>

On Oct 2, 9:12=A0am, j...@toerring.de (Jens Thoms Toerring) wrote:
> Miro <nickbergeronsem...@gmail.com> wrote:
> > Greetings, gents.
> > I picked up Mastering Perl/Tk at my local library, and, anxious to try
> > it out on my home Slackware system, I downloaded Tk from CPAN, and
> > cd'ed into the directory.
> > perl Makefile.PL worked with no problem, however "make" gives me
> > this...
> > cc -c =A0-I.. -I/usr/X11R6/include -I. -Ibitmaps -I/usr/X11R6/include -
> > D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector
> > -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -O2 -
> > march=3Di486 -mtune=3Di686 =A0 -DVERSION=3D\"804.027\" -DXS_VERSION=3D
> > \"804.027\" -fPIC "-I/usr/lib/perl5/5.12.3/i486-linux-thread-multi/
> > CORE" =A0 -Wall -Wno-implicit-int -Wno-comment -Wno-unused -
> > D__USE_FIXED_PROTOTYPES__ Xlib_f.c
> > In file included from Xlib_f.c:8:0:
> > Xlib.h:22:15: error: conflicting types for 'XKeycodeToKeysym'
> > /usr/include/X11/Xlib.h:1694:15: note: previous declaration of
> > 'XKeycodeToKeysym' was here
> > make[1]: *** [Xlib_f.o] Error 1
> > make[1]: Leaving directory `/home/miro/Downloads/Tk-804.027/pTk'
> > make: *** [pTk/libpTk.a] Error 2
> > I'm not exactly a Perl (or manual compilation) guru, can anyone tell
> > me what I must do?
>
> It's not a Perl problem but might be a bug in the C code
> of Tk, probably the one discussed here:
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D613188
>
> There's also a proposed patch by Dominique Dumont I append in full
> at the end. It consists of inserting into 'perl-tk-804.029/pTk/Xlib.h'
> (or 'perl-tk-804.027/pTk/Xlib.h' in your case) a line with
>
> #ifndef _X11_XLIB_H_
>
> before the line with
>
> =A0extern XFontStruct *XLoadQueryFont =A0_ANSI_ARGS_((Display *, const ch=
ar *));
>
> and another line with
>
> #endif /* _X11_XLIB_H_ */
>
> after the line with
>
> extern int XSubtractRegion _ANSI_ARGS_((Region, Region, Region));
>
> I can't promise that this will really fix the problem but it
> might be worth a try.
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Regar=
ds, Jens
>
> -----------------------8<------------------------------------
> #! /bin/sh /usr/share/dpatch/dpatch-run
> ## fix-ftbs.dpatch by Dominique Dumont <domi.dum...@free.fr>
> ##
> ## All lines beginning with `## DP:' are a description of the patch.
> ## DP: Added a test that protect against double inclusion with recent
> ## DP: versions of Xlib.h provided by Xorg. The original test with X_LIB_=
H_
> ## DP: was not changed to avoid breaking build when backporting perl-tk
> ## DP: on older versions of Xorg.
>
> @DPATCH@
> diff -urNad '--exclude=3DCVS' '--exclude=3D.svn' '--exclude=3D.git'
> '--exclude=3D.arch' '--exclude=3D.hg' '--exclude=3D_darcs' '--exclude=3D.=
bzr'
> perl-tk-804.029~/pTk/Xlib.h perl-tk-804.029/pTk/Xlib.h
> --- perl-tk-804.029~/pTk/Xlib.h 2007-02-10 09:55:23.000000000 +0100
> +++ perl-tk-804.029/pTk/Xlib.h =A02011-04-20 17:37:27.000000000 +0200
> @@ -1,6 +1,7 @@
> =A0#ifndef _XLIB
> =A0#define _XLIB
> =A0#ifndef _XLIB_H_
> +#ifndef _X11_XLIB_H_
> =A0extern XFontStruct *XLoadQueryFont =A0_ANSI_ARGS_((Display *, const ch=
ar *));
> =A0extern XModifierKeymap *XGetModifierMapping =A0_ANSI_ARGS_((Display *)=
);
> =A0extern XImage *XCreateImage =A0_ANSI_ARGS_((Display *, Visual *, unsig=
ned int,
> =A0int, int, char *, unsigned int, unsigned int, int, int));
> @@ -143,6 +144,7 @@
> =A0extern Window XGetSelectionOwner _ANSI_ARGS_((Display *, Atom));
> =A0extern int XRectInRegion _ANSI_ARGS_((Region,int,int,unsigned,unsigned=
));
> =A0extern int XSubtractRegion _ANSI_ARGS_((Region, Region, Region));
> +#endif /* _X11_XLIB_H_ */
> =A0#endif /* _XLIB_H_ */
> =A0extern int _XInitImageFuncPtrs _ANSI_ARGS_((XImage *image));
> =A0#endif /* _XLIB */
> -----------------------8<------------------------------------
>
> --
> =A0 \ =A0 Jens Thoms Toerring =A0___ =A0 =A0 =A0j...@toerring.de
> =A0 =A0\__________________________ =A0 =A0 =A0http://toerring.de
 did ^:
Wow. An unfixed bug that crippling in Tk? I thought it had been around
since the dawn of time? Linus's Law shudders.
Anywhoo, your patch worked great in that 'make' now took of without a
hitch (even though I have no idea what the hack I just :^)
I owe you and the community much gratitude.

--Miro


------------------------------

Date: 2 Oct 2011 22:53:30 GMT
From: jt@toerring.de (Jens Thoms Toerring)
Subject: Re: Tk installation woes
Message-Id: <9es8baFugvU1@mid.uni-berlin.de>

Miro <nickbergeronsemail@gmail.com> wrote:
> Wow. An unfixed bug that crippling in Tk? I thought it had been around
> since the dawn of time? Linus's Law shudders.

Actually, as far as I understand the comments in the patch it's
about a new version of XLib Tk wasn't yet tested against - and
the guys taking care of the Tk stuff can't forsee everything
that's going to happen to things they necessarily have to depend
upon but have no influence over. If you closely look at the docu-
mentation you might even find some information against what they
tested and if you use something newer things can become "inter-
esting"...

> Anywhoo, your patch

Not my patch, it was by Dominique Dumont <domi.dumont@free.fr>,
all I did was a tiny bit of google'ing;-)

> worked great in that 'make' now took of without a hitch

Fine;-)
                        Regards, Jens
-- 
  \   Jens Thoms Toerring  ___      jt@toerring.de
   \__________________________      http://toerring.de


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 3511
***************************************


home help back first fref pref prev next nref lref last post