ramesh_ps1 has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
I am new to Perl installing IO:Socket on solaris 10 box.

I downloaded IO-1.2301.tar.gz extracted and tried to install

Since I dont have cc, I am using gcc instead and is in the PATH.

first command works fine.
=========================
perl Makefile.PL CC=gcc CCCDLFLAGS=-fPIC OPTIMIZE=" " LD=gcc

When I run Make i am finding following error message
====================================================

cp IO/Handle.pm blib/lib/IO/Handle.pm
cp IO/Dir.pm blib/lib/IO/Dir.pm
cp IO/Socket/INET.pm blib/lib/IO/Socket/INET.pm
cp IO/Poll.pm blib/lib/IO/Poll.pm
cp IO/Pipe.pm blib/lib/IO/Pipe.pm
cp IO/Seekable.pm blib/lib/IO/Seekable.pm
cp IO/Socket.pm blib/lib/IO/Socket.pm
cp IO/Select.pm blib/lib/IO/Select.pm
cp IO/File.pm blib/lib/IO/File.pm
cp IO.pm blib/lib/IO.pm
cp IO/Socket/UNIX.pm blib/lib/IO/Socket/UNIX.pm
/bin/perl /usr/perl5/5.8.4/lib/ExtUtils/xsubpp -typemap /usr/perl5/5.8.4/lib/ExtUtils/typemap IO.xs > IO.xsc && mv IO.xsc IO.c
gcc -c -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO -DVERSION=\"1.23\" -DXS_VERSION=\"1.23\" -fPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE" IO.c
gcc: language arch=v8 not recognized
gcc: IO.c: linker input file unused because linking not done
gcc -c -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO -DVERSION=\"1.23\" -DXS_VERSION=\"1.23\" -fPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE" poll.c
gcc: language arch=v8 not recognized
gcc: poll.c: linker input file unused because linking not done
Running Mkbootstrap for IO ()
chmod 644 IO.bs
rm -f blib/arch/auto/IO/IO.so
LD_RUN_PATH="" gcc -G IO.o poll.o -o blib/arch/auto/IO/IO.so
gcc: IO.o: No such file or directory
gcc: poll.o: No such file or directory
gcc: no input files
*** Error code 1
make: Fatal error: Command failed for target `blib/arch/auto/IO/IO.so'
================================

Please let me know if I am missing something here.
  • Comment on Problem while installing IO:Socket on solaris 10

Replies are listed 'Best First'.
Re: Problem while installing IO:Socket on solaris 10
by bart (Canon) on Mar 27, 2007 at 10:10 UTC
    Unless the original perl was compiled with the same compiler, your chances of success are tiny. The important thing is that the compiler must be able to produce binary compatible executables.

    But so far, this doesn't appear to be your problem. Your fatal error message is this:

    gcc: language arch=v8 not recognized

    Try to fix that first. I can't help you with this, sorry, as I'm not enough of an expert. You need to tweak some command line options for the compiler, in particular the setting that produces:

    -xarch=v8
    in your command line.

    But, like I said, even if you succeed in fixing this, you'll probably still be a long way from home.

      Do you think installing perl from source might be useful?
      If yes please let me know where to fin dthe source for perl
      Thanks.
        The source is here. On Solaris I tend to build from source using gcc and install into a different path (/opt/OurApplicationName/perl) so as to leave the existing Sun build of Perl (which seems to get used by the volume manager of choice, as well as a couple of other things) intact, and to resolve the issue you are having. It should be noted that I do this to avoid issues (including political ones) with the Client we work for. Remember to read the INSTALL and README.solaris files carefully.

        Update: I forgot to mention, IO::Socket built without any problems using the method described above.

        Hope this helps.

        Martin
A reply falls below the community's threshold of quality. You may see it by logging in.