Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install_lib.pl emits warnings when installperl is run with destdir #10314

Closed
p5pRT opened this issue Apr 16, 2010 · 10 comments
Closed

install_lib.pl emits warnings when installperl is run with destdir #10314

p5pRT opened this issue Apr 16, 2010 · 10 comments

Comments

@p5pRT
Copy link

p5pRT commented Apr 16, 2010

Migrated from rt.perl.org#74444 (status was 'resolved')

Searchable as RT74444$

@p5pRT
Copy link
Author

p5pRT commented Apr 16, 2010

From @toddr

Created by @toddr

running 'LD_LIBRARY_PATH=/usr/home/build/perl-5.12.0 ./perl installperl --destdir=/var/local/tmp/perl-root'
produces 7 warnings like this on my system​:

Use of uninitialized value $dev2 in numeric eq (==) at ./install_lib.pl line 123.

replacing == with the smart match operator seems to be the best DWIM fix.

Perl Info

Flags:
   category=utilities
   severity=medium

Site configuration information for perl 5.12.0:

Configured by toddr at Wed Apr 14 16:37:04 CDT 2010.

Summary of my perl5 (revision 5 version 12 subversion 0) configuration:

 Platform:
   osname=linux, osvers=2.6.18-164.9.1.el5, archname=x86_64-linux
   uname='linux toddr-esx 2.6.18-164.9.1.el5 #1 smp tue dec 15 20:57:57 est 2009 x86_64 x86_64 x86_64 gnulinux '
   config_args='-des -Darchname=x86_64-linux -Dcc=gcc -DDEBUGGING=none -Doptimize=-Os -Dusemymalloc=y -Duseshrplib=true -Duselargefiles=yes -Duseposix=true -Dhint=recommended -Duseperlio=yes -Dccflags=-I/usr/local/perl/include -Wl,-rpath -Wl,/usr/local/perl/lib -L/usr/local/perl/lib -Dldflags=-Wl,-rpath -Wl,/usr/local/perl/lib -L/usr/local/perl/lib -Dprefix=/usr/local/perl -Dsiteprefix=/usr/local/perl -Dsitebin=/usr/local/perl/bin -Dsitelib=/usr/local/perl/lib/perl5/site_lib -Dsiteman1dir=/usr/local/perl/man/man1 -Dsiteman3dir=/usr/local/perl/man/man3 -Dcf_by=toddr -Dmyhostname=localhost -Dperladmin=root@localhost -Dcf_email=toddr@cpanel.net -Di_dbm=/usr/local/perl/include -Di_gdbm=/usr/local/perl/include -Di_ndbm=/usr/local/perl/include -Ud_dosuid -Uuserelocatableinc -Umad -Uusethreads -Uusemultiplicity -Uusesocks -Uuselongdouble -Acflags=-fPIC -DPIC -m64 -I/usr/local/perl/include -Aldflags=-L/usr/local/perl/lib -L/usr/lib64 -L/lib64 -Dlibpth=/usr/local/perl/lib /usr/local/lib64 /usr/local/lib /lib64 /usr/lib64  -Dlocincpth=/usr/local/perl/include /usr/local/include -Duse64bitint=yes -Duse64bitall=yes'
   hint=recommended, useposix=true, d_sigaction=define
   useithreads=undef, usemultiplicity=undef
   useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
   use64bitint=define, use64bitall=define, uselongdouble=undef
   usemymalloc=y, bincompat5005=undef
 Compiler:
   cc='gcc', ccflags ='-I/usr/local/perl/include -Wl,-rpath -Wl,/usr/local/perl/lib -L/usr/local/perl/lib -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/perl/include -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
   optimize='-Os',
   cppflags='-I/usr/local/perl/include -Wl,-rpath -Wl,/usr/local/perl/lib -L/usr/local/perl/lib -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/perl/include -I/usr/local/include'
   ccversion='', gccversion='4.1.2 20080704 (Red Hat 4.1.2-46)', 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 ='-Wl,-rpath -Wl,/usr/local/perl/lib -L/usr/local/perl/lib -L/usr/local/perl/lib -L/usr/lib64 -L/lib64 -fstack-protector -L/usr/local/lib'
   libpth=/usr/local/perl/lib /usr/local/lib64 /usr/local/lib /lib64 /usr/lib64
   libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
   perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
   libc=/lib/libc-2.5.so, so=so, useshrplib=true, libperl=libperl.so
   gnulibc_version='2.5'
 Dynamic Linking:
   dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/local/perl/lib/perl5/5.12.0/x86_64-linux/CORE'
   cccdlflags='-fPIC', lddlflags='-shared -Os -L/usr/local/perl/lib -L/usr/lib64 -L/lib64 -L/usr/local/lib -fstack-protector'


@INC for perl 5.12.0:
   /usr/local/perl/lib/perl5/site_lib/x86_64-linux
   /usr/local/perl/lib/perl5/site_lib
   /usr/local/perl/lib/perl5/5.12.0/x86_64-linux
   /usr/local/perl/lib/perl5/5.12.0
   .


Environment for perl 5.12.0:
   HOME=/home/toddr
   LANG=en_US.UTF-8
   LANGUAGE (unset)
   LD_LIBRARY_PATH (unset)
   LOGDIR (unset)
   PATH=/usr/local/perl/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/home/toddr/scripts:
   PERL_BADLANG (unset)
   SHELL=/bin/zsh

@p5pRT
Copy link
Author

p5pRT commented Apr 16, 2010

From @toddr

Inline Patch
diff --git a/install_lib.pl b/install_lib.pl
index ae8ba0a..8d37a0c 100644
--- a/install_lib.pl
+++ b/install_lib.pl
@@ -120,7 +120,7 @@ sub samepath {
 	my($dev1, $ino1, $dev2, $ino2);
 	($dev1, $ino1) = stat($p1);
 	($dev2, $ino2) = stat($p2);
-	($dev1 == $dev2 && $ino1 == $ino2);
+	($dev1 ~~ $dev2 && $ino1 ~~ $ino2);
     }
     else {
 	1;

@p5pRT
Copy link
Author

p5pRT commented Apr 19, 2010

From @toddr

This should probably be a 5.12.1 item

On Apr 16, 2010, at 6​:03 PM, Todd Rinaldo (via RT) wrote​:

running 'LD_LIBRARY_PATH=/usr/home/build/perl-5.12.0 ./perl installperl --destdir=/var/local/tmp/perl-root'
produces 7 warnings like this on my system​:

Use of uninitialized value $dev2 in numeric eq (==) at ./install_lib.pl line 123.

replacing == with the smart match operator seems to be the best DWIM fix.

@p5pRT
Copy link
Author

p5pRT commented Aug 31, 2010

From @toddr

A patch was provided in the ticket to change install_lib.pl to use the smart match operator so the warnings won't happen. Could this be added to blead please?

Thanks,
Todd

@p5pRT
Copy link
Author

p5pRT commented Aug 31, 2010

From @toddr

Inline Patch
diff --git a/install_lib.pl b/install_lib.pl
index ae8ba0a..8d37a0c 100644
--- a/install_lib.pl
+++ b/install_lib.pl
@@ -120,7 +120,7 @@ sub samepath {
 	my($dev1, $ino1, $dev2, $ino2);
 	($dev1, $ino1) = stat($p1);
 	($dev2, $ino2) = stat($p2);
-	($dev1 == $dev2 && $ino1 == $ino2);
+	($dev1 ~~ $dev2 && $ino1 ~~ $ino2);
     }
     else {
 	1;

@p5pRT
Copy link
Author

p5pRT commented Sep 1, 2010

From @toddr

Providing proper formatted patch

@p5pRT
Copy link
Author

p5pRT commented Sep 1, 2010

From @toddr

From 61babc283d0de2c35102870aaf7ce06efa10b6e6 Mon Sep 17 00​:00​:00 2001
From​: Todd Rinaldo <toddr@​cpan.org>
Date​: Wed, 1 Sep 2010 11​:18​:43 -0500
Subject​: [PATCH] RT 74444 - install_lib.pl emits warnings when installperl is run with destdir

running the following produces 7 warnings like this on my system​:
'LD_LIBRARY_PATH=/usr/home/build/perl-5.12.0 ./perl installperl --destdir=/var/local/tmp/perl-root'

Use of uninitialized value $dev2 in numeric eq (==) at ./install_lib.pl line 123.

replacing == with ~~ (the smart match operator) seems to be the best DWIM fix.


install_lib.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

Inline Patch
diff --git a/install_lib.pl b/install_lib.pl
index ae8ba0a..8d37a0c 100644
--- a/install_lib.pl
+++ b/install_lib.pl
@@ -120,7 +120,7 @@ sub samepath {
 	my($dev1, $ino1, $dev2, $ino2);
 	($dev1, $ino1) = stat($p1);
 	($dev2, $ino2) = stat($p2);
-	($dev1 == $dev2 && $ino1 == $ino2);
+	($dev1 ~~ $dev2 && $ino1 ~~ $ino2);
     }
     else {
 	1;
-- 
1.7.2

@p5pRT
Copy link
Author

p5pRT commented Sep 1, 2010

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Sep 1, 2010

From @rafl

Thank you! Applied as 4c3ca3f

@p5pRT
Copy link
Author

p5pRT commented Sep 1, 2010

@rafl - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant