OpenSolaris

Collectives Discussions Documentation Download Source Browser

Home » OpenSolaris Forums » OpenSolaris » help

Thread: Can't install perl modules

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 7 - Last Post: Jun 21, 2009 12:53 PM by: saps
vesta

Posts: 5
From: DE

Registered: 6/18/09
Can't install perl modules
Posted: Jun 18, 2009 5:26 PM
To: OpenSolaris » help
  Click to reply to this thread Reply

Hello,

i'm trying out to get opensolaris 2009.05 work for me.

Now i have a problem while installing some modules for perl.
For example, the command:
pfexec perl -MCPAN -e "install DBI"
exited with this error:
---------
/usr/bin/perl -p -e "s/~DRIVER~/Perl/g" ./Driver.xst > Perl.xsi
/usr/bin/perl /usr/perl5/5.8.4/lib/ExtUtils/xsubpp -typemap /usr/perl5/5.8.4/lib/ExtUtils/typemap -typemap typemap Perl.xs > Perl.xsc && mv Perl.xsc Perl.c
cc -c -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO -xO3 -xspace -xildoff -DVERSION=\"1.609\" -DXS_VERSION=\"1.609\" -KPIC "-I/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE" -DDBI_NO_THREADS Perl.c
cc: unrecognized option `-KPIC'
cc: language ildoff not recognized
cc: Perl.c: linker input file unused because linking not done
/usr/bin/perl /usr/perl5/5.8.4/lib/ExtUtils/xsubpp -typemap /usr/perl5/5.8.4/lib/ExtUtils/typemap -typemap typemap DBI.xs > DBI.xsc && mv DBI.xsc DBI.c
cc -c -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO -xO3 -xspace -xildoff -DVERSION=\"1.609\" -DXS_VERSION=\"1.609\" -KPIC "-I/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE" -DDBI_NO_THREADS DBI.c
cc: unrecognized option `-KPIC'
cc: language ildoff not recognized
cc: DBI.c: linker input file unused because linking not done
Running Mkbootstrap for DBI ()
chmod 644 DBI.bs
rm -f blib/arch/auto/DBI/DBI.so
LD_RUN_PATH="" cc -G DBI.o -o blib/arch/auto/DBI/DBI.so
cc: DBI.o: No such file or directory
cc: no input files
*** Error code 1
make: Fatal error: Command failed for target `blib/arch/auto/DBI/DBI.so'
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
----------
How can i install them? Where is the problem?

Thank you!

paul_a_j

Posts: 146
From: GB

Registered: 5/6/08
Re: Can't install perl modules
Posted: Jun 19, 2009 1:06 AM   in response to: vesta
To: OpenSolaris » help
  Click to reply to this thread Reply

Hi
I've had this one and reverted to manual installs but this may give you clues to what's happening.
The problem seems to be confusing options that are in the Sun C compiler with gcc
What I did was after
perl Makefile.pl
you get a Makefile
This has options such as
CCDLFLAGS = -KPIC
and
OPTIMIZE - -x03 -xspace -xildoff
After removing those lines `make` normally runs.
It's a pain but so far been able to build all the pm's I've needed.

Paul

vesta

Posts: 5
From: DE

Registered: 6/18/09
Re: Can't install perl modules
Posted: Jun 19, 2009 2:21 AM   in response to: paul_a_j
To: OpenSolaris » help
  Click to reply to this thread Reply

Its al lot of pain, with all dependencies there are about 20modules to compile...
Is this a BUG in the Sun C compiler - should these be reported? Or isn't it able to ignore these lines dy default?

Thank you!

paul_a_j

Posts: 146
From: GB

Registered: 5/6/08
Re: Can't install perl modules
Posted: Jun 19, 2009 2:39 AM   in response to: vesta
To: OpenSolaris » help
  Click to reply to this thread Reply

I would hesitate to call it a bug!

Now assuming 'which cc'
returns the one in
/usr/gnu/bin which inturn links to sfw/bin/gcc on my machine
I found making it point to /usr/bin/cc which inturn points to /opt/SunStudioExpress/bin/cc
Then it doesn't complain about the options.
Basically making sure cc points to a Sun compiler not a gcc one seems to cure it!!

Please be aware I'm not a compiler expert and not sure what the implications of using a Sun compiler to make some pm's and gcc for others would be but it's a thought!

Paul

vesta

Posts: 5
From: DE

Registered: 6/18/09
Re: Can't install perl modules
Posted: Jun 20, 2009 10:57 AM   in response to: paul_a_j
To: OpenSolaris » help
  Click to reply to this thread Reply

Sorry, I'm new in opensolaris.
I haven't a /opt/SunStudioExpress/ Directory on my Machine.
Because of some other Problems i've reinstalled opensolaris.
Now i have the following Problem:
---
which cc:
no cc in /usr/sbin /usr/bin
---
which gcc:
/usr/bin/gcc
---
but i've these one:
/usr/gnu/bin/cc -> ../../sfw/bin/gcc
---
I've installed SUNWgcc on my System.
Whats the next steps to get a working cc?

Thank you!

saps

Posts: 11
From:

Registered: 4/13/09
Re: [osol-help] Can't install perl modules
Posted: Jun 20, 2009 11:02 AM   in response to: vesta

  Click to reply to this thread Reply


On Sat, 2009-06-20 at 10:57 -0700, Tobias wrote:
> Sorry, I'm new in opensolaris.
> I haven't a /opt/SunStudioExpress/ Directory on my Machine.
> Because of some other Problems i've reinstalled opensolaris.
> Now i have the following Problem:
> ---
> which cc:
> no cc in /usr/sbin /usr/bin
> ---
> which gcc:
> /usr/bin/gcc
> ---
> but i've these one:
> /usr/gnu/bin/cc -> ../../sfw/bin/gcc
> ---
> I've installed SUNWgcc on my System.
> Whats the next steps to get a working cc?
>
> Thank you!

if you want to Sun cc - you need to install the package 'ss-dev'. Search
for ss-dev in package-manager or you could install in from the command
line:
$ pfexec pkg install ss-dev


-Partha

_______________________________________________
opensolaris-help mailing list
opensolaris-help at opensolaris dot org


vesta

Posts: 5
From: DE

Registered: 6/18/09
Re: [osol-help] Can't install perl modules
Posted: Jun 21, 2009 4:54 AM   in response to: saps
To: OpenSolaris » help
  Click to reply to this thread Reply

Thank you for the hint of the package name.

But it does not work...

Now i've deleted the these link:
/usr/gnu/bin/cc -> ../../sfw/bin/gcc

and set it to
/usr/gnu/bin/cc -> /opt/SunStudioExpress/bin/cc

And then, its able to compile the modules.

Thank you all for your help!

saps

Posts: 11
From:

Registered: 4/13/09
Re: [osol-help] Can't install perl modules
Posted: Jun 21, 2009 12:53 PM   in response to: vesta

  Click to reply to this thread Reply


On Sun, 2009-06-21 at 04:54 -0700, Tobias wrote:
> Thank you for the hint of the package name.
>
> But it does not work...
>
> Now i've deleted the these link:
> /usr/gnu/bin/cc -> ../../sfw/bin/gcc
>
> and set it to
> /usr/gnu/bin/cc -> /opt/SunStudioExpress/bin/cc
>
> And then, its able to compile the modules.
>
> Thank you all for your help!
Once you install the package, edit your bashrc script by doing the
following:

1. "gedit ~/.bashrc" -> will open the .bashrc file present in your home
directory

2. Add the line "export PATH=$PATH:/opt/SunStudioExpress/bin/cc" and
save and quit the editor.

3. The next time you launch the terminal - you will have the path set.

HTH,
Partha



_______________________________________________
opensolaris-help mailing list
opensolaris-help at opensolaris dot org





Terms of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.
© 2010, Oracle Corporation and/or its affiliates

Oracle Logo