in reply to Trouble Compiling Term::ReadKey

it doesn't look like make is using gcc, cause the compiler line starts with cc. the error messages are about the option -mpa-risc-1-1 not recognized, so it might be useful to see which compiler supports that flag.
Does supplying CC=gcc to MakeMaker work?
CC=gcc perl Makefile.PL
daniel.

Replies are listed 'Best First'.
Re^2: Trouble Compiling Term::ReadKey (Configure)
by tye (Sage) on Sep 02, 2003 at 19:39 UTC

    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
      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

        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