Richard Lee wrote:
Richard Lee wrote:
Chas. Owens wrote:
On Apr 16, 2008, at 13:33, Monty wrote:
Hope this is the right forum for this.

I recently downloaded Curses-1.23.tar from CPAN for installation on to
my Solaris 8 system.  I installed the module in the same area as all
my other perl modules: /usr/local/lib/perl5/5.8.5, but I noticed
there's also a directory named /usr/local/lib/perl5/site_perl.

Under the directory 5.8.5, I untarred the file and it created a
directory named Curse-1.23 and put everything under it.  I moved the
Curses.pm module up to the 5.8.5 directory and renamed the Curses-1.23
directory to Curses, so I can "use Curses" in my scripts.

Is this the correct way to install this module?  My scripts can't seem
to find it.
snip

No, this is not the proper way to install a Perl module. You have four common routes to installing a module:
1. become root and use CPAN
2. become root and install manually
3. use CPAN as a normal user and set PERL5_LIB (or use the lib pragma)
4. install manually as a normal user and set PERL5_LIB (or use the lib pragma)

1. become root and use CPAN:
su -
perl -MCPAN -e "install Curses"
#answer all of the questions, the defaults tend to be correct

2. become root and install manually
su -
gzip -dc module-version.tar.gz | tar xvf
cd module-version
perl Makefile.pl
make
make test
make install
#stop if at any step where you get errors


3. use CPAN as a normal user and set PERL5_LIB (or use the lib pragma)
#like 1., but you should set PREFIX=/some/directory/you/countrol
perl -MCPAN -e "install Curses"
echo "export PERL5_LIB=/some/directory/you/countrol" >> .profile

4. install manually as a normal user and set PERL5_LIB (or use the lib pragma)
gzip -dc module-version.tar.gz | tar xvf
cd module-version
perl Makefile.pl PREFIX=/some/directory/you/countrol
make
make test
make install
#stop if at any step where you get errors
echo "export PERL5_LIB=/some/directory/you/countrol" >> .profile




I am planning to use 3 or 4.. as I am not root user on this machine.
Problem is, this is solaris and there is only gcc available. What is the method to say use gcc ? Also, for 3), am I suppose to export PERL5_LIB before doing the perl -MCPAN........ ?


which means solaris system was built by cc but after gone in production it was removed. I do see gcc compiler.. that's why I was wondering if I can specify the compiler while doing module installation..
keep googl'ing for solutions..

[EMAIL PROTECTED] ~/.cpan/build/IO-Tty-1.07> perl Makefile.PL
Now let's see what we can find out about your system
(logfiles of failing tests are available in the conf/ dir)...

ERROR: cannot run the configured compiler 'cc'
(see conf/compilerok.log). Suggestions:
1) The complier 'cc' is not in your PATH. Add it
  to the PATH and try again. OR
2) The compiler isn't installed on your system. Install it. OR
3) You only have a different compiler installed (e.g. 'gcc').
  Either fix the compiler config in the perl Config.pm
  or install a perl that was built with the right compiler
  (you could build perl yourself with the available compiler).

Note: this is a system-administration issue, please ask your local
admin for help. Thank you.

no luck w/ perlgcc...   failing at last make install stage


[EMAIL PROTECTED] ~/.cpan/build/IO-Tty-1.07> perlgcc Makefile.PL PREFIX=/home/lee/mydir/perl
WARNING: perl versions prior to 5.8 are untested and may have problems.
Now let's see what we can find out about your system
(logfiles of failing tests are available in the conf/ dir)...
Looking for _getpty()...... not found.
Looking for getpt()........ not found.
Looking for grantpt()...... FOUND.
Looking for openpty()...... not found.
Looking for ptsname()...... FOUND.
Looking for ptsname_r().... not found.
Looking for sigaction().... FOUND.
Looking for strlcpy()...... FOUND.
Looking for ttyname()...... FOUND.
Looking for unlockpt()..... FOUND.
Looking for libutil.h...... not found.
Looking for pty.h.......... not found.
Looking for sys/pty.h...... not found.
Looking for sys/ptyio.h.... not found.
Looking for sys/stropts.h.. FOUND.
Looking for termio.h....... FOUND.
Looking for termios.h...... FOUND.
Looking for util.h......... not found.
Checking which symbols compile OK...
(sorry for the tedious check, but some systems have not too clean
header files, to say the least;  '+' means OK, '-' means not defined
and '*' has compile problems...)
+B0 +B110 +B115200 +B1200 +B134 +B150 +B153600 +B1800 +B19200 +B200 +B230400 +B2400 +B300 +B307200 +B38400 +B460800 +B4800 +B50 +B57600 +B600 +B75 +B76800 +B9600 +BRKINT +BS0 +BS1 +BSDLY +CBAUD +CBAUDEXT -CBRK +CCTS_OFLOW +CDEL +CDSUSP +CEOF +CEOL +CEOL2 +CEOT +CERASE +CESC +CFLUSH +CIBAUD +CIBAUDEXT +CINTR +CKILL +CLNEXT +CLOCAL +CNSWTCH +CNUL +CQUIT +CR0 +CR1 +CR2 +CR3 +CRDLY +CREAD +CRPRNT +CRTSCTS +CRTSXOFF +CRTS_IFLOW +CS5 +CS6 +CS7 +CS8 +CSIZE +CSTART +CSTOP +CSTOPB +CSUSP +CSWTCH +CWERASE +DEFECHO +DIOC +DIOCGETP +DIOCSETP +DOSMODE +ECHO +ECHOCTL +ECHOE +ECHOK +ECHOKE +ECHONL +ECHOPRT +EXTA +EXTB +FF0 +FF1 +FFDLY +FIORDCHK +FLUSHO +HUPCL +ICANON +ICRNL +IEXTEN +IGNBRK +IGNCR +IGNPAR +IMAXBEL +INLCR +INPCK +ISIG +ISTRIP +IUCLC +IXANY +IXOFF +IXON +KBENABLED +LDCHG +LDCLOSE +LDDMAP +LDEMAP +LDGETT +LDGMAP +LDIOC +LDNMAP +LDOPEN +LDSETT +LDSMAP +LOBLK +NCCS +NL0 +NL1 +NLDLY +NOFLSH +OCRNL +OFDEL +OFILL +OLCUC +ONLCR +ONLRET +ONOCR +OPOST +PAGEOUT +PARENB +PAREXT +PARMRK +PARODD +PENDIN +RCV1EN +RTS_TOG +TAB0 +TAB1 +TAB2 +TAB3 +TABDLY +TCDSET +TCFLSH +TCGETA +TCGETS +TCIFLUSH +TCIOFF +TCIOFLUSH +TCION +TCOFLUSH +TCOOFF +TCOON +TCSADRAIN +TCSAFLUSH +TCSANOW +TCSBRK +TCSETA +TCSETAF +TCSETAW -TCSETCTTY +TCSETS +TCSETSF +TCSETSW +TCXONC +TERM_D40 +TERM_D42 +TERM_H45 +TERM_NONE +TERM_TEC +TERM_TEX +TERM_V10 +TERM_V61 +TIOCCBRK +TIOCCDTR -TIOCCONS +TIOCEXCL +TIOCFLUSH +TIOCGETC +TIOCGETD +TIOCGETP +TIOCGLTC +TIOCGPGRP +TIOCGSID +TIOCGSOFTCAR +TIOCGWINSZ +TIOCHPCL +TIOCKBOF +TIOCKBON +TIOCLBIC +TIOCLBIS +TIOCLGET +TIOCLSET +TIOCMBIC +TIOCMBIS +TIOCMGET +TIOCMSET +TIOCM_CAR +TIOCM_CD +TIOCM_CTS +TIOCM_DSR +TIOCM_DTR +TIOCM_LE +TIOCM_RI +TIOCM_RNG +TIOCM_RTS +TIOCM_SR +TIOCM_ST +TIOCNOTTY +TIOCNXCL +TIOCOUTQ +TIOCREMOTE +TIOCSBRK +TIOCSCTTY +TIOCSDTR +TIOCSETC +TIOCSETD +TIOCSETN +TIOCSETP +TIOCSIGNAL +TIOCSLTC +TIOCSPGRP -TIOCSSID +TIOCSSOFTCAR +TIOCSTART +TIOCSTI +TIOCSTOP +TIOCSWINSZ +TM_ANL +TM_CECHO +TM_CINVIS +TM_LCF +TM_NONE +TM_SET +TM_SNL +TOSTOP +VCEOF +VCEOL +VDISCARD +VDSUSP +VEOF +VEOL +VEOL2 +VERASE +VINTR +VKILL +VLNEXT +VMIN +VQUIT +VREPRINT +VSTART +VSTOP +VSUSP +VSWTCH +VT0 +VT1 +VTDLY +VTIME +VWERASE +WRAP +XCASE +XCLUDE +XMT1EN +XTABS

>>> Configuration looks good! <<<

Writing IO::Tty::Constant.pm...
DEFINE = -DHAVE_DEV_PTMX -DHAVE_GRANTPT -DHAVE_PTSNAME -DHAVE_SIGACTION -DHAVE_STRLCPY -DHAVE_SYS_STROPTS_H -DHAVE_TERMIOS_H -DHAVE_TERMIO_H -DHAVE_TTYNAME -DHAVE_UNLOCKPT
Checking if your kit is complete...
Looks good
Have /usr/perl5/5.6.1/lib/Sun/Solaris/PerlGcc/Config.pm expected /usr/perl5/5.6.1/lib/sun4-solaris-64int/Config.pm Your perl and your Config.pm seem to have different ideas about the architecture
they are running on.
Perl thinks: [PerlGcc]
Config says: [sun4-solaris-64int]
This may or may not cause problems. Please check your installation of perl if you
have problems building this extension.
Writing Makefile for IO::Tty
[EMAIL PROTECTED] ~/.cpan/build/IO-Tty-1.07> make
cp Pty.pm blib/lib/IO/Pty.pm
cp Tty.pm blib/lib/IO/Tty.pm
cp Tty/Constant.pm blib/lib/IO/Tty/Constant.pm
/usr/perl5/5.6.1/bin/perl -I/usr/perl5/5.6.1/lib/sun4-solaris-64int -I/usr/perl5/5.6.1/lib /usr/perl5/5.6.1/lib/ExtUtils/xsubpp -typemap /usr/perl5/5.6.1/lib/ExtUtils/typemap Tty.xs > Tty.xsc && mv Tty.xsc Tty.c gcc -c -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO -O2 -fno-strict-aliasing -DVERSION=\"1.07\" -DXS_VERSION=\"1.07\" -fPIC -I/usr/perl5/5.6.1/lib/sun4-solaris-64int/CORE -DHAVE_DEV_PTMX -DHAVE_GRANTPT -DHAVE_PTSNAME -DHAVE_SIGACTION -DHAVE_STRLCPY -DHAVE_SYS_STROPTS_H -DHAVE_TERMIOS_H -DHAVE_TERMIO_H -DHAVE_TTYNAME -DHAVE_UNLOCKPT Tty.c
Running Mkbootstrap for IO::Tty ()
chmod 644 Tty.bs
rm -f blib/arch/auto/IO/Tty/Tty.so
LD_RUN_PATH="" gcc -G Tty.o -o blib/arch/auto/IO/Tty/Tty.so chmod 755 blib/arch/auto/IO/Tty/Tty.so
cp Tty.bs blib/arch/auto/IO/Tty/Tty.bs
chmod 644 blib/arch/auto/IO/Tty/Tty.bs
Manifying blib/man3/IO::Pty.3
Manifying blib/man3/IO::Tty.3
Manifying blib/man3/IO::Tty::Constant.3
[EMAIL PROTECTED] ~/.cpan/build/IO-Tty-1.07> make test
PERL_DL_NONLAZY=1 /usr/perl5/5.6.1/bin/perl -Iblib/arch -Iblib/lib -I/usr/perl5/5.6.1/lib/sun4-solaris-64int -I/usr/perl5/5.6.1/lib test.pl
1..4
Using /home/lee/.cpan/build/IO-Tty-1.07/blib
Configuration: -DHAVE_DEV_PTMX -DHAVE_GRANTPT -DHAVE_PTSNAME -DHAVE_SIGACTION -DHAVE_STRLCPY -DHAVE_SYS_STROPTS_H -DHAVE_TERMIOS_H -DHAVE_TERMIO_H -DHAVE_TTYNAME -DHAVE_UNLOCKPT
Checking for appropriate ioctls: TIOCNOTTY TIOCSCTTY
Checking that returned fd's don't clash with stdin/out/err...
trying /dev/ptmx...
trying grantpt()...
trying unlockpt()...
trying ptsname()...
trying to open /dev/pts/17...
trying to I_PUSH ptem...
trying to I_PUSH ldterm...
trying to I_PUSH ttcompat...
ok 1
Checking if child gets pty as controlling terminal...
trying /dev/ptmx...
trying grantpt()...
trying unlockpt()...
trying ptsname()...
trying to open /dev/pts/17...
trying to I_PUSH ptem...
trying to I_PUSH ldterm...
trying to I_PUSH ttcompat...
warning: TIOCSCTTY failed, slave might not be set as controlling terminal: Inappropriate ioctl for device at /home/lee/.cpan/build/IO-Tty-1.07/blib/lib/IO/Pty.pm line 120.
ok 2
gimme on /dev/tty: seems OK!
back on STDOUT: SEEMS OK!
ok 3
Checking basic functionality and how your ptys handle large strings...
 This test may hang on certain systems, even though it is protected
 by alarm().  If the counter stops, try Ctrl-C, the test should continue.

trying /dev/ptmx...
trying grantpt()...
trying unlockpt()...
trying ptsname()...
trying to open /dev/pts/17...
trying to I_PUSH ptem...
trying to I_PUSH ldterm...
trying to I_PUSH ttcompat...
isatty($master): NO
isatty($slave): YES
Child PID = 2955
Good, your raw ptys can handle at least 512 bytes at once.
ok 4
Slave got EOF at line 512, byte 0.
Passed 4 of 4 tests.
[EMAIL PROTECTED] ~/.cpan/build/IO-Tty-1.07> make install
Warning: You do not have permissions to install into /usr/perl5/site_perl/5.6.1/sun4-solaris-64int at /usr/perl5/5.6.1/lib/ExtUtils/Install.pm line 85. mkdir /usr/perl5/site_perl/5.6.1/sun4-solaris-64int/auto: Permission denied at /usr/perl5/5.6.1/lib/ExtUtils/Install.pm line 138
*** Error code 255
The following command caused the error:
/usr/perl5/5.6.1/bin/perl -Iblib/lib -I/usr/perl5/5.6.1/lib -MExtUtils::Install -e "install([EMAIL PROTECTED],'0',0,'0');" \ read /usr/perl5/site_perl/5.6.1/sun4-solaris-64int/auto/IO/Tty/.packlist \ write /usr/perl5/site_perl/5.6.1/sun4-solaris-64int/auto/IO/Tty/.packlist \
       blib/lib /usr/perl5/site_perl/5.6.1 \
       blib/arch /usr/perl5/site_perl/5.6.1/sun4-solaris-64int \
       blib/bin /home/lee/mydir/perl/bin \
       blib/script /home/lee/mydir/perl/bin \
         \
         \
       blib/man1 /home/lee/mydir/perl/man/man1 \
       blib/man3 /home/lee/mydir/perl/man/man3
make: Fatal error: Command failed for target `pure_site_install'

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to