C Compiler question

Discussion in 'Perl Misc' started by Dave Saville, Mar 16, 2011.

  1. Dave Saville

    Dave Saville Guest

    When one installs perl does it "remember" anything about the C
    compiler, .h files and libs at the time?

    Because on my ECS OS/2 system running perl 5.8.2 I can install most
    modules from CPAN without a problem, *unless* the install needs to run
    the C compiler and then they usually fall over with some obscure
    error. Most often it is a linkage error rather than the compiler
    whingeing. I *have* updated the C compiler several times since
    installing perl hence the question.

    TIA
    --
    Regards
    Dave Saville
    Dave Saville, Mar 16, 2011
    #1
    1. Advertising

  2. Dave Saville

    Dave Saville Guest

    On Wed, 16 Mar 2011 11:51:13 UTC, Tad McClellan <>
    wrote:

    > Dave Saville <> wrote:
    >
    > > When one installs perl does it "remember" anything about the C
    > > compiler, .h files and libs at the time?

    >
    >
    > Yes.
    >
    > perl -V
    >
    > ...
    > Compiler:
    > ...
    > Linker and Libraries:
    > ...
    > Dynamic Linking:
    > ...
    >
    >


    OK Thanks - So how do I update them if needed after a compiler update?

    --
    Regards
    Dave Saville
    Dave Saville, Mar 16, 2011
    #2
    1. Advertising

  3. Dave Saville

    Dave Saville Guest

    On Wed, 16 Mar 2011 14:47:31 UTC, Tad McClellan <>
    wrote:

    > Dave Saville <> wrote:
    > > On Wed, 16 Mar 2011 11:51:13 UTC, Tad McClellan <>
    > > wrote:
    > >
    > >> Dave Saville <> wrote:
    > >>
    > >> > When one installs perl does it "remember" anything about the C
    > >> > compiler, .h files and libs at the time?
    > >>
    > >>
    > >> Yes.
    > >>
    > >> perl -V
    > >>
    > >> ...
    > >> Compiler:
    > >> ...
    > >> Linker and Libraries:
    > >> ...
    > >> Dynamic Linking:
    > >> ...
    > >>
    > >>

    > >
    > > OK Thanks - So how do I update them if needed after a compiler update?

    >
    >
    > recompile the perl binary.


    I was hoping you were not going to say that as it is a binary distro.
    Problem is, I have the same compiler etc. but all the libs. compiler
    switches, paths etc. are for the machine that built the binary not
    mine. I was hoping I could edit something or run some script to fix
    it. :-(
    --
    Regards
    Dave Saville
    Dave Saville, Mar 16, 2011
    #3
  4. Dave Saville

    Jim Gibson Guest

    In article <fV45K0OBJxbE-pn2-crSdCrdX38RE@localhost>, Dave Saville
    <> wrote:

    > On Wed, 16 Mar 2011 14:47:31 UTC, Tad McClellan <>
    > wrote:
    >
    > > Dave Saville <> wrote:
    > > > On Wed, 16 Mar 2011 11:51:13 UTC, Tad McClellan <>
    > > > wrote:
    > > >
    > > >> Dave Saville <> wrote:
    > > >>
    > > >> > When one installs perl does it "remember" anything about the C
    > > >> > compiler, .h files and libs at the time?
    > > >>
    > > >>
    > > >> Yes.



    > > > OK Thanks - So how do I update them if needed after a compiler update?

    > >
    > >
    > > recompile the perl binary.

    >
    > I was hoping you were not going to say that as it is a binary distro.
    > Problem is, I have the same compiler etc. but all the libs. compiler
    > switches, paths etc. are for the machine that built the binary not
    > mine. I was hoping I could edit something or run some script to fix
    > it. :-(


    You have encountered one disadvantage of using binary distributions.
    The fix for installing XS modules is to:

    1. Get the same compiler used to build the binary.
    2. Build your own Perl.

    #1 may not be feasible, but #2 usually is. Download the Perl source
    from here:

    <http://www.cpan.org/src/README.html>

    and follow the directions in the README and one of the README.x files.
    You should put the new Perl in a location unique from your existing
    Perl, so that you do not overwrite your current working Perl
    installation. Change your path and the first line of script files so
    that you can use your new Perl version.

    I've done it myself, so it can't be that hard!

    --
    Jim Gibson
    Jim Gibson, Mar 16, 2011
    #4
  5. Dave Saville

    Dave Saville Guest

    On Wed, 16 Mar 2011 14:47:31 UTC, Tad McClellan <>
    wrote:

    <snip>

    > recompile the perl binary.


    I wish. After a lot of faffing about I downloaded 5.12.3 and started
    from
    scratch.

    Perl 5.12.3 won't build on EMX anymore. Needs some functionality that
    is not there.

    Tried using gcc 3.3.5 but got errors as the hints file is full of emx
    stuff. I don't know enough to hack the hints file :-(

    ping Ilya

    --
    Regards
    Dave Saville
    Dave Saville, Mar 16, 2011
    #5
  6. On 2011-03-16 22:03, Dave Saville <> wrote:
    > On Wed, 16 Mar 2011 14:47:31 UTC, Tad McClellan <>
    > wrote:
    >> recompile the perl binary.

    >
    > I wish. After a lot of faffing about I downloaded 5.12.3 and started
    > from scratch.
    >
    > Perl 5.12.3 won't build on EMX anymore. Needs some functionality that
    > is not there.


    | EMX (Eberhard Mattes eXtender), a.k.a. emx+gcc, is a programming
    | environment for DOS and OS/2.

    ???

    Hmm, yeah. Platforms are only supported as long as somebody is willing
    to support them. For a 32-bit extender for DOS and OS/2 you are very
    likely one of the last few people who use it so the person who has to
    support it is you.

    The good thing about open source is that support cannot die as long as
    there are users who are willing and able to support the project.

    The bad thing is that support will die if there aren't any users who are
    willing and able to support the project.

    > ping Ilya


    Yes, Ilya might be the other remaining user of EMX ;-).

    hp
    Peter J. Holzer, Mar 17, 2011
    #6
    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. Yan
    Replies:
    0
    Views:
    1,120
  2. Jack Wright
    Replies:
    5
    Views:
    615
    Shiv Kumar
    Jan 19, 2004
  3. Ram
    Replies:
    0
    Views:
    2,820
  4. Andrey Batyuck

    Compiler compiler with C++ as output

    Andrey Batyuck, May 11, 2004, in forum: C++
    Replies:
    3
    Views:
    432
    Frederik Hertzum
    May 17, 2004
  5. RickMuller
    Replies:
    4
    Views:
    694
    Alexey Shamrin
    Mar 26, 2005
Loading...

Share This Page