develooper Front page | perl.perl5.porters | Postings from March 2000

[ID 20000305.001] [BUG 5.5.670 perl.c] SITELIB_EXP mangled by hack.

Thread Next
From:
schwern
Date:
March 5, 2000 03:31
Subject:
[ID 20000305.001] [BUG 5.5.670 perl.c] SITELIB_EXP mangled by hack.
Message ID:
20000305113129.80DC23820@athens.arena-i.com

This is a bug report for perl from schwern@pobox.com,
generated with the help of perlbug 1.27 running under perl v5.5.670.


-----------------------------------------------------------------
[Please enter your report here]

As you will notice below, site_perl didn't make it into @INC.

Here's the relevent stuff from config.sh:
installsitearch='/usr/local/perl5.6/lib/site_perl/i686-linux-64all'
installsitelib='/usr/local/perl5.6/lib/site_perl'

And config.h:
#define SITEARCH "/usr/local/perl5.6/lib/site_perl/i686-linux-64all"            
/**/
#define SITEARCH_EXP "/usr/local/perl5.6/lib/site_perl/i686-linux-64all"  

#define SITELIB "/usr/local/perl5.6/lib/site_perl"              /**/
#define SITELIB_EXP "/usr/local/perl5.6/lib/site_perl"          /**/

You'll note the lack of trailing slashes.

Unfortunately this little bit in perl.c does some damage:
#ifdef SITELIB_EXP
    {
        char *path = SITELIB_EXP;

        if (path) {
            char buf[1024];
            strcpy(buf,path);
            if (strrchr(buf,'/'))       /* XXX Hack, Configure var needed */
                *strrchr(buf,'/') = '\0';
            incpush(buf, TRUE);
        }
    }
#endif

That strrchr changes "/usr/local/perl5.6/lib/site_perl" into
"/usr/local/perl5.6/lib\000site_perl".  Thus, problem.  Forget the
trailing slash while configuring and you're in trouble (especially
since the default has no trailing slash.)

I know the lack of proper site_perl handling in config is a known
issue, but it seems the band-aid is worse than the wound.  Would
slapping a trailing slash on the end of the directory in Configure be
a slightly better hack?

installsitelib='$installsitelib/'

[Please do not change anything below this line]
-----------------------------------------------------------------

---
Site configuration information for perl v5.5.670:

Configured by schwern at Thu Mar  2 16:15:55 EST 2000.

Summary of my perl5 (revision 5.0 version 5 subversion 670) configuration:
  Platform:
    osname=linux, osvers=2.2.10, archname=i686-linux-64all
    uname='linux athens 2.2.10 #3 smp mon aug 2 16:48:09 edt 1999 i686 unknown '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=define use64bitall=define uselongdouble=define usesocks=undef
  Compiler:
    cc='cc', optimize='-g', gccversion=2.95.2 20000116 (Debian GNU/Linux)
    cppflags='-Dbool=char -DHAS_BOOL -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -DDEBUGGING_OPS -DDEBUGGING_MSTATS'
    ccflags ='-Dbool=char -DHAS_BOOL -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -DDEBUGGING_OPS -DDEBUGGING_MSTATS'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='long double', nvsize=12, Off_t='off_t', lseeksize=4
    alignbytes=4, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl v5.5.670:
    /home/schwern/lib/perl5/site_perl/5.005
    /usr/local/perl5.6/lib/i686-linux-64all
    /usr/local/perl5.6/lib
    /usr/local/perl5.6/lib/i686-linux-64all
    /usr/local/perl5.6/lib
    .

---
Environment for perl v5.5.670:
    HOME=/home/schwern
    LANG=C
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/schwern/bin:/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:.
    PERL5LIB=/home/schwern/lib/perl5/site_perl/5.005
    PERL_BADLANG (unset)
    SHELL=/bin/bash

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About