problems while compiling perl on solaris 10

A

ashish

Hi,

When I try to compile perl on Solaris 10, I get the following error
message :


Use which C compiler? [cc] /usr/sfw/bin/gcc

/usr/ccs/bin/as: error: unknown option '-'
/usr/ccs/bin/as: error: unknown option 't'
/usr/ccs/bin/as: error: unknown option 'aditional-format'
usage: /usr/ccs/bin/as [-V] [-Q{y,n}] [-q] [-s]
[-S] [-K {pic,PIC}] [-o objfile] [-L] [-T]
[-P [[-Yc,path] [-Ipath] [-Dname] [-Dname=def] [-Uname]]...]
[-m [-Ym,path]] [-n] [-ul] [-xF]
[-xarch={v7,v8,v8a,v8plus,v8plusa,v8plusb,v9,v9a,v9b}]
[-xcode={pic13,pic32}] file.s...
Uh-oh, the C compiler '/usr/sfw/bin/gcc' doesn't seem to be working.
/usr/ccs/bin/as: error: unknown option '-'
/usr/ccs/bin/as: error: unknown option 't'
/usr/ccs/bin/as: error: unknown option 'aditional-format'
usage: /usr/ccs/bin/as [-V] [-Q{y,n}] [-q] [-s]
[-S] [-K {pic,PIC}] [-o objfile] [-L] [-T]
[-P [[-Yc,path] [-Ipath] [-Dname] [-Dname=def] [-Uname]]...]
[-m [-Ym,path]] [-n] [-ul] [-xF]
[-xarch={v7,v8,v8a,v8plus,v8plusa,v8plusb,v9,v9a,v9b}]
[-xcode={pic13,pic32}] file.s...
Uh-oh, the C compiler '/usr/sfw/bin/gcc' doesn't seem to be working.
You need to find a working C compiler.
Either (purchase and) install the C compiler supplied by your OS
vendor,
or for a free C compiler try http://gcc.gnu.org/
I cannot continue any further, aborting.



The PATH is set as follows :


..:/bin:/usr/bin:/sbin:/usr/sbin:/usr/sfw/bin:/opt/sfw/bin:/usr/ccs/bin:/demrx/product/sybase/12.5/OCS-12_5/bin:/demrx/product/sybase/12.5/RPL-12_5/bin:/demrx/product/sybase/12.5/JS-12_5/bin:/demrx/product/sybase/12.5/ASE-12_5/bin:/demrx/product/sybase/12.5/ASE-12_5/install:/usr/bin:/etc:/bin:/usr/sbin:/sbin:/usr/ucb



The LD_LIBRARY_PATH is set as follows:

/lib:/usr/sfw/lib:/usr/lib:/demrx/product/sybase/12.5/OCS-12_5/lib:/demrx/product/sybase/12.5/OCS-12_5/lib3p64:/demrx/product/sybase/12.5/OCS-12_5/lib3p:/demrx/product/sybase/12.5/ASE-12_5/lib:



Thanks a lot for your kind help.


Ashish
 
A

anno4000

ashish said:
Hi,

When I try to compile perl on Solaris 10, I get the following error
message :


Use which C compiler? [cc] /usr/sfw/bin/gcc
[...]

Uh-oh, the C compiler '/usr/sfw/bin/gcc' doesn't seem to be working.
You need to find a working C compiler.
Either (purchase and) install the C compiler supplied by your OS
vendor,
or for a free C compiler try http://gcc.gnu.org/
I cannot continue any further, aborting.

The diagnosis is pretty clear, isn't it?

Anno
 
M

Mark Clements

ashish said:
Hi,

When I try to compile perl on Solaris 10, I get the following error
message :

You probably have good reason for wanting to compile perl from scratch,
but for the record recent (7+?) versions of Solaris come with perl on
the release CDs.

If you need a more recent version, ready-to-install packages can be
found at http://www.sunfreeware.com . You can also download compilers here.



Mark
 
A

ashish

Thanks for your reply.
I wasn't too sure the diagnosis was very clear ...
I have the following gcc pre-installed :

-r-xr-xr-x 3 root bin 122260 Jan 23 2005 /usr/sfw/bin/gcc


Do you know of any way I can find out whether it is corrupted or
incomplete in any way.

Thanks,
Ashish




ashish said:
Hi,

When I try to compile perl on Solaris 10, I get the following error
message :


Use which C compiler? [cc] /usr/sfw/bin/gcc
[...]

Uh-oh, the C compiler '/usr/sfw/bin/gcc' doesn't seem to be working.
You need to find a working C compiler.
Either (purchase and) install the C compiler supplied by your OS
vendor,
or for a free C compiler try http://gcc.gnu.org/
I cannot continue any further, aborting.

The diagnosis is pretty clear, isn't it?

Anno
 
A

ashish

Hi Mark,

Thanks for the tip.

I want to be able to compile perl as later I will need to be able to
compile additional modules. In particular, I want to be able to compile
the sybperl module which is for connecting to a sybase database.

I also wanted to be able to have a separate perl for one particular
application in the application's sub directory structure. I wanted to
be free from the unix admins as in our case, the machine is managed by
an offsite vendor, and they are not very responsive.

Do you think I can install a solaris package in a directory of my
choice?

Thanks,
Ashish
 
A

anno4000

Top posting corrected. You are not new here, you should know how it
works.
ashish said:
Hi,

When I try to compile perl on Solaris 10, I get the following error
message :


Use which C compiler? [cc] /usr/sfw/bin/gcc
[...]

Uh-oh, the C compiler '/usr/sfw/bin/gcc' doesn't seem to be working.
You need to find a working C compiler.
Either (purchase and) install the C compiler supplied by your OS
vendor,
or for a free C compiler try http://gcc.gnu.org/
I cannot continue any further, aborting.

The diagnosis is pretty clear, isn't it?
Thanks for your reply.
I wasn't too sure the diagnosis was very clear ...
I have the following gcc pre-installed :

-r-xr-xr-x 3 root bin 122260 Jan 23 2005 /usr/sfw/bin/gcc


Do you know of any way I can find out whether it is corrupted or
incomplete in any way.

For a functional test create a file xyz.c with a trivial C program
in it. Type make xyz and see if it compiles. Check that it uses
the C compiler you want it to use.

Anno
 
J

Josef Moellers

ashish said:
Thanks for your reply.
I wasn't too sure the diagnosis was very clear ...
I have the following gcc pre-installed :

-r-xr-xr-x 3 root bin 122260 Jan 23 2005 /usr/sfw/bin/gcc


Do you know of any way I can find out whether it is corrupted or
incomplete in any way.

It's not really a Perl-issue, but ... How did it get installed? If it
came with an rpm, you could ask rpm to check:

rpm -qf /usr/sfw/bin/gcc
will tell you chich packet it came with and then
rpm -V <packagename>
will check whether any files were changed, e.g.
..5....T /usr/sfw/bin/gcc
would mean the md5sum and the mtime of the file differ.

Other package managers most likely provide an analogous feature.
 
M

Mark Clements

ashish said:
Hi Mark,

Thanks for the tip.

I want to be able to compile perl as later I will need to be able to
compile additional modules. In particular, I want to be able to compile
the sybperl module which is for connecting to a sybase database.
OK - you probably don't need to go down this route, though. I had
assumed that sybperl, oraperl etc were obsolete, although I stand open
to correction.

New code should probably use DBI and its associated driver modules:
DBD::Sybase in your case. You don't need to recompile the whole of perl
in order to use this: you just compile the module (downloadable from
search.cpan.org) against your sybase client libraries.

perldoc -q database
I also wanted to be able to have a separate perl for one particular
application in the application's sub directory structure. I wanted to
be free from the unix admins as in our case, the machine is managed by
an offsite vendor, and they are not very responsive.
The packages supplied by sunfreeware typically install in /usr/local,
although some install in /opt (sometimes you have the choice of two
packages).

However: CPAN modules can be installed anywhere in the filesystem. All
you have to tell perl is where to find them, typically using

use lib qw(/path/to/my/libraries);

or its cousins.

perldoc -q lib


Do you think I can install a solaris package in a directory of my
choice?
docs for pkgadd

http://docs.sun.com/app/docs/doc/817-3937/6mjgeag0d?a=view

There is a -R, but this specifies root path rather than an installation
directory. If you used this it would mess up paths compiled into the
binary. Short answer: no, you can't.


Mark
 
P

Peter J. Holzer

OK - you probably don't need to go down this route, though. I had
assumed that sybperl, oraperl etc were obsolete, although I stand open
to correction.

New code should probably use DBI and its associated driver modules:
DBD::Sybase in your case. You don't need to recompile the whole of perl
in order to use this: you just compile the module (downloadable from
search.cpan.org) against your sybase client libraries.

Yes, but you need to compile the module with the same compiler as the
perl interpreter was compiled with. If you don't have that C compiler,
you have to recompile perl yourself. Some modules also need perl to be
compiled with weird settings to work (for example, some versions of
DBD::Oracle on HP-UX needed a perl interpreter without ithreads but
explicitely linked against libpthread).

hp
 

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

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top