LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-03-2012, 03:54 AM   #1
tpreitzel
Member
 
Registered: Aug 2007
Posts: 253

Rep: Reputation: 28
makepl_arg in Perl-5.16.0


With Perl-5.16.0 in -current for Slackware64, I'm unable to set the PREFIX directory for the installation of perl modules via CPAN. Everything installs to /usr/local ... ALWAYS, regardless of the setting for makepl_arg . Does anyone else see this behavior?
 
Old 08-03-2012, 04:52 PM   #2
tpreitzel
Member
 
Registered: Aug 2007
Posts: 253

Original Poster
Rep: Reputation: 28
Due to problems installing Perl modules via CPAN to any other prefix than the default, /usr/local, I decided to use CPAN's local::lib feature. I compromised on installing Perl modules via CPAN to /root via local::lib. The latter ability actually works. Then, I added the following script to /etc/profile.d :

# Perl 5.16.0 local::lib
export PERL_LOCAL_LIB_ROOT="/root/perl5"
export PERL_MB_OPT="--install_base /root/perl5"
export PERL_MM_OPT="INSTALL_BASE=/root/perl5"
export PERL5LIB="/root/perl5/lib/perl5/x86_64-linux-thread-multi:/root/perl5/lib/perl5"
export PATH="/root/perl5/bin:${PATH}"


When logged into a terminal as su -, I actually have ALL of the correct paths including PERL5LIB. Now, after installing ZoneMinder, why isn't the hardcoded @INC modified by the environment variable, PERL5LIB? I receive the following error when attempting to start ZoneMinder since ZoneMinder apparently can't find ZoneMinder.pm which is installed in /root/perl5/lib/perl5:

Starting ZoneMinder: Can't locate ZoneMinder.pm in @INC (@INC contains: /usr/share/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5) at /usr/bin/zmpkg.pl line 37.
BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 37.

P.S. The command, perl -V, does show the modified @INC which includes /root/perl5/lib/perl5 .... Hmmm. I've even tried manually starting ZoneMinder after ensuring the path in @INC is properly modified by PERL5LIB. Recompiling ZoneMinder didn't solve the problem. The error persists as ZoneMinder apparently isn't seeing the modified @INC ...

Last edited by tpreitzel; 08-03-2012 at 05:51 PM.
 
Old 08-03-2012, 06:48 PM   #3
lopid
Member
 
Registered: Jun 2008
Posts: 107

Rep: Reputation: Disabled
I'm able to ./configure ZoneMinder and have it detect required modules in my own PERL5LIB, but I couldn't test running it for you, because it failed to compile:

Code:
zm_logger.cpp: In constructor 'Logger::Logger()':
zm_logger.cpp:112:49: error: 'isatty' was not declared in this scope
zm_logger.cpp: In member function 'void Logger::logFile(const string&)':
zm_logger.cpp:444:69: error: 'getpid' was not declared in this scope
zm_logger.cpp: In member function 'void Logger::logPrint(bool, const char*, int, int, const char*, ...)':
zm_logger.cpp:519:39: error: 'syscall' was not declared in this scope
zm_logger.cpp:521:22: error: 'getpid' was not declared in this scope
zm_logger.cpp: At global scope:
zm_logger.cpp:43:13: warning: 'void subtractTime(timeval*, timeval*)' defined but not used [-Wunused-function]
make[2]: *** [zm_logger.o] Error 1
make[2]: *** Waiting for unfinished jobs....
zm_local_camera.cpp: In static member function 'static bool LocalCamera::GetCurrentSettings(const char*, char*, int, bool)':
zm_local_camera.cpp:774:22: error: 'PATH_MAX' was not declared in this scope
zm_local_camera.cpp:779:21: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:781:22: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:782:29: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:799:67: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:801:54: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:811:92: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:936:91: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:961:82: error: 'queryDevice' was not declared in this scope
 
Old 08-03-2012, 07:12 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by tpreitzel
The command, perl -V, does show the modified @INC which includes /root/perl5/lib/perl5 .... Hmmm. I've even tried manually starting ZoneMinder after ensuring the path in @INC is properly modified by PERL5LIB. Recompiling ZoneMinder didn't solve the problem. The error persists as ZoneMinder apparently isn't seeing the modified @INC ...
Interesting. I'm running into a nearly identical problem with building Perl 5.16.0 (and installing CPAN modules) this evening. I am testing out a few different approaches, and will subscribe to this thread in case I come up with a resolution.
 
Old 08-03-2012, 07:33 PM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
I resolved this shortly after posting. I'm not certain my notes will help you, as 1) I took a drastic approach to fix it; 2) root cause is ambiguous (at least to me) right now.

Quick synopsis: I installed Perl 5.16.0 from source, and then began installing CPAN modules via the cpan(1) program. First, I set PERL5LIB=/myperl/lib, and then I initialized both of the following during cpan(1)'s first run:
  • Makefile.PL: PREFIX=/myperl
  • Build.PL: --install_base /myperl

Great. Except I started getting bizarre symptoms like you're describing. I could successfully install CPAN modules, but they'd be mysteriously "gone" when I attempted to build another module that depended on any of them. PERL5LIB was set correctly, and @INC was looking in the right places. I couldn't make sense of it.

----------

My drastic "fix" was simple:
  1. Blow away the first Perl build, all CPAN modules, and CPAN configs.
  2. Rebuild Perl 5.16.0 from scratch (./Configure -des -Dprefix=/myperl).
  3. Set PERL5LIB to the appropriate path (/myperl/lib).
  4. Launch cpan(1), and accept most of the defaults. IOW, I did not feed it any Makefile.PL or Build.PL values. (I decided cpan(1) is smarter than me.)

Now I'm able to install CPAN modules in the location I want them to go. I realize this posting is disjointed, but I hope it leads you down some troubleshooting paths for good clues.

Last edited by anomie; 08-03-2012 at 07:38 PM.
 
Old 08-03-2012, 08:35 PM   #6
tpreitzel
Member
 
Registered: Aug 2007
Posts: 253

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by lopid View Post
I'm able to ./configure ZoneMinder and have it detect required modules in my own PERL5LIB, but I couldn't test running it for you, because it failed to compile:

Code:
zm_logger.cpp: In constructor 'Logger::Logger()':
zm_logger.cpp:112:49: error: 'isatty' was not declared in this scope
zm_logger.cpp: In member function 'void Logger::logFile(const string&)':
zm_logger.cpp:444:69: error: 'getpid' was not declared in this scope
zm_logger.cpp: In member function 'void Logger::logPrint(bool, const char*, int, int, const char*, ...)':
zm_logger.cpp:519:39: error: 'syscall' was not declared in this scope
zm_logger.cpp:521:22: error: 'getpid' was not declared in this scope
zm_logger.cpp: At global scope:
zm_logger.cpp:43:13: warning: 'void subtractTime(timeval*, timeval*)' defined but not used [-Wunused-function]
make[2]: *** [zm_logger.o] Error 1
make[2]: *** Waiting for unfinished jobs....
zm_local_camera.cpp: In static member function 'static bool LocalCamera::GetCurrentSettings(const char*, char*, int, bool)':
zm_local_camera.cpp:774:22: error: 'PATH_MAX' was not declared in this scope
zm_local_camera.cpp:779:21: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:781:22: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:782:29: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:799:67: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:801:54: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:811:92: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:936:91: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:961:82: error: 'queryDevice' was not declared in this scope

Although I want this discussion to remain on-topic as much as possible, I'll try to briefly address your problem. I'll be working from memory so I hope the details are correct.

1. Manually patch the source file, zm_logger.cpp, by adding #include <unistd.h>
2. Manually patch the source file, zm_thread.h, by adding #include <unistd.h>

These changes should point you in the right direction at the very least.
 
Old 08-03-2012, 08:37 PM   #7
tpreitzel
Member
 
Registered: Aug 2007
Posts: 253

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by anomie View Post
I resolved this shortly after posting. I'm not certain my notes will help you, as 1) I took a drastic approach to fix it; 2) root cause is ambiguous (at least to me) right now.

Quick synopsis: I installed Perl 5.16.0 from source, and then began installing CPAN modules via the cpan(1) program. First, I set PERL5LIB=/myperl/lib, and then I initialized both of the following during cpan(1)'s first run:
  • Makefile.PL: PREFIX=/myperl
  • Build.PL: --install_base /myperl

Great. Except I started getting bizarre symptoms like you're describing. I could successfully install CPAN modules, but they'd be mysteriously "gone" when I attempted to build another module that depended on any of them. PERL5LIB was set correctly, and @INC was looking in the right places. I couldn't make sense of it.

----------

My drastic "fix" was simple:
  1. Blow away the first Perl build, all CPAN modules, and CPAN configs.
  2. Rebuild Perl 5.16.0 from scratch (./Configure -des -Dprefix=/myperl).
  3. Set PERL5LIB to the appropriate path (/myperl/lib).
  4. Launch cpan(1), and accept most of the defaults. IOW, I did not feed it any Makefile.PL or Build.PL values. (I decided cpan(1) is smarter than me.)

Now I'm able to install CPAN modules in the location I want them to go. I realize this posting is disjointed, but I hope it leads you down some troubleshooting paths for good clues.
Drastic indeed! I'd prefer not having to recompile Perl so I'll wait for a LITTLE while. Thanks for the information, though.
 
Old 08-04-2012, 07:07 AM   #8
lopid
Member
 
Registered: Jun 2008
Posts: 107

Rep: Reputation: Disabled
Quote:
Originally Posted by tpreitzel View Post
Although I want this discussion to remain on-topic as much as possible, I'll try to briefly address your problem. I'll be working from memory so I hope the details are correct.

1. Manually patch the source file, zm_logger.cpp, by adding #include <unistd.h>
2. Manually patch the source file, zm_thread.h, by adding #include <unistd.h>

These changes should point you in the right direction at the very least.
I patched as so but got further problems. I was only doing it to see if I could help you out, I've no other interest in ZoneMinder. I'd be inclined to take this up with their developers, especially if the source needs to be patched out of the box just to get it to compile. I wonder if that's the case on other platforms.

Addendum: I tried it on Debian and got a different compilation error.

Last edited by lopid; 08-04-2012 at 07:20 AM. Reason: Follow-up on another platform.
 
Old 08-06-2012, 12:50 PM   #9
tpreitzel
Member
 
Registered: Aug 2007
Posts: 253

Original Poster
Rep: Reputation: 28
Outstanding Issue With Perl 5.16.0 in -Current

This problem is a major issue. Personally, I wouldn't release Slackware 14 with this bug ...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
install vim via yum thinks perl is required - I build perl 5.14.2 from source rubanek Linux - General 4 05-02-2012 06:42 PM
Print output of a script to screen using Perl/Multiple installation of Perl Modules metallica1973 Linux - General 1 02-17-2011 05:59 PM
LXer: Installing Eclipse, the Epic Perl plugin and my first Perl GUI program LXer Syndicated Linux News 0 05-08-2009 06:41 PM
RHEL4u2 perl localtime() call issues (perl & glibc) Brad.Scalio@noaa.gov Linux - Enterprise 3 01-23-2007 09:27 PM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 08:09 PM


All times are GMT -5. The time now is 02:26 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration