[mp1] Apache::Symbol and perl Symbol.pm possible clash due to bareword gensym reference

2004-04-07 Thread TGS
I am having problems compiling mod_perl as the following errors report.

...
make[1]: Entering directory 
`/usr/local/perl-cpan/build/mod_perl-1.29/Symbol'
Running Mkbootstrap for Apache::Symbol ()
chmod 644 Symbol.bs
rm -f ../blib/arch/auto/Apache/Symbol/Symbol.so
LD_RUN_PATH="" gcc  -shared -L/usr/local/lib Symbol.o  -o 
../blib/arch/auto/Apache/Symbol/Symbol.so
chmod 755 ../blib/arch/auto/Apache/Symbol/Symbol.so
cp Symbol.bs ../blib/arch/auto/Apache/Symbol/Symbol.bs
chmod 644 ../blib/arch/auto/Apache/Symbol/Symbol.bs
Bareword "gensym" not allowed while "strict subs" in use at 
/usr/lib/perl5/5.8.3/Pod/Parser.pm line 1158.
Bareword "gensym" not allowed while "strict subs" in use at 
/usr/lib/perl5/5.8.3/Pod/Parser.pm line 1158.
Compilation failed in require at /usr/lib/perl5/5.8.3/Pod/Man.pm line 30.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.3/Pod/Man.pm 
line 30.
Compilation failed in require at 
/usr/lib/perl5/5.8.3/ExtUtils/Command/MM.pm line 86.
make[1]: *** [manifypods] Error 255
make[1]: Leaving directory `/usr/local/perl-cpan/build/mod_perl-1.29/Symbol'
make: *** [subdirs] Error 2

The offending /usr/lib/perl5/5.8.3/Pod/Parser.pm line 1158 is

my ($in_fh,  $out_fh) = (gensym, gensym)  if ($] < 5.6);

I thought that I could fix it by changing the reference to 
Symbol::gensym() from the gensym reference.

for instance, this works fine as a small test program to resolve the 
bareword issue ...

#!/usr/bin/perl -w
use strict;
require Symbol;
import Symbol;
my ($in_fh,  $out_fh) = (Symbol::gensym(), Symbol::gensym())  if ($] < 5.6);
But when I do that, it seems that I get a clash on perl's Symbol.pm and 
Apache::Symbol with this new error

Undefined subroutine &Symbol::gensym called at 
/usr/lib/perl5/5.8.3/Pod/Parser.pm line 1158.

perl -v follows:

Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration:
 Platform:
   osname=linux, osvers=2.4.21-2.elsmp, archname=i386-linux-thread-multi
   uname='linux porky.devel.redhat.com 2.4.21-2.elsmp #1 smp wed sep 17 
15:00:55 edt 2003 i686 i686 i386 gnulinux '
   config_args='-des -Doptimize=-O2 -g -pipe -march=i386 -mcpu=i686 
-Dversion=5.8.3 -Dmyhostname=localhost [EMAIL PROTECTED] 
-Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr 
-Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib 
-Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun 
-Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio 
-Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less 
-isr -Dinc_version_list=5.8.2 5.8.1 5.8.0'
   hint=recommended, useposix=true, d_sigaction=define
   usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=define
   useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
   use64bitint=undef use64bitall=undef uselongdouble=undef
   usemymalloc=n, bincompat5005=undef
 Compiler:
   cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS 
-DDEBUGGING -fno-strict-aliasing -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
   optimize='-O2 -g -pipe -march=i386 -mcpu=i686',
   cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING 
-fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
   ccversion='', gccversion='3.3.3 20040311 (Red Hat Linux 3.3.3-3)', 
gccosandvers=''
   intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
   d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
   ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
   alignbytes=4, prototype=define
 Linker and Libraries:
   ld='gcc', ldflags =' -L/usr/local/lib'
   libpth=/usr/local/lib /lib /usr/lib
   libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
   perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
   libc=/lib/libc-2.3.3.so, so=so, useshrplib=true, libperl=libperl.so
   gnulibc_version='2.3.3'
 Dynamic Linking:
   dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic 
-Wl,-rpath,/usr/lib/perl5/5.8.3/i386-linux-thread-multi/CORE'
   cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'

Characteristics of this binary (from libperl):
 Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS 
USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
 Built under linux
 Compiled at Apr  3 2004 13:27:55
 %ENV:
   PERLLIB="/usr/local/perl5.005_02/lib/perl5:."
 @INC:
   /usr/local/perl5.005_02/lib/perl5
   .
   /usr/lib/perl5/5.8.3/i386-linux-thread-multi
   /usr/lib/perl5/5.8.3
   /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi
   /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi
   /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi
   /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
   /usr/lib/perl5/site_perl/5.8.3
   /usr/lib/perl5/site_perl/5.8.2
   /usr/lib/perl5/site_perl/5.8.1
   /usr/lib/perl5/site_perl/5.8.0
   /usr/lib/perl5/site_perl
   /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-

Re: [mp1] Apache::Symbol and perl Symbol.pm possible clash due to bareword gensym reference

2004-04-07 Thread TGS
Perfect! Cleaning up the path worked wonders.

on 4/07/2004 1:02 PM, Stas Bekman at [EMAIL PROTECTED] wrote:

> TGS wrote:
>> I am having problems compiling mod_perl as the following errors report.
>> 
>> ...
>> make[1]: Entering directory
>> `/usr/local/perl-cpan/build/mod_perl-1.29/Symbol'
>> Running Mkbootstrap for Apache::Symbol ()
>> chmod 644 Symbol.bs
>> rm -f ../blib/arch/auto/Apache/Symbol/Symbol.so
>> LD_RUN_PATH="" gcc  -shared -L/usr/local/lib Symbol.o  -o
>> ../blib/arch/auto/Apache/Symbol/Symbol.so
>> chmod 755 ../blib/arch/auto/Apache/Symbol/Symbol.so
>> cp Symbol.bs ../blib/arch/auto/Apache/Symbol/Symbol.bs
>> chmod 644 ../blib/arch/auto/Apache/Symbol/Symbol.bs
>> Bareword "gensym" not allowed while "strict subs" in use at
>> /usr/lib/perl5/5.8.3/Pod/Parser.pm line 1158.
>> Bareword "gensym" not allowed while "strict subs" in use at
>> /usr/lib/perl5/5.8.3/Pod/Parser.pm line 1158.
>> Compilation failed in require at /usr/lib/perl5/5.8.3/Pod/Man.pm line 30.
>> BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.3/Pod/Man.pm
>> line 30.
>> Compilation failed in require at
>> /usr/lib/perl5/5.8.3/ExtUtils/Command/MM.pm line 86.
>> make[1]: *** [manifypods] Error 255
>> make[1]: Leaving directory
>> `/usr/local/perl-cpan/build/mod_perl-1.29/Symbol'
>> make: *** [subdirs] Error 2
>> 
>> The offending /usr/lib/perl5/5.8.3/Pod/Parser.pm line 1158 is
>> 
>> my ($in_fh,  $out_fh) = (gensym, gensym)  if ($] < 5.6);
> 
> Your problem is that you've modified @INC to push "." before all other
> directories. And it should be last. When "." is first in the path it picks
> Symbol.pm when it's inside mod_perl-1.29/Symbol and it shouldn't.
> 
>>  %ENV:
>>PERLLIB="/usr/local/perl5.005_02/lib/perl5:."
>   ^^^
> 
>>  @INC:
>>/usr/local/perl5.005_02/lib/perl5
>>.
> ^^^
>>/usr/lib/perl5/5.8.3/i386-linux-thread-multi
>>/usr/lib/perl5/5.8.3
>>/usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi
>>/usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi
>>/usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi
>>/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
>>/usr/lib/perl5/site_perl/5.8.3
>>/usr/lib/perl5/site_perl/5.8.2
>>/usr/lib/perl5/site_perl/5.8.1
>>/usr/lib/perl5/site_perl/5.8.0
>>/usr/lib/perl5/site_perl
>>/usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi
>>/usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi
>>/usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi
>>/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
>>/usr/lib/perl5/vendor_perl/5.8.3
>>/usr/lib/perl5/vendor_perl/5.8.2
>>/usr/lib/perl5/vendor_perl/5.8.1
>>/usr/lib/perl5/vendor_perl/5.8.0
>>/usr/lib/perl5/vendor_perl
> 
> So run the build after unsetting PERLLIB and you will be fine.
> 
> __
> Stas BekmanJAm_pH --> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
> 


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html