Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Matts (1087)

Matts
  (email not shown publicly)

I work for MessageLabs [messagelabs.com] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Wednesday June 19, 2002
07:12 AM

SourceForge

[ #5770 ]

SourceForge's compile farm is great if you don't have lots of different machines to test things on. The only problem is that their Solaris perl installation seems severely borked, in that it won't compile perl XS modules right.

Anyway, if you ever have to use cf.sourceforge.net, here's how you get XS modules to compile cleanly:

perl Makefile.PL CC=gcc LD=gcc LDDLFLAGS=-shared OPTIMIZE="-O2" CCCDLFLAGS=-fPIC

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • CC=gcc ? How strange. Do you mean they have reinstalled a perl over the Solaris-provided one ? What does perl -V:cc say ?
    • I don't know *what* they've done. It's all horribly broken. I wouldn't even want to speculate. -V:cc returns "cc". But if you try and compile something with cc it breaks horribly.
      • Re:EBROKENPERL (Score:5, Insightful)

        by davorg (18) <dave@dave.org.uk> on 2002.06.19 10:08 (#9732) Homepage Journal

        Seen this many times on a number of different vendors' boxes. The explaination goes like this:

        • Vendor pre-installs Perl on system
        • Vendor also installs cut-down, non-ANSI version of cc on system
        • Pre-installed version of Perl is built with vendor's much better (but not free) cc which isn't installed on system
        • Sysadmin refuses to buy vendor's full version of cc and installs gcc instead
        • Everything in Config.pm points to vendor's version of cc and doesn't work with gcc
        • Badness ensues

        Another good reason for building your own version of Perl and not relying on a pre-built version.

    • Last I checked, Solaris (version 7, I think, and possibly 8), needed me to do a lot of CC=gcc LD=gcc stuff to compile XS modules, but that was because I hadn't installed Sun's compiler. On some systems we made the changes directly to the Config.pm module and it worked.

      However, I've left off [perl.org] trying to interfere with the system Perl on any machine. Even on my LFS [linuxfromscratch.org] machines there's a Perl compiled when installing the system in /usr/bin, but the Perl I use for programming and installing modules with is in /u

      --
      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
      • You remember me this (unanswered) post [develooper.com] by Alan Burlison (Sun's Perl guy).
        • I hacked Config.pm in MacPerl to return different values based on the binary. Config.pm can have a hash called %preconfig which will allow overrides. MacPerl's looks sorta like:

          {
                  local $^W;
                  my $inst = ($ENV{MACPERL} || "") . "site_perl:";
                  my $arch = $MacPerl::Architecture || "";
                  my $cc   = $MacPerl::Compiler || "";
           
                  %preconfig = (