Bug 457771 - Compile @INC does not include /usr/lib/perl5/site_perl
Compile @INC does not include /usr/lib/perl5/site_perl
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: perl (Show other bugs)
9
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Stepan Kasal
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-04 11:18 EDT by Larry Weidig
Modified: 2008-09-11 13:00 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-11 13:00:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Larry Weidig 2008-08-04 11:18:41 EDT
Description of problem:

We are running package perl-5.10.0-31.fc9.x86_64 and have a number of internally developed scripts which are not working.  We have all of our internal perl modules stored in the /usr/lib/perl5/site_perl which seems to no longer be included with this package.  If this is intentional, please feel free to close the bug and we will move all of our code to vendor_perl going forward.

Output from perl -V shows:

# perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.6.18-92.1.6.el5, archname=x86_64-linux-thread-multi
    uname='linux x86-4 2.6.18-92.1.6.el5 #1 smp fri jun 20 02:36:06 edt 2008 x86_64 x86_64 x86_64 gnulinux '
    config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DPERL_USE_SAFE_PUTENV -Dversion=5.10.0 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Dprivlib=/usr/lib/perl5/5.10.0 -Dsitelib=/usr/local/lib/perl5/site_perl/5.10.0 -Dvendorlib=/usr/lib/perl5/vendor_perl/5.10.0 -Darchlib=/usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi -Dsitearch=/usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi -Dvendorarch=/usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi -Darchname=x86_64-linux-thread-multi -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Dvendorprefix=/usr -Dsiteprefix=/usr/local -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dscriptdir=/usr/bin'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DPERL_USE_SAFE_PUTENV',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='4.3.0 20080428 (Red Hat 4.3.0-8)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =''
    libpth=/usr/local/lib64 /lib64 /usr/lib64
    libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.8'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DPERL_USE_SAFE_PUTENV'


Characteristics of this binary (from libperl): 
  Compile-time options: DEBUGGING MULTIPLICITY PERL_DONT_CREATE_GVSV
                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
                        PERL_TRACK_MEMPOOL PERL_USE_SAFE_PUTENV
                        USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS
                        USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API
  Built under linux
  Compiled at Jul 21 2008 06:54:39
  @INC:
    /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi
    /usr/lib/perl5/5.10.0
    /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi
    /usr/local/lib/perl5/site_perl/5.10.0
    /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.10.0
    /usr/lib/perl5/vendor_perl
    .

Version-Release number of selected component (if applicable):

perl-5.10.0-31.fc9.x86_64


How reproducible:

Always

Steps to Reproduce:
1. Install Fedora 9 x86_64 with Perl
2.
3.
  
Actual results:


Expected results:

The @INC would inlcude /usr/lib/perl5/site_perl by default

Additional info:
Comment 1 Tom "spot" Callaway 2008-08-04 11:34:30 EDT
Site_perl is now set to /usr/local/%{_lib}/perl5/site_perl , which is more correct than the previous location, given that anything in siteperl is locally compiled and maintained perl bits, not anything from a Fedora package.

If you make a symlink (or just mv the files into that structure), this should start working again.
Comment 2 Tom "spot" Callaway 2008-08-04 11:35:58 EDT
(In reply to comment #1)
> Site_perl is now set to /usr/local/%{_lib}/perl5/site_perl , which is more

In case it was not clear, %{_lib} is an rpm macro which evaluates to either "lib" or "lib64", depending on whether you're on i686 or x86_64, respectively.
Comment 3 Larry Weidig 2008-08-04 11:49:16 EDT
Thanks for reply, this is clear.  However, it appears from the perl -V output that /usr/local/%{_lib}/perl5/site_perl which in my case would become /usr/local/lib64/perl5/site_perl is not included either.  In fact I seem to get a strange list of 64 and 32 bit locations as shown:

@INC:
    /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi
    /usr/lib/perl5/5.10.0
    /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi
    /usr/local/lib/perl5/site_perl/5.10.0
    /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.10.0
    /usr/lib/perl5/vendor_perl
Comment 4 Tom "spot" Callaway 2008-08-04 11:59:03 EDT
(In reply to comment #3)
> Thanks for reply, this is clear.  However, it appears from the perl -V output
> that /usr/local/%{_lib}/perl5/site_perl which in my case would become
> /usr/local/lib64/perl5/site_perl is not included either.  In fact I seem to get
> a strange list of 64 and 32 bit locations as shown:

Argh, it is a Monday. Your perl -v shows you're on an x86_64.

On your architecture, perl sets:

sitelib (arch-independent local compiles) to /usr/local/lib/perl5/site_perl
sitearch (arch specific local compiles) to
/usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi

If you make a symlink from /usr/lib/perl5/site_perl to
/usr/local/lib/perl5/site_perl, your arch-independent bits will just start
working again. With the arch-specific ones, make a symlink from
/usr/lib64/perl5/site_perl to /usr/local/lib64/perl5/site_perl.
Comment 5 Larry Weidig 2008-08-04 12:16:49 EDT
Thanks for the information, but /usr/local/lib/perl5/site_perl/ is not part of the @INC path either.  I was able to create a symbolic link from /usr/local/lib/perl5/site_perl/5.10.0 to /usr/lib/perl5/site_perl (I know it is a kludge) and this works.  

I have no problems moving to /usr/local/lib/perl5/site_perl/ but it just needs to be part of the @INC path.
Comment 6 Tom "spot" Callaway 2008-08-04 12:38:01 EDT
(In reply to comment #5)
> Thanks for the information, but /usr/local/lib/perl5/site_perl/ is not part of
> the @INC path either.  I was able to create a symbolic link from
> /usr/local/lib/perl5/site_perl/5.10.0 to /usr/lib/perl5/site_perl (I know it is
> a kludge) and this works.  
> 
> I have no problems moving to /usr/local/lib/perl5/site_perl/ but it just needs
> to be part of the @INC path.

Ahh, OK, I see.

Well, I don't think /usr/lib/perl5/site_perl/ was in @INC before. Looking at the change:

http://cvs.fedora.redhat.com/viewcvs/rpms/perl/devel/perl.spec?r1=1.151&r2=1.152

... it went from /usr/lib/perl5/site_perl/%{perl_version}
              to /usr/local/lib/perl5/site_perl/%{perl_version}

I'm not necessarily against adding /usr/local/lib/perl5/site_perl/ to @INC. It should be as simple as adding this to the Configure invocation:

%ifarch x86_64 ppc64 sparc64
-Dotherlibdirs=/usr/local/lib/perl5/site_perl:/usr/local/%{_lib}/perl5/site_perl \
%else
-Dotherlibdirs=/usr/local/lib/perl5/site_perl \
%endif

(I did it like that to catch the multilib cases without adding duplicate entries on the 32bit side)

What do the other maintainers think? Seems useful and won't break anything.
Comment 7 Larry Weidig 2008-08-04 14:19:09 EDT
Thanks for the reply, hopefully that can be included.  

Prior x86_64 perl builds for perl-5.8.8-30.fc7 as an example, had huge include lists:

@INC:
    /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi
    /usr/lib64/perl5/site_perl/5.8.7/x86_64-linux-thread-multi
    /usr/lib64/perl5/site_perl/5.8.6/x86_64-linux-thread-multi
    /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.8
    /usr/lib/perl5/site_perl/5.8.7
    /usr/lib/perl5/site_perl/5.8.6
    /usr/lib/perl5/site_perl/5.8.5
    /usr/lib/perl5/site_perl
    /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi
    /usr/lib64/perl5/vendor_perl/5.8.7/x86_64-linux-thread-multi
    /usr/lib64/perl5/vendor_perl/5.8.6/x86_64-linux-thread-multi
    /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.8
    /usr/lib/perl5/vendor_perl/5.8.7
    /usr/lib/perl5/vendor_perl/5.8.6
    /usr/lib/perl5/vendor_perl/5.8.5
    /usr/lib/perl5/vendor_perl
    /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi
    /usr/lib/perl5/5.8.8
    .
Comment 8 Marcela Mašláňová 2008-08-05 03:21:54 EDT
No problem, we can add another path.
Comment 9 Stepan Kasal 2008-08-05 04:40:48 EDT
(In reply to comment #6)
> %ifarch x86_64 ppc64 sparc64
> -Dotherlibdirs=/usr/local/lib/perl5/site_perl:/usr/local/%{_lib}/perl5/site_perl
> \
> %else
> -Dotherlibdirs=/usr/local/lib/perl5/site_perl \
> %endif

I do agree that adding /usr/local/lib/perl5/site_perl to otherlibdirs would help. When we are at it, we could also add /usr/lib/perl5/site_perl for compatibility with previous reasons.
But it is not clear for me why we should add /usr/local/%{_lib}/perl5/site_perl. Nothing like that was never in use in previous versions of Fedora. I think Fedora used lib64 exclusively inarch-specific paths, which always looked like this:
   /usr/.../%{_lib}/.../%{_arch}-linux-thread-multi

So I would propose to do
   -Dotherlibdirs=/usr/local/lib/perl5/site_perl:/usr/lib/perl5/site_perl
on all archs.
Comment 10 Stepan Kasal 2008-08-07 07:34:53 EDT
This was a Fedora 9 bug.
Comment 11 Fedora Update System 2008-08-07 07:36:00 EDT
perl-5.10.0-33.fc9 has been submitted as an update for Fedora 9
Comment 12 Fedora Update System 2008-08-12 14:22:18 EDT
perl-5.10.0-33.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update perl'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-7171
Comment 13 Larry Weidig 2008-08-13 14:23:07 EDT
This works for me, I just happened to notice that the library:
     /usr/local/lib/perl5/site_perl/5.10.0
Shows up in the @INC list twice.

Before Upgrade:
===============
  @INC:
    /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi
    /usr/lib/perl5/5.10.0
    /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi
    /usr/local/lib/perl5/site_perl/5.10.0
    /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.10.0
    /usr/lib/perl5/vendor_perl

After Upgrade:
==============
  @INC:
    /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi
    /usr/lib/perl5/5.10.0
    /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi
    /usr/local/lib/perl5/site_perl/5.10.0
    /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.10.0
    /usr/lib/perl5/vendor_perl
    /usr/local/lib/perl5/site_perl/5.10.0
    /usr/local/lib/perl5/site_perl
    /usr/lib/perl5/site_perl
Comment 14 Fedora Update System 2008-09-11 12:59:57 EDT
perl-5.10.0-33.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.