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

[perl #21526] portability problem in ExtUtils/Install.pm

From:
perlbug-followup
Date:
March 10, 2003 10:15
Subject:
[perl #21526] portability problem in ExtUtils/Install.pm
Message ID:
rt-21526-53487.1.00573634709647@bugs6.perl.org
# New Ticket Created by  sjames@ariba.com 
# Please include the string:  [perl #21526]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=21526 >



This is a bug report for perl from sjames@ariba.com,
generated with the help of perlbug 1.33 running under perl v5.6.1.


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

In lib/ExtUtils/Install.pm, we see

    if ($source eq "blib/lib" and
        exists $hash{"blib/arch"} and
        directory_not_empty("blib/arch")) {
        $targetroot = install_rooted_dir($hash{"blib/arch"});
        print "Files found in blib/arch: installing files in blib/lib into architecture dependent library tree\n";
    }

This does not work on Win32 because the keys of %hash look like blib\arch.
I changed it to (somewhat inefficient)

    if ($source eq MM->catdir("blib","lib") and
        exists $hash{MM->catdir("blib","arch")} and
        directory_not_empty(MM->catdir("blib","arch"))) {
        $targetroot = install_rooted_dir($hash{MM->catdir("blib","arch")});
        print "Files found in blib/arch: installing files in blib/lib into architecture dependent library tree\n";
    }

and this works as "expected" i.e. behaves on Win32 like on Unix thus:

	#October 1997: we want to install .pm files into archlib if
	#there are any files in arch. So we depend on having ./blib/arch
	#hardcoded here.

It's not clear to me if this is really a requirement on Win32 (or any platform
for that matter); empirically I've had no problems with my ActiveState Win32
builds that contain this bug and that are installing the arch bits and xp bits
separately.  I ran into this only because I am attempting to build a combined
perl installation with Win32 and various Unix archs, and the asymmetry produces
spurious dircmp diffs.

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=library
    severity=low
---
Site configuration information for perl v5.6.1:

Configured by gsar at Tue Feb  4 22:20:55 PST 2003.

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris-thread-multi
    uname='sunos sparky 5.6 generic_105181-26 sun4u sparc sunw,ultra-5_10 '
    config_args='-des -Dcc=gcc -Dcf_by=ActiveState -Dcf_email=ActivePerl@ActiveState.com -Uinstallusrbinperl -Ud_sigsetjmp -Dusethreads -Duseithreads -Ulocincpth= -Uloclibpth= -Dprefix=/home/sjames/perl -Dinc_version_list=5.6.0/$archname 5.6.0'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
    cc='gcc', ccflags ='-DUSE_REENTRANT_API -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O',
    cppflags='-DUSE_REENTRANT_API -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -fno-strict-aliasing'
    ccversion='', gccversion='2.95.2 19991024 (release)', gccosandvers='solaris2.6'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' '
    libpth=/usr/lib /usr/ccs/lib /usr/local/lib
    libs=-lsocket -lnsl -ldl -lm -lposix4 -lpthread -lc
    perllibs=-lsocket -lnsl -ldl -lm -lposix4 -lpthread -lc
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G'

Locally applied patches:
    ACTIVEPERL_LOCAL_PATCHES_ENTRY

---
@INC for perl v5.6.1:
    /home/sjames/perl/lib/5.6.1/sun4-solaris-thread-multi
    /home/sjames/perl/lib/5.6.1
    /home/sjames/perl/lib/site_perl/5.6.1/sun4-solaris-thread-multi
    /home/sjames/perl/lib/site_perl/5.6.1
    /home/sjames/perl/lib/site_perl
    .

---
Environment for perl v5.6.1:
    HOME=/home/sjames
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/net/pence/oracle/app/oracle/product/9.2.0/lib:/home/sjames/gnu/solaris/lib:/usr/local/lib:/lib
    LOGDIR (unset)
    PATH=/home/sjames/ariba/shared/bin:.:/home/sjames/bin/scripts:/home/sjames/bin/solaris:/home/sjames/gnu/solaris/bin:/home/sjames/bin/solaris/jdk/bin:/home/sjames/perl/bin:/usr/local/bin:/usr/ccs/bin:/usr/ucb:/usr/openwin/bin:/usr/proc/bin:/bin:/sbin:/usr/bin:/usr/sbin:/net/pence/oracle/app/oracle/product/9.2.0/bin:/home/sjames/ariba/shared/bin/Ariba
    PERL_BADLANG (unset)
    SHELL=/usr/local/bin/tcsh




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