in reply to Re: Net::Pcap install problem
in thread Net::Pcap install problem

This is the C compiler on SUN Solaris 2.8. Path to compiler is /opt/sc6.2a/SUNWspro/bin/cc.

If I run at command line, I get

cc -E -I/usr/add-on/exptools/lib/pcap/include -DHAVE_BLANK -DHAVE_PCAP_LIB_VERSION find-funcs.h -o cpp-out.h

cc: illegal suffix of output filename

Perl version is 5.005_03, but I tried running it again with perl 5.6.1, and I get the same error message.

Replies are listed 'Best First'.
Re^3: Net::Pcap install problem
by jettero (Monsignor) on Jul 06, 2007 at 20:26 UTC
    It isn't perl that's at fault. Personally, I'd hit rt.cpan.org and report that it doesn't compile on solaris. But before I did that, I'd check to see if anyone else reported it. It seems to fail numerous places, but usually older versions.

    http://testers.cpan.org/show/Net-Pcap.html

    It's probably expecting gcc's argument forgiveness, which isn't reasonable with the solaris compiler. It's slightly more picky. My guess is that you could get it to work by farting around with the Build.PL or Makefile.PL, but it might be some work. If you posted that in your ticket... well, then you'd be cooking with fire.

    -Paul

      Thanks all for the tips.

      I'm not sure why Net::Pcap installation would try to use the Solaris cc and not gcc. We have gcc installed on our system, and I have succesfully installed other Perl modules in the past (which used gcc).

      Maybe there is something about Net::Pcap's use of $Config in the Makefile.PL that does not work on Solaris. I noticed that this module has not been tested for awhile on Solaris.

      Since all I want to do is have my program write a pcap file, I suppose another option is to just write a C program that does this, and add a system() call to the C program from my Perl script. But it would be much nicer if I could do the whole thing in Perl...

Re^3: Net::Pcap install problem
by almut (Canon) on Jul 06, 2007 at 20:44 UTC

    Solaris' system compiler apparently doesn't like -o in combination with -E — at least

    $ cc -flags | grep -- -E -E Compile source through preprocessor only, output to st +dout

    Maybe you could try redirecting the output

    cc -E ... find-funcs.h > cpp-out.h

    Just an idea...

Re^3: Net::Pcap install problem
by sgt (Deacon) on Jul 06, 2007 at 20:33 UTC

    seems your compiler is peaky about the extension of the filename given in the -o <file> option. Does it work if you replace cpp-out.h with cpp.out for example?

    cheers --stephan