Good day, Wise Monks and Nuns.
I'm having a problem installing the Clone module for the ActiveState perl, version 5.8, running on a SunBlade 1500 (SPARC) with Solaris 10.
I want to use Class::DBI with SQLite. When installing all the dependencies, about a week ago, I ran into this problem and havent been able to continue.
I've used two approaches: one is compiling the module and the other is using ppm to do the installation. Both have failed. So I'd like to know if any of you can give me any suggestion on how to achieve the installation of this module so I can continue and be able to finally install Class::DBI (I suspect that USING it its going to be another headache, but learning is actually part of the fun).
===================COMPILATION APPROACH===================
I've tried the "compilation" approach first: download the tar ball and run the perl Makefile.PL / make / make test / make install cycle. That worked for all the other modules I've installed, but in the case of Clone, it is having problems with compiler flags.
# cd Clone-0.23
# ls
Changes Clone.o MANIFEST Makefile.PL pm_to_blib
Clone.bs Clone.pm META.yml Makefile.old t
Clone.c Clone.xs Makefile blib
# /usr/ccs/bin/make clean
rm -f \
*.a core \
core.[0-9] blib/arch/auto/Clone/extralibs.all \
core.[0-9][0-9] Clone.bso \
pm_to_blib.ts core.[0-9][0-9][0-9][0-9] \
Clone.x Clone.bs \
perl tmon.out \
*.o pm_to_blib \
blib/arch/auto/Clone/extralibs.ld blibdirs.ts \
core.[0-9][0-9][0-9][0-9][0-9] Clone.c \
*perl.core core.*perl.*.? \
Makefile.aperl perl \
Clone.def core.[0-9][0-9][0-9] \
mon.out libClone.def \
perlmain.c perl.exe \
so_locations Clone.exp
rm -rf \
blib
mv Makefile Makefile.old > /dev/null 2>&1
# ../../bin/perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for Clone
# /usr/ccs/bin/make
cp Clone.pm blib/lib/Clone.pm
AutoSplitting blib/lib/Clone.pm (blib/lib/auto/Clone)
../../bin/perl /opt/ActivePerl-5.8/lib/ExtUtils/xsubpp -typemap /opt/
+ActivePerl-5.8/lib/ExtUtils/typemap Clone.xs > Clone.xsc && mv Clone
+.xsc Clone.c
cc -c -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -xarch=v9 -DUSE_SITEC
+USTOMIZE -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O
+3 -DVERSION=\"0.23\" -DXS_VERSION=\"0.23\" -KPIC "-I/opt/ActivePe
+rl-5.8/lib/CORE" Clone.c
cc: unrecognized option `-KPIC'
cc: language arch=v9 not recognized
cc: Clone.c: linker input file unused because linking not done
Running Mkbootstrap for Clone ()
chmod 644 Clone.bs
rm -f blib/arch/auto/Clone/Clone.so
cc -G -xarch=v9 -L/opt/SUNWspro/prod/lib/v9 -L/usr/lib/sparcv9 -L/usr
+/ccs/lib/sparcv9 Clone.o -o blib/arch/auto/Clone/Clone.so \
\
cc: Clone.o: No such file or directory
cc: warning: `-x arch=v9' after last input file has no effect
cc: no input files
*** Error code 1
make: Fatal error: Command failed for target `blib/arch/auto/Clone/Clo
+ne.so'
# pwd
/opt/ActivePerl-5.8/pkg/Clone-0.23
So I removed the -xarch and -KPIC flags from the Makefile.
Ran the make again:
# /usr/ccs/bin/make
cc -c -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DUSE_SITECUSTOMIZE -
+DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -DVER
+SION=\"0.23\" -DXS_VERSION=\"0.23\" "-I/opt/ActivePerl-5.8/lib/CORE
+" Clone.c
Running Mkbootstrap for Clone ()
chmod 644 Clone.bs
rm -f blib/arch/auto/Clone/Clone.so
cc -G -L/opt/SUNWspro/prod/lib/v9 -L/usr/lib/sparcv9 -L/usr/ccs/lib/s
+parcv9 Clone.o -o blib/arch/auto/Clone/Clone.so \
\
chmod 755 blib/arch/auto/Clone/Clone.so
cp Clone.bs blib/arch/auto/Clone/Clone.bs
chmod 644 blib/arch/auto/Clone/Clone.bs
Manifying blib/man3/Clone.3
Now the compilation works, but when i run the tests:
# /usr/ccs/bin/make test
PERL_DL_NONLAZY=1 ../../bin/perl "-MExtUtils::Command::MM" "-e" "test_
+harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01array.....Can't load '/opt/ActivePerl-5.8/pkg/Clone-0.23/blib/arch
+/auto/Clone/Clone.so' for module Clone: ld.so.1: ../../bin/perl: fata
+l: /opt/ActivePerl-5.8/pkg/Clone-0.23/blib/arch/auto/Clone/Clone.so:
+wrong ELF class: ELFCLASS32 at /opt/ActivePerl-5.8/lib/DynaLoader.pm
+line 230.
at t/01array.t line 12
Compilation failed in require at t/01array.t line 12.
BEGIN failed--compilation aborted at t/01array.t line 12.
t/01array.....dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-7
Failed 7/7 tests, 0.00% okay
t/02hash......Can't load '/opt/ActivePerl-5.8/pkg/Clone-0.23/blib/arch
+/auto/Clone/Clone.so' for module Clone: ld.so.1: ../../bin/perl: fata
+l: /opt/ActivePerl-5.8/pkg/Clone-0.23/blib/arch/auto/Clone/Clone.so:
+wrong ELF class: ELFCLASS32 at /opt/ActivePerl-5.8/lib/DynaLoader.pm
+line 230.
at t/02hash.t line 12
Compilation failed in require at t/02hash.t line 12.
BEGIN failed--compilation aborted at t/02hash.t line 12.
t/02hash......dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-12
Failed 12/12 tests, 0.00% okay
t/03scalar....Can't load '/opt/ActivePerl-5.8/pkg/Clone-0.23/blib/arch
+/auto/Clone/Clone.so' for module Clone: ld.so.1: ../../bin/perl: fata
+l: /opt/ActivePerl-5.8/pkg/Clone-0.23/blib/arch/auto/Clone/Clone.so:
+wrong ELF class: ELFCLASS32 at /opt/ActivePerl-5.8/lib/DynaLoader.pm
+line 230.
at t/03scalar.t line 12
Compilation failed in require at t/03scalar.t line 12.
BEGIN failed--compilation aborted at t/03scalar.t line 12.
t/03scalar....dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-10
Failed 10/10 tests, 0.00% okay
t/04tie.......Can't load '/opt/ActivePerl-5.8/pkg/Clone-0.23/blib/arch
+/auto/Clone/Clone.so' for module Clone: ld.so.1: ../../bin/perl: fata
+l: /opt/ActivePerl-5.8/pkg/Clone-0.23/blib/arch/auto/Clone/Clone.so:
+wrong ELF class: ELFCLASS32 at /opt/ActivePerl-5.8/lib/DynaLoader.pm
+line 230.
at t/04tie.t line 12
Compilation failed in require at t/04tie.t line 12.
BEGIN failed--compilation aborted at t/04tie.t line 12.
t/04tie.......dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-5
Failed 5/5 tests, 0.00% okay
t/05dtype.....Can't load '/opt/ActivePerl-5.8/pkg/Clone-0.23/blib/arch
+/auto/Clone/Clone.so' for module Clone: ld.so.1: ../../bin/perl: fata
+l: /opt/ActivePerl-5.8/pkg/Clone-0.23/blib/arch/auto/Clone/Clone.so:
+wrong ELF class: ELFCLASS32 at /opt/ActivePerl-5.8/lib/DynaLoader.pm
+line 230.
at t/05dtype.t line 12
Compilation failed in require at t/05dtype.t line 12.
BEGIN failed--compilation aborted at t/05dtype.t line 12.
t/05dtype.....dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
t/06refcnt....Can't load '/opt/ActivePerl-5.8/pkg/Clone-0.23/blib/arch
+/auto/Clone/Clone.so' for module Clone: ld.so.1: ../../bin/perl: fata
+l: /opt/ActivePerl-5.8/pkg/Clone-0.23/blib/arch/auto/Clone/Clone.so:
+wrong ELF class: ELFCLASS32 at /opt/ActivePerl-5.8/lib/DynaLoader.pm
+line 230.
at t/06refcnt.t line 12
Compilation failed in require at t/06refcnt.t line 12.
BEGIN failed--compilation aborted at t/06refcnt.t line 12.
t/06refcnt....dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-9
Failed 9/9 tests, 0.00% okay
t/07magic.....Can't load '/opt/ActivePerl-5.8/pkg/Clone-0.23/blib/arch
+/auto/Clone/Clone.so' for module Clone: ld.so.1: ../../bin/perl: fata
+l: /opt/ActivePerl-5.8/pkg/Clone-0.23/blib/arch/auto/Clone/Clone.so:
+wrong ELF class: ELFCLASS32 at /opt/ActivePerl-5.8/lib/DynaLoader.pm
+line 230.
at t/07magic.t line 5
Compilation failed in require at t/07magic.t line 5.
BEGIN failed--compilation aborted at t/07magic.t line 5.
t/07magic.....dubious
Test returned status 2 (wstat 512, 0x200)
t/dclone......Can't load '/opt/ActivePerl-5.8/pkg/Clone-0.23/blib/arch
+/auto/Clone/Clone.so' for module Clone: ld.so.1: ../../bin/perl: fata
+l: /opt/ActivePerl-5.8/pkg/Clone-0.23/blib/arch/auto/Clone/Clone.so:
+wrong ELF class: ELFCLASS32 at /opt/ActivePerl-5.8/lib/DynaLoader.pm
+line 230.
at t/dclone.t line 61
Compilation failed in require at t/dclone.t line 61.
BEGIN failed--compilation aborted at t/dclone.t line 61.
t/dclone......dubious
Test returned status 2 (wstat 512, 0x200)
Failed Test Stat Wstat Total Fail Failed List of Failed
----------------------------------------------------------------------
+---------
t/01array.t 2 512 7 13 185.71% 1-7
t/02hash.t 2 512 12 23 191.67% 1-12
t/03scalar.t 2 512 10 19 190.00% 1-10
t/04tie.t 2 512 5 9 180.00% 1-5
t/05dtype.t 2 512 2 3 150.00% 1-2
t/06refcnt.t 2 512 9 17 188.89% 1-9
t/07magic.t 2 512 ?? ?? % ??
t/dclone.t 2 512 ?? ?? % ??
Failed 8/8 test scripts, 0.00% okay. 45/45 subtests failed, 0.00% okay
+.
*** Error code 2
make: Fatal error: Command failed for target `test_dynamic'
#
This is the compilers version:
# /usr/ucb/cc -v
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/spec
+s
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr
+/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6
#
===================PPM APPROACH===================
So I thought of downloading the zip file from ActiveState repository, assuming that these were precompiled modules, and i could let ppm take care of the installation for me. I downloaded the zip file, unziped it, and ran the ppm like this:
# ../bin/ppm install ./Clone.ppd
Only to get the following message:
ppm install failed: The PPD does not provide code to install for this
+platform
I used the -d flag so i could trace the execution of the ppm script and the last thing it does before dying is create an ActivePerl::PPM::Package object and try to extract the codebase attribute. It draws a blank and dies with the message "no code to install"
I've been searching the Monastery, ActiveStates site and the web in general, but havent been able to find much. jZed gave me some pointers, and they were very similar to what
I found in Josh Stroschein's Painless Windows Module Installation with PPM. Both gave me the idea of editing the CODEBASE HREF in the ppd, but it didnt work.
# cat ./Clone.ppd
<?xml version="1.0" encoding="UTF-8"?>
<SOFTPKG NAME="Clone" VERSION="0,23,0,0">
<ABSTRACT>recursively copy Perl datatypes</ABSTRACT>
<AUTHOR>Ray Finch (rdf@cpan.org)</AUTHOR>
<IMPLEMENTATION>
<ARCHITECTURE NAME="sun4-solaris-thread-multi-5.8" />
<CODEBASE HREF="file:///opt/ActivePerl-5.8/pkg/sun4-solaris-thread
+-multi-5.8/Clone-0.23.tar.gz" />
<OS NAME="solaris" />
<PROVIDE NAME="Clone" VERSION="0.23" />
</IMPLEMENTATION>
<TITLE>Clone</TITLE>
</SOFTPKG>
# ls -lta ./sun4-solaris-thread-multi-5.8
total 924
drwxr-xr-x 26 bin bin 2560 Jun 4 12:50 ..
drwxr-xr-x 3 root root 512 Jun 4 12:40 .
drwxr-xr-x 3 root root 512 May 31 13:09 prueba
-rw-rw-r-- 1 root root 51200 May 4 11:46 Clone-0.23.tar.g
+z
-rw-rw-r-- 1 root root 68792 Feb 5 17:02 HTML-Template-2.
+9.tar.gz
-rw-rw-r-- 1 root root 225286 Apr 14 2006 DBD-SQLite-1.12.
+tar.gz
-rw-rw-r-- 1 root root 11439 Jul 25 2005 Calendar-Schedul
+e-0.02.tar.gz
-rw-rw-r-- 1 root root 44803 Sep 17 2003 Config-IniFiles-
+2.38.tar.gz
-rw-rw-r-- 1 root root 36139 Feb 25 2003 Net-Daemon.tar.g
+z
-rw-rw-r-- 1 root root 15270 Feb 25 2003 Clone.tar.gz
#
One thing that really gave me hope (at least at the beginning) was this:
# ../bin/ppm install help
Downloading Local packlist...done
Downloading Local Calendar-Schedule PPD...done
Downloading Local Clone PPD...done
Downloading Local Config-IniFiles PPD...done
Downloading Local DBD-SQLite PPD...done
Downloading Local HTML-Template PPD...done
Downloading Local Net-Daemon PPD...done
ppm install failed: Can't find any package that provide help
It seems that at least the ppm can see and read the PPD file.
===================MORE DETAILS===================
In case you want to know the details of my perl installation:
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris-thread-multi-64
uname='sunos machete 5.8 generic_117350-38 sun4u sparc sunw,sun-bl
+ade-100 '
config_args='-ders -Dcc=cc -Dusethreads -Duseithreads -Ud_sigsetjm
+p -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -Duse64bitall -Ud_str
+error_r -Accflags=-DUSE_SITECUSTOMIZE -Duselargefiles -Accflags=-DNO_
+HASH_SEED -Dprefix=/opt/ActivePerl-5.8 -Dprivlib=/opt/ActivePerl-5.8/
+lib -Darchlib=/opt/ActivePerl-5.8/lib -Dsiteprefix=/opt/ActivePerl-5.
+8/site -Dsitelib=/opt/ActivePerl-5.8/site/lib -Dsitearch=/opt/ActiveP
+erl-5.8/site/lib -Dsed=/usr/bin/sed -Dconfig_heavy=Config_static.pl -
+Dcf_by=ActiveState -Dcf_email=support@ActiveState.com'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemulti
+plicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=define uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -xarch=
+v9 -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFF
+SET_BITS=64',
optimize='-O',
cppflags='-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -xarch=v9 -DUSE_
+SITECUSTOMIZE -DNO_HASH_SEED'
ccversion='Forte Developer 7 C 5.4 2002/03/09', gccversion='', gcc
+osandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1
+6
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
+ lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -xarch=v9 -L/opt/SUNWspro/prod/lib/v9 -L/usr/l
+ib/sparcv9 -L/usr/ccs/lib/sparcv9 '
libpth=/opt/SUNWspro/prod/lib/v9 /usr/lib/sparcv9 /usr/ccs/lib/spa
+rcv9 /usr/lib /usr/ccs/lib /usr/local/lib
libs=-lsocket -lnsl -ldl -lm -lpthread -lc
perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc
libc=/usr/lib/sparcv9/libc.so, so=so, useshrplib=false, libperl=li
+bperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-KPIC', lddlflags=' -G -xarch=v9 -L/opt/SUNWspro/prod/
+lib/v9 -L/usr/lib/sparcv9 -L/usr/ccs/lib/sparcv9'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT
USE_ITHREADS USE_LARGE_FILES USE_PERLIO
USE_REENTRANT_API USE_SITECUSTOMIZE
Locally applied patches:
ActivePerl Build 820 [274679]
Iin_load_module moved for compatibility with build 806
PerlEx support in CGI::Carp
Less verbose ExtUtils::Install and Pod::Find
Patch for CAN-2005-0448 from Debian with modifications
Rearrange @INC so that 'site' is searched before 'perl'
Partly reverted 24733 to preserve binary compatibility
28376 Add error checks after execing PL_cshname or PL_sh_path
28305 Pod::Html should not convert "foo" into ``foo''
27833 Change anchor generation in Pod::Html for '=item item 2'
27832,27847 fix Pod::Html::depod() for multi-line strings
27736 Make perl_fini() run with Sun WorkShop compiler
27719 Document the functions htmlify() and anchorify() in Pod::Htm
+l
27619 Bug in Term::ReadKey being triggered by a bug in Term::ReadL
+ine
27549 Move DynaLoader.o into libperl.so
27515 ignore directories when searching @INC
27359 Fix -d:Foo=bar syntax
27210 Fix quote typo in c2ph
27203 Allow compiling swigged C++ code
27133 Initialise lastparen in the regexp structure
27061 L<PerlIO> and Pod::Html
27034 Avoid "Prototype mismatch" warnings with autouse
26970 Make Passive mode the default for Net::FTP
26921 Avoid getprotobyname/number calls in IO::Socket::INET
26897,26903 Make common IPPROTO_* constants always available
26670 Make '-s' on the shebang line parse -foo=bar switches
26536 INSTALLSCRIPT versus INSTALLDIRS
26087 Storable 0.1 compatibility
25861 IO::File performace issue
25084 long groups entry could cause memory exhaustion
24699 ICMP_UNREACHABLE handling in Net::Ping
Built under solaris
Compiled at Jan 22 2007 20:05:24
@INC:
/opt/ActivePerl-5.8/site/lib
/opt/ActivePerl-5.8/lib
.
So there is....I'm stuck at the moment...all suggestions welcome....thanks in advance for your kind help.
Last minute note: I noticed, in the output for "perl -V", this flag:
ccversion='Forte Developer 7 C 5.4 2002/03/09', gccversion=''
And the output for -v in my compiler is:
# /usr/ucb/cc -v
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/spec
+s
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr
+/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6
Maybe this has something to do with the fact I cannot compile the tarball??
Best regards,
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.