Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

File EXTERN.h missing

by CountZero (Bishop)
on Aug 25, 2005 at 12:33 UTC ( [id://486526]=perlquestion: print w/replies, xml ) Need Help??

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

Dear Fellow Monks!

I recently "recycled" an old computer and put Linux Mandrake 10.2 on it. It works well and even had a recent Perl on it.

When installing some modules from CPAN, they failed to be installed since the file EXTERN.h could not be found (it is a file needed to compile XS-modules it seems).

I searched the whole installation but nowhere is this file to be found.

Does anybody of you know what this file is and where I can get it?

Update: Thanks for all the helpful answers (++ to you all). I found EXTERN.h on my windows system and it looks as it is written in a system-independent way, so I will try to copy it over to my Linux system. If that doesn't work I will have to install a devel version of Perl.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Replies are listed 'Best First'.
Re: File EXTERN.h missing
by jdhedden (Deacon) on Aug 25, 2005 at 12:50 UTC
    On my machine it's found at /usr/local/lib/perl5/5.8/cygwin/CORE/EXTERN.h

    It contains declarations needed to compile the C code that is generated from the XS files.

    The CORE directory contains other header files and libperl.a. I would imagine that since you're missing EXTERN.h, your Perl installation has been corrupted, and you should reinstall Perl.


    Remember: There's always one more bug.
Re: File EXTERN.h missing
by Joost (Canon) on Aug 25, 2005 at 13:40 UTC
    EXTERN.h is part of the perl C API which is needed for embedding the interpreter and building XS modules. The official perl distribution contains all these files, but many linux distributions don't bundle it as part of the base perl package (some even leave out a lot of core modules). There should be one or more additional packages for your distribution that supply the C API files. They're usually called "perl-*dev*" or something like it. (From googling, it looks like the mandrage package is "perl-devel-5.*.rpm")

    update after seeing your update: installing the header files from another perl installation will only work reliably if both installs are from the exact same perl version. IFAIK there should be no real problems in copying over the header files from a windows install provided the versions are the same, but take note that the EXTERN.h file isn't the only file you'd need in general.

    Also note that usually, the perl-dev packages don't contain a seperate perl runtime (interpreter etc.); they're just the files and programs you need to develop/compile programs/libraries against the perl binary - they're complimentary to the "base" install.

    If you're writing your own C extensions (not just compiling third-party modules), I'd recommend compiling your own perl interpreter from source with all the debug info intact (I install my development perl in /usr/local, so I still have the systems standard perl install in /usr)

Re: File EXTERN.h missing
by sgifford (Prior) on Aug 25, 2005 at 16:31 UTC
    I've never used Mandrake, but on some systems you have to install a package like perl-devel or perl-dev to get the libraries you'll need to compile things using Perl. You might want to look through the list of packages available for Mandrake to see if there's anything like that.
Re: File EXTERN.h missing
by socketdave (Curate) on Aug 25, 2005 at 13:28 UTC
    On my Gentoo system it's in:

    /usr/lib/perl5/5.8.4/i686-linux/CORE/EXTERN.h

    You might try downloading a tarball of the Perl source that matches the version on your machine, and copying the EXTERN.h from it.
Re: File EXTERN.h missing
by hazemkmammu (Initiate) on Oct 18, 2022 at 07:21 UTC
    installing the CPAN module perl-dev helped me fix this error
      no such module
Re: File EXTERN.h missing
by ww (Archbishop) on Aug 25, 2005 at 12:37 UTC
    header file for C; where found may be module-specific (??)

    update: only w'doze here but C:\Perl\lib\CORE contains extern.h. See wiser answers elsewhere in this thread.

Re: File EXTERN.h missing
by NateTut (Deacon) on Aug 25, 2005 at 13:26 UTC
    Try a case insensitive search, you may have the file but the case of one or more characters could be wrong.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://486526]
Approved by ww
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-19 02:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found