FAQ
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=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-
D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-
size=4 -m64 -mtune=generic -DVERSION=\"0.94\" -DXS_VERSION=\"0.94\" -
fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"
bsd_glob.c
bsd_glob.c: In function ‘globtilde’:
bsd_glob.c:369: error: ‘my_perl’ 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

Search Discussions

  • Shlomi Fish at Jun 1, 2011 at 8:22 am
    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

    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=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-
    D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-
    size=4 -m64 -mtune=generic -DVERSION=\"0.94\" -DXS_VERSION=\"0.94\" -
    fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"
    bsd_glob.c
    bsd_glob.c: In function ‘globtilde’:
    bsd_glob.c:369: error: ‘my_perl’ undeclared (first use in this
    function)
    This Google search may prove of help:

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

    A few notes:

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

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

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

    Regards,

    Shlomi Fish

    --
    -----------------------------------------------------------------
    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 .
  • Robi at Jun 13, 2011 at 2:34 pm
    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
  • Robi at Jun 13, 2011 at 2:40 pm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupbeginners @
categoriesperl
postedMay 31, '11 at 10:08a
activeJun 13, '11 at 2:40p
posts4
users2
websiteperl.org

2 users in discussion

Robi: 3 posts Shlomi Fish: 1 post

People

Translate

site design / logo © 2021 Grokbase