Installing a module written in C on a UNIX without root access

H

hamidrezah

Dear Perl experts:

I am trying to install Algorithm::Combinatorics locally on a UNIX
system without root access. The module or at least portions of it are
written in C. I have the following cc available:

Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --enable-shared --enable-threads=posix --
disable-checking --with-system-zlib --enable-__cxa_atexit --disable-
libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-9)

So "perl Makefile.PL PREFIX=/home/mydir" works. "make" works well too.
But during "make test" I get the following errors:

PERL_DL_NONLAZY=1 .../perl/5.8.8/bin/perl "-MExtUtils::Command::MM" "-
e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_load............................
# Failed test 'use Algorithm::Combinatorics;'
t/00_load............................NOK 1# in t/00_load.t at line
6.
# Tried to use 'Algorithm::Combinatorics'.
# Error: Can't load '.../Algorithm-Combinatorics-0.25/blib/arch/
auto/Algorithm/Combinatorics/Combinatorics.so' for module
Algorithm::Combinatorics: .../Algorithm-Combinatorics 0.25/blib/arch/
auto/Algorithm/Combinatorics/Combinatorics.so: cannot open shared
object file: No such file or directory at .../perl/5.8.8/lib/5.8.8/
i686-linux-thread-multi/DynaLoader.pm line 230.
# at (eval 3) line 2
# Compilation failed in require at (eval 3) line 2.
# BEGIN failed--compilation aborted at t/00_load.t line 6.
# Looks like you failed 1 test of 1.

Then I chose the static linking "perl Makefile.PL PREFIX=/home/mydir
LINKTYPE=static". It worked well and "make" finished normally. Then
again "make test" fails giving the following errors:

perlmain.c: In function `xs_init':
perlmain.c:122: warning: passing arg 4 of `Perl_newXS' discards
qualifiers from pointer target type
perlmain.c:127: warning: passing arg 4 of `Perl_newXS' discards
qualifiers from pointer target type

/usr/bin/ld: warning: i386 architecture of input file `.../perl/5.8.8/
lib/5.8.8/i686-linux-thread-multi/CORE/libperl.a(perl.o)' is
incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `.../perl/5.8.8/
lib/5.8.8/i686-linux-thread-multi/CORE/libperl.a(gv.o)' is
incompatible with i386:x86-64 output

..../perl/5.8.8/lib/5.8.8/i686-linux-thread-multi/CORE/libperl.a
(perlio.o)(.text+0x4a6c): In function `PerlIOMmap_map':
: undefined reference to `__divdi3'
collect2: ld returned 1 exit status
make[1]: *** [perl] Error 1


Can anyone please help what could be possibly wrong??

Thanks in advance.

Hrh.
 
M

Michael Vilain

Dear Perl experts:

I am trying to install Algorithm::Combinatorics locally on a UNIX
system without root access. The module or at least portions of it are
written in C. I have the following cc available:

Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --enable-shared --enable-threads=posix --
disable-checking --with-system-zlib --enable-__cxa_atexit --disable-
libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-9)

So "perl Makefile.PL PREFIX=/home/mydir" works. "make" works well too.
But during "make test" I get the following errors:

PERL_DL_NONLAZY=1 .../perl/5.8.8/bin/perl "-MExtUtils::Command::MM" "-
e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_load............................
# Failed test 'use Algorithm::Combinatorics;'
t/00_load............................NOK 1# in t/00_load.t at line
6.
# Tried to use 'Algorithm::Combinatorics'.
# Error: Can't load '.../Algorithm-Combinatorics-0.25/blib/arch/
auto/Algorithm/Combinatorics/Combinatorics.so' for module
Algorithm::Combinatorics: .../Algorithm-Combinatorics 0.25/blib/arch/
auto/Algorithm/Combinatorics/Combinatorics.so: cannot open shared
object file: No such file or directory at .../perl/5.8.8/lib/5.8.8/
i686-linux-thread-multi/DynaLoader.pm line 230.
# at (eval 3) line 2
# Compilation failed in require at (eval 3) line 2.
# BEGIN failed--compilation aborted at t/00_load.t line 6.
# Looks like you failed 1 test of 1.

Then I chose the static linking "perl Makefile.PL PREFIX=/home/mydir
LINKTYPE=static". It worked well and "make" finished normally. Then
again "make test" fails giving the following errors:

perlmain.c: In function `xs_init':
perlmain.c:122: warning: passing arg 4 of `Perl_newXS' discards
qualifiers from pointer target type
perlmain.c:127: warning: passing arg 4 of `Perl_newXS' discards
qualifiers from pointer target type

/usr/bin/ld: warning: i386 architecture of input file `.../perl/5.8.8/
lib/5.8.8/i686-linux-thread-multi/CORE/libperl.a(perl.o)' is
incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `.../perl/5.8.8/
lib/5.8.8/i686-linux-thread-multi/CORE/libperl.a(gv.o)' is
incompatible with i386:x86-64 output

.../perl/5.8.8/lib/5.8.8/i686-linux-thread-multi/CORE/libperl.a
(perlio.o)(.text+0x4a6c): In function `PerlIOMmap_map':
: undefined reference to `__divdi3'
collect2: ld returned 1 exit status
make[1]: *** [perl] Error 1


Can anyone please help what could be possibly wrong??

Thanks in advance.

Hrh.

Without root access, you can't install this module into the existing
perl running on the system. At best, you could put the files it uses
into a private perl library that you'd have to "use" at the top of your
code. You should be able to build the module without problems but
apparently the test suite for this module doesn't work on RH when run
without root. You may want to contact the developer about that.
 
X

xhoster

Dear Perl experts:

I am trying to install Algorithm::Combinatorics locally on a UNIX
system without root access. The module or at least portions of it are
written in C. I have the following cc available:
....

PERL_DL_NONLAZY=1 .../perl/5.8.8/bin/perl "-MExtUtils::Command::MM" "-
e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t

The three dots in the .../perl/5.8.8/bin/perl looks suspicious to me.
Is that directly from the output, or did you elide something?

t/00_load............................
# Failed test 'use Algorithm::Combinatorics;'
t/00_load............................NOK 1# in t/00_load.t at line
6.
# Tried to use 'Algorithm::Combinatorics'.
# Error: Can't load '.../Algorithm-Combinatorics-0.25/blib/arch/
auto/Algorithm/Combinatorics/Combinatorics.so' for module

Again, three dots in the path to the .so file. Do you know where those
are coming from?

Xho

--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
 
H

hamidrezah

Dear Perl experts:
I am trying to install Algorithm::Combinatorics locally on a UNIX
system without root access. The module or at least portions of it are
written in C. I have the following cc available:
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man--
infodir=/usr/share/info --enable-shared --enable-threads=posix --
disable-checking --with-system-zlib --enable-__cxa_atexit --disable-
libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-9)
So "perl Makefile.PL PREFIX=/home/mydir" works. "make" works well too..
But during "make test" I get the following errors:
PERL_DL_NONLAZY=1 .../perl/5.8.8/bin/perl "-MExtUtils::Command::MM" "-
e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_load............................
#   Failed test 'use Algorithm::Combinatorics;'
t/00_load............................NOK 1#   in t/00_load.t at line
6.
#     Tried to use 'Algorithm::Combinatorics'.
#     Error:  Can't load '.../Algorithm-Combinatorics-0.25/blib/arch/
auto/Algorithm/Combinatorics/Combinatorics.so' for module
Algorithm::Combinatorics: .../Algorithm-Combinatorics 0.25/blib/arch/
auto/Algorithm/Combinatorics/Combinatorics.so: cannot open shared
object file: No such file or directory at .../perl/5.8.8/lib/5.8.8/
i686-linux-thread-multi/DynaLoader.pm line 230.
#  at (eval 3) line 2
# Compilation failed in require at (eval 3) line 2.
# BEGIN failed--compilation aborted at t/00_load.t line 6.
# Looks like you failed 1 test of 1.
Then I chose the static linking "perl Makefile.PL PREFIX=/home/mydir
LINKTYPE=static". It worked well and "make" finished normally. Then
again "make test" fails giving the following errors:
perlmain.c: In function `xs_init':
perlmain.c:122: warning: passing arg 4 of `Perl_newXS' discards
qualifiers from pointer target type
perlmain.c:127: warning: passing arg 4 of `Perl_newXS' discards
qualifiers from pointer target type
/usr/bin/ld: warning: i386 architecture of input file `.../perl/5.8.8/
lib/5.8.8/i686-linux-thread-multi/CORE/libperl.a(perl.o)' is
incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `.../perl/5.8.8/
lib/5.8.8/i686-linux-thread-multi/CORE/libperl.a(gv.o)' is
incompatible with i386:x86-64 output
.../perl/5.8.8/lib/5.8.8/i686-linux-thread-multi/CORE/libperl.a
(perlio.o)(.text+0x4a6c): In function `PerlIOMmap_map':
: undefined reference to `__divdi3'
collect2: ld returned 1 exit status
make[1]: *** [perl] Error 1
Can anyone please help what could be possibly wrong??
Thanks in advance.

Without root access, you can't install this module into the existing
perl running on the system.  At best, you could put the files it uses
into a private perl library that you'd have to "use" at the top of your
code.  You should be able to build the module without problems but
apparently the test suite for this module doesn't work on RH when run
without root.  You may want to contact the developer about that.

--
DeeDee, don't press that button!  DeeDee!  NO!  Dee...
[I filter all Goggle Groups posts, so any reply may be automatically by ignored]- Hide quoted text -

- Show quoted text -


I have tried to "use" the module on top of my code. Just as the "test"
tries to use it. But it cannot load the dynamically loadable module
just made.

I also tried to install it in my local directory as you can read from
my original post. It should be possible to install a module without
root access using PREFIX option passed to the Makefile.PL

Anyways, thanks for your hint.
 
H

hamidrezah

The three dots in the .../perl/5.8.8/bin/perl looks suspicious to me.
Is that directly from the output, or did you elide something?


Again, three dots in the path to the .so file.  Do you know where those
are coming from?

Xho

--
--------------------http://NewsReader.Com/--------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.

The dots are added by me, the path were too long.
 
X

xhoster

The dots are added by me, the path were too long.

Can you manually find a file named Combinatorics.so? If so, where is it
compared to where Perl wants it to be?

Xho

--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top