in reply to Re: Trouble Compiling Term::ReadKey
in thread Trouble Compiling Term::ReadKey

I thought that it was the Configure step of building Perl that knew how to select compiler command-line arguments for cc vs. gcc. I thought that MakeMaker just pulled out the one set of compiler options that Configure stuffed into Config.pm and so doesn't know how to adjust compiler command-line options based on cc vs. gcc.

Therefore, I don't expect CC=gcc to work when building a module (unless you get very lucky), only when building Perl itself.

The best rule is to build modules using the same environment that was used to build Perl. If I wanted to use gcc to build modules but Config.pm wanted to use cc, then I'd probably grab the source code to Perl and build it with gcc.

                - tye
  • Comment on Re^2: Trouble Compiling Term::ReadKey (Configure)

Replies are listed 'Best First'.
Re: Re^2: Trouble Compiling Term::ReadKey (Configure)
by wirrwarr (Monk) on Sep 02, 2003 at 19:47 UTC
    Hmm, I'm no expert in building perl, so I didn't know about that, but it sounds reasonable.
    (looking into my configuration with "perl -V")
    Yes, the C-compiler is set there, and the flags etc. as well. So, OP, which compiler was used in building perl?

    daniel.
      I am unsure what perl was built with. The only compiler I have available is CC and in the makefile stated cc=gcc. Any suggestions? Would installing GCC fix it??

      --Mark

        Sounds like your copy of Perl was built with gcc (because Config.pm says to use gcc) so, yes, I'd install gcc and try again.

                        - tye
      I have problem compiling Term::ReadKey module using CPAN. The error message is: make: *** No rule to make target `/usr/lib/perl5/5.8.3/i386-linux-thread-multi/CORE/config.h config.h doesn't exist at all. I'm using Mandrake 10. What's the problem??? Thanks