Telling CPAN.pm to use gcc 
Author Message
 Telling CPAN.pm to use gcc

Is there a way to tell CPAN.pm to use gcc when installing a module
rather than cc?

Thanks.



Sat, 14 Apr 2001 03:00:00 GMT  
 Telling CPAN.pm to use gcc

Aravind> Is there a way to tell CPAN.pm to use gcc when installing a module
Aravind> rather than cc?

CPAN.pm just uses whatever you built Perl with.  So rebuild Perl
with gcc, and CPAN.pm will use gcc!

--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying

Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me



Sun, 15 Apr 2001 03:00:00 GMT  
 Telling CPAN.pm to use gcc

Quote:

> Is there a way to tell CPAN.pm to use gcc when installing a module
> rather than cc?

modify your CPAN/Config.pm:
...
  'make_arg' => q[CC=gcc],
...

L8r,
Rob



Sun, 15 Apr 2001 03:00:00 GMT  
 Telling CPAN.pm to use gcc

Quote:


> Aravind> Is there a way to tell CPAN.pm to use gcc when installing a module
> Aravind> rather than cc?
> CPAN.pm just uses whatever you built Perl with.  So rebuild Perl
> with gcc, and CPAN.pm will use gcc!

That's correct in the literal sense, but what a poor answer is that to this
(not that uncommon!) problem!

I.e.,

"I want to install different seats in my car!" - "Oh, no problem, just rebuild
your car from scratch, it's very simple!"

So here goes a more practical solution:

When you build a module, you usually say "perl Makefile.PL".

After that, and before issuing "make", just edit the Makefile
which has been created and change the CC=cc line (or whatever
it looks like - don't know by heart) to whatever you want.
That way you can also change the optimizer options.

This whole thing can be useful e.g. if you want to compile Perl
in a more conservative way, but some module which does the
real work (PDL?) with more optimizations. Right? :-)

Yours,
--

    Free Perl and C Software for Download: www.engelschall.com/u/sb/download/



Sun, 15 Apr 2001 03:00:00 GMT  
 Telling CPAN.pm to use gcc

Quote:


>> Is there a way to tell CPAN.pm to use gcc when installing a module
>> rather than cc?

>modify your CPAN/Config.pm:
>...
>  'make_arg' => q[CC=gcc],
>...

Hi,
   I'm not sure about this, but even on the same platform
couldn't one run into potential compatability problems with using
a module built with one particular compiler that uses a perl
built with a different compiler? I know on Windows that's a
possible issue with some versions of Visual C++ and Borland,
but that's Windows ... Even if not, probably some of the compiler
options should also be changed.  It seems the safest bet, as
was already suggested, that if you're wanting to change the
compiler for all future module installations, to rebuild perl
with the desired compiler.

--
                Best regards,
                Randy Kobes

Physics Department              Phone:     (204) 786-9399
University of Winnipeg          Fax:       (204) 774-4134

Canada                          http://theory.uwinnipeg.ca/



Mon, 16 Apr 2001 03:00:00 GMT  
 Telling CPAN.pm to use gcc

Quote:



> > Aravind> Is there a way to tell CPAN.pm to use gcc when installing a module
> > Aravind> rather than cc?
[...]
> When you build a module, you usually say "perl Makefile.PL".

> After that, and before issuing "make", just edit the Makefile
> which has been created and change the CC=cc line (or whatever
> it looks like - don't know by heart) to whatever you want.
> That way you can also change the optimizer options.

How about just doing "perl Makefile.PL CC='gcc' CFLAGS='-O'"
or somesuch?

You can modify your CPAN::Config to specify arguments on the "perl
Makefile.PL" or "make" command lines, too.  It shouldn't be necessary
to *ever* edit a Makefile.

--Bill.

--
William R Ward          Bay View Consulting   http://www.bayview.com/~hermit/


 PGP Key 0x2BD331E5; Public key at http://www.bayview.com/~hermit/pubkey.txt
-----------------------------------------------------------------------------
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." - Ben Franklin, ~1784



Sat, 21 Apr 2001 03:00:00 GMT  
 Telling CPAN.pm to use gcc
See below
--
Ron Savage


http://www.ozemail.com.au/~rpsavage



[snip]

Quote:
> You can modify your CPAN::Config to specify arguments on the "perl
> Makefile.PL" or "make" command lines, too.  It shouldn't be necessary
> to *ever* edit a Makefile.

      ^^^^^^^^
See patchMake.pl on my web site for situations when this dogmatic drivel is
exposed for what it is.

[snip]



Sun, 22 Apr 2001 03:00:00 GMT  
 Telling CPAN.pm to use gcc

Quote:



> [snip]
> > You can modify your CPAN::Config to specify arguments on the "perl
> > Makefile.PL" or "make" command lines, too.  It shouldn't be necessary
> > to *ever* edit a Makefile.
>       ^^^^^^^^
> See patchMake.pl on my web site for situations when this dogmatic drivel is
> exposed for what it is.

Perhaps it wasn't clear enough from context, but I meant a Makefile
that was generated by Perl's ExtUtils::MakeMaker module.  If such a
Makefile contains problems then it should be fixed by changing the
Makefile.PL that created it, or perhaps adding command-line arguments,
or in the worst case, modifying MakeMaker (and submitting a patch to
perlbug).

--Bill.

--
William R Ward          Bay View Consulting   http://www.bayview.com/~hermit/


 PGP Key 0x2BD331E5; Public key at http://www.bayview.com/~hermit/pubkey.txt
-----------------------------------------------------------------------------
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." - Ben Franklin, ~1784



Fri, 27 Apr 2001 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Compiling DBI pm on HP-UX 10.20 using gcc

2. can't install CPAN.pm from CPAN.pm

3. installing CPAN.pm with CPAN.pm

4. using CPAN.pm to install a local distribution file

5. Overriding Config.pm using CPAN module...

6. using CPAN.pm for local installs w/dependencies

7. install DBD::Mysql using CPAN.pm

8. using CPAN.pm to install a local distribution file

9. Problems using CPAN.pm

10. Using CPAN.pm without upgrading to Perl 5.6

11. Intalling Modules and using CPAN.pm

12. Using CPAN.pm in multi-archetecture environment?

 

 
Powered by phpBB® Forum Software