Trouble building File::BSDGlob.pm

Trouble building File::BSDGlob.pm

am 31.05.2011 12:08:27 von robi

I'm not a perl guy but I need to make something run that relies on the
BSDGlob.pm module. I downloaded xzvf File-BSDGlob-0.94.tar.gz from
CPAN and generated the Makefile. The make dies with

bash-3.2$ perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for File::BSDGlob
bash-3.2$ make
cp BSDGlob.pm blib/lib/File/BSDGlob.pm
AutoSplitting blib/lib/File/BSDGlob.pm (blib/lib/auto/File/BSDGlob)
gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -
Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -
D_FILE_OFFSET_BITS=3D64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-
D_FORTIFY_SOURCE=3D2 -fexceptions -fstack-protector --param=3Dssp-buffer-
size=3D4 -m64 -mtune=3Dgeneric -DVERSION=3D\"0.94\" -DXS_VERSION=3D\"0.94=
\" -
fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"
bsd_glob.c
bsd_glob.c: In function =91globtilde=92:
bsd_glob.c:369: error: =91my_perl=92 undeclared (first use in this
function)
bsd_glob.c:369: error: (Each undeclared identifier is reported only
once
bsd_glob.c:369: error: for each function it appears in.)
bsd_glob.c:685:8: warning: extra tokens at end of #endif directive
make: *** [bsd_glob.o] Error

Interestingly, there is NO reference to my_perl anywhere in
bsd_glob.c, only in the included perl.h.

Linux kubo.phy.bme.hu 2.6.18-238.9.1.el5.centos.plus #1 SMP Tue Apr 12
20:34:33 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

Help greatly appreciated,
Robi


--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Re: Trouble building File::BSDGlob.pm

am 01.06.2011 10:21:29 von Shlomi Fish

Hi Robi,

On Tuesday 31 May 2011 13:08:27 Robi wrote:
> I'm not a perl guy but I need to make something run that relies on the
> BSDGlob.pm module. I downloaded xzvf File-BSDGlob-0.94.tar.gz from
> CPAN and generated the Makefile. The make dies with
>=20
> bash-3.2$ perl Makefile.PL
> Checking if your kit is complete...
> Looks good
> Writing Makefile for File::BSDGlob
> bash-3.2$ make
> cp BSDGlob.pm blib/lib/File/BSDGlob.pm
> AutoSplitting blib/lib/File/BSDGlob.pm (blib/lib/auto/File/BSDGlob)
> gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -
> Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -
> D_FILE_OFFSET_BITS=3D64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-
> D_FORTIFY_SOURCE=3D2 -fexceptions -fstack-protector --param=3Dssp-buffer-
> size=3D4 -m64 -mtune=3Dgeneric -DVERSION=3D\"0.94\" -DXS_VERSION=3D\"0.=
94\" -
> fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"
> bsd_glob.c
> bsd_glob.c: In function =91globtilde=92:
> bsd_glob.c:369: error: =91my_perl=92 undeclared (first use in this
> function)

This Google search may prove of help:

http://www.google.com/search?q=3D%20error%3A%20%E2%80%98my_p erl%E2%80%99%20=
undeclared

A few notes:

1. I was able to successfully run "perl Makefile.PL ; make ; make test" on=
=20
x86-32 Mandriva Cooker here.

2. Since you're on CentOS, you may need to install some packages to get Per=
l=20
modules to build. Moreover, the last release of CentOS still has perl-5.8.8=
=20
which has been end-of-lifed. You may wish to use=20
http://search.cpan.org/dist/App-perlbrew/ to install a more recent perl the=
re.

3. The last release of http://search.cpan.org/dist/File-BSDGlob/ was from=20
1999. Maybe you should replace the functionality that it provides for your=
=20
code with File::Glob's bsd_glob.

Regards,

Shlomi Fish

=2D-=20
=2D--------------------------------------------------------- -------
Shlomi Fish http://www.shlomifish.org/
UNIX Fortune Cookies - http://www.shlomifish.org/humour/fortunes/

I also have versions of this code in COBOL.NET, Intercal, PDP-10 Assembly, =
J,
APL, Windows NT 4.0 Batch script and Autocad Lisp - I'm sure you can handle
all of them because none of them is Perl. ;-).

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Re: Trouble building File::BSDGlob.pm

am 13.06.2011 16:34:38 von robi

Dear Shlomi Fish,

Thank you for the answer. I tried to use File::Glob's bsd_glob. I
replaced line

use File::BSDGlob ':glob';

with

use File::Glob ':glob';
@list = bsd_glob('*.[ch]');

Now I receive the following error:

Global symbol "@list" requires explicit package name at /big1/robi/
Experiment//AT/ExperimentHarness.pm line 40.
BEGIN not safe after errors--compilation aborted at /big1/robi/
Experiment//AT/ExperimentHarness.pm line 41.

This time I tried on Debian 2.6.32-34squeeze1.

Does anyone have any idea?

Robi




--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Re: Trouble building File::BSDGlob.pm

am 13.06.2011 16:39:52 von robi

2


--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/