problems while compiling perl on solaris 10

Discussion in 'Perl Misc' started by ashish, Nov 14, 2006.

  1. ashish

    ashish Guest

    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
    ashish, Nov 14, 2006
    #1
    1. Advertising

  2. ashish

    -berlin.de Guest

    ashish <> wrote in comp.lang.perl.misc:
    > 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
    -berlin.de, Nov 14, 2006
    #2
    1. Advertising

  3. ashish wrote:
    > 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
    Mark Clements, Nov 14, 2006
    #3
  4. ashish

    ashish Guest

    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




    -berlin.de wrote:
    > ashish <> wrote in comp.lang.perl.misc:
    > > 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
    ashish, Nov 16, 2006
    #4
  5. ashish

    ashish Guest

    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


    Mark Clements wrote:
    > ashish wrote:
    > > 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
    ashish, Nov 16, 2006
    #5
  6. ashish

    -berlin.de Guest

    ashish <> wrote in comp.lang.perl.misc:

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

    > -berlin.de wrote:
    > > ashish <> wrote in comp.lang.perl.misc:
    > > > 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
    -berlin.de, Nov 16, 2006
    #6
  7. ashish wrote:
    > 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.

    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett
    Josef Moellers, Nov 16, 2006
    #7
  8. ashish wrote:
    > 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
    Mark Clements, Nov 16, 2006
    #8
  9. On 2006-11-16 10:24, Mark Clements <> wrote:
    > ashish wrote:
    >> 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.


    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


    --
    _ | Peter J. Holzer | > Wieso sollte man etwas erfinden was nicht
    |_|_) | Sysadmin WSR | > ist?
    | | | | Was sonst wäre der Sinn des Erfindens?
    __/ | http://www.hjp.at/ | -- P. Einstein u. V. Gringmuth in desd
    Peter J. Holzer, Nov 26, 2006
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. krigare
    Replies:
    0
    Views:
    831
    krigare
    Dec 27, 2003
  2. Michael Schmitt
    Replies:
    3
    Views:
    400
    Martin v. =?iso-8859-15?q?L=F6wis?=
    Sep 10, 2003
  3. Replies:
    2
    Views:
    213
  4. Kirt Loki Dankmyer

    compiling perl 5.8.7 on Solaris 8

    Kirt Loki Dankmyer, Nov 17, 2005, in forum: Perl Misc
    Replies:
    3
    Views:
    558
    Thomas Hildebrandt - Sun Germany - ES - SSE
    Nov 25, 2005
  5. Aftermath Fan
    Replies:
    1
    Views:
    158
    Tony Curtis
    Jul 27, 2007
Loading...

Share This Page