develooper Front page | perl.perl5.porters | Postings from July 2013

Strange perl issue on illumos

Thread Next
From:
Alexander Pyhalov
Date:
July 25, 2013 06:39
Subject:
Strange perl issue on illumos
Message ID:
51F0C820.5010004@rsu.ru
Hello.
I'm building perl for OpenIndiana hipster (illumos branch).

Found strange issue: perl doesn't see it's environment.

The following program prints nothing. However, if run with miniperl, it 
correctly prints its environment.

#!/usr/perl5/5.16/bin/perl
##
##  printenv -- demo CGI program which just prints its environment
##
foreach (sort keys %ENV)
{
   print "$_: $ENV{$_}\n";
}


1;

$ ./miniperl /var/apache2/2.2/cgi-bin/printenv
HOME: /export/home/build
HZ: 100
LANG: en_US.UTF-8
LOGNAME: build
MAIL: /var/mail/build
OLDPWD: /export/home/build/srcs/oi-userland/components/perl/perl516/build
PAGER: /usr/bin/less -ins
PATH: /usr/gnu/bin:/usr/bin:/usr/sbin:/sbin
PWD: /export/home/build/srcs/oi-userland/components/perl/perl516/build/i86
SHELL: /usr/bin/bash
SHLVL: 1
TERM: xterm
_: ./miniperl


$ /usr/perl5/5.16/bin/perl  /var/apache2/2.2/cgi-bin/printenv
#Nothing is printed

$ /usr/perl5/5.16/bin/perl -V

Summary of my perl5 (revision 5 version 16 subversion 3) configuration:

   Platform:
     osname=solaris, osvers=2.11, archname=i86pc-solaris-64int
     uname='sunos localhost 5.11 i86pc i386 i86pc'
     config_args='-de -Dmksymlinks -Ulocincpth= -Uloclibpth= 
-Dbin=/usr/perl5/5.16/bin -Dcc=/usr/gcc/4.7/bin/gcc -m32 
-Dcf_email=userland-discuss@opensolaris.org -Dcf_by=perl-bugs 
-Dlibperl=libperl.so -Dmyhostname=localhost -Dperl_static_inline=static 
-Dprefix=/usr/perl5/5.16 -Dprivlib=/usr/perl5/5.16/lib 
-Dsitelib=/usr/perl5/site_perl/5.16 -Dsiteprefix=/usr/perl5/5.16 
-Dvendorlib=/usr/perl5/vendor_perl/5.16 -Dvendorprefix=/usr/perl5/5.16 
-Duse64bitint -Duseshrplib -Dusedtrace -Uuselargefiles'
     hint=recommended, useposix=true, d_sigaction=define
     useithreads=undef, usemultiplicity=undef
     useperlio=define, d_sfio=undef, uselargefiles=undef, usesocks=undef
     use64bitint=define, use64bitall=undef, uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='/usr/gcc/4.7/bin/gcc -m32', ccflags ='-DPTR_IS_LONG 
-fno-strict-aliasing -pipe -fstack-protector -DPERL_USE_SAFE_PUTENV',
     optimize='-O',
     cppflags='-DPTR_IS_LONG -fno-strict-aliasing -pipe -fstack-protector'
     ccversion='', gccversion='4.7.3', gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
     ivtype='long long', ivsize=8, nvtype='double', nvsize=8, 
Off_t='off_t', lseeksize=4
     alignbytes=4, prototype=define
   Linker and Libraries:
     ld='/usr/gcc/4.7/bin/gcc -m32', ldflags =' -fstack-protector'
     libpth=/usr/lib /usr/ccs/lib
     libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc
     perllibs=-lsocket -lnsl -ldl -lm -lc
     libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
     gnulibc_version=''
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -R 
/usr/perl5/5.16/lib/i86pc-solaris-64int/CORE'
     cccdlflags='-fPIC -DPIC', lddlflags='-G -fstack-protector'


Characteristics of this binary (from libperl):
   Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                         PERL_MALLOC_WRAP PERL_PRESERVE_IVUV
                         PERL_USE_SAFE_PUTENV USE_64_BIT_INT USE_LOCALE
                         USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                         USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
   Built under solaris
   Compiled at Jul 25 2013 01:37:56
   @INC:
     /usr/perl5/site_perl/5.16/i86pc-solaris-64int
     /usr/perl5/site_perl/5.16
     /usr/perl5/vendor_perl/5.16/i86pc-solaris-64int
     /usr/perl5/vendor_perl/5.16
     /usr/perl5/5.16/lib/i86pc-solaris-64int
     /usr/perl5/5.16/lib

-- 
Best regards,
Alexander Pyhalov,
system administrator of Computer Center of Southern Federal University

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