Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Compiling perl with GCC

Reply
Thread Tools

Compiling perl with GCC

 
 
Tim Haynes
Guest
Posts: n/a
 
      09-25-2003
Marcus <(E-Mail Removed)> writes:

[snip]
> #make test
> `sh cflags "optimize='-03'" toke.o` toke.c
> CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -
> D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -03 -wall
> gcc: Internal Error: Terminated (program cc1)
> Please submit a full bug report.

[snip]
>
> Any ideas? It seems vague and doesn't give me much of a clue.


First of all, try it without the -O3 in there. -O2 is probably all you
need, or take it out altogether.

~Tim
--
Product Development Consultant
OpenLink Software
Tel: +44 (0) 20 8681 7701
Web: <http://www.openlinksw.com>
Universal Data Access & Data Integration Technology Providers
 
Reply With Quote
 
 
 
 
Marcus
Guest
Posts: n/a
 
      09-25-2003
I was unable to compile some perl modules, because after running #perl
Makefile.PL running #make was trying to call up /usr/bin/cc rather than
gcc.

After looking at newsqroups I got the impression that I needed to either
purchase the commercial sun compiler that uses the cc command or
recompile perl from source using gcc (my current perl was already
installed as part of the linux install).

So being unable to justify the expense of the first option, I went for
the second.

#./Configure went through seemingly fine. When I ran #make or #make test
though I ran into errors.

------------------------------------------------------------------------
#make test
`sh cflags "optimize='-03'" toke.o` toke.c
CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -
D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -03 -wall
gcc: Internal Error: Terminated (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make: *** [toke.o] Error 1
#
------------------------------------------------------------------------

Any ideas? It seems vague and doesn't give me much of a clue.

I haven't submitted a full bug report. I haven't got all the information
asked for. For instance my GCC was installed from an RPM (I didn't have
a compiler before that), so I don't know all the configure options used.

I am running GCC 3.3.1 on Peanut Linux 9.5 with kernel 2.4.20. Trying to
compile perl 5.8.0 from source having gone through configure using
default options apart from one minor change to a path setting.

Regards,

Marcus Thornton.


 
Reply With Quote
 
 
 
 
Marcus
Guest
Posts: n/a
 
      09-25-2003
In article <(E-Mail Removed)>, http://www.velocityreviews.com/forums/(E-Mail Removed)
says...
> Marcus <(E-Mail Removed)> writes:
>
> [snip]
> > #make test
> > `sh cflags "optimize='-03'" toke.o` toke.c
> > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -
> > D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -03 -wall
> > gcc: Internal Error: Terminated (program cc1)
> > Please submit a full bug report.

> [snip]
> >
> > Any ideas? It seems vague and doesn't give me much of a clue.

>
> First of all, try it without the -O3 in there. -O2 is probably all you
> need, or take it out altogether.
>
> ~Tim
>



OK tried changing the -03 in the makefile to -02 and it looked better
and got further, checking file dependencies, but then produced the same
line as before (except obviously with -02 instead of -03) before
producing the same error.

Thank you, but any more ideas?

Regards,

Marcus Thornton.
 
Reply With Quote
 
Juha Laiho
Guest
Posts: n/a
 
      09-25-2003
Marcus <(E-Mail Removed)> said:
>OK tried changing the -03 in the makefile to -02 and it looked better


Note, the optimization option is -O2, not -02.

>Thank you, but any more ideas?


Check if there's any later gcc RPM for your distribution. Though what
you have seems pretty recent already.

Note that you can't safely mix&match RPMs from different distributions,
so even through you might be succesful in installing an RPM meant
for some other distribution, there's no guarantee it'll work properly.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
 
Reply With Quote
 
Marcus
Guest
Posts: n/a
 
      09-26-2003
In article <bkv4po$5td$(E-Mail Removed)-int>, (E-Mail Removed) says...
> Marcus <(E-Mail Removed)> said:
> >OK tried changing the -03 in the makefile to -02 and it looked better

>
> Note, the optimization option is -O2, not -02.
>
> >Thank you, but any more ideas?

>
> Check if there's any later gcc RPM for your distribution. Though what
> you have seems pretty recent already.
>
> Note that you can't safely mix&match RPMs from different distributions,
> so even through you might be succesful in installing an RPM meant
> for some other distribution, there's no guarantee it'll work properly.
>


Yes it was -O2 not -02 I used, sorry for the typo. Using the trial and
error method -O1 seemed to work, which is slightly bizarre given that
later reading revealed that there isn't an -O1 option!!!!

Anyway make test went through to the end. At which point I was told that
I'd failed just one of the tests. I was advised to set LD_LIBRARY_PATH
to include the build directory and then run ./perl harness.

I did this and was hit with this report:-
----------------------------------------------------------------------
Failed test ../lib/Net/t/hostname.t Total 2 Fail 1 Failed 50.00%
List of Failed 1

41 tests and 410 tests skipped.
Failed 1 out of 712 test scripts, 99.86% okay. 1/68623 subtests failed,
100.00% Okay.
----------------------------------------------------------------------

I found a newsgroup featuring somebody who had exactly this test failed
at 50% and they said that they fixed it by setting the reverse DNS up.

Thing is I don't even have forward DNS set up. I have a file /etc/hosts
which provides hostname to address mapping for the TCP/IP subsystem and
says it can be used on small systems instead of a "named" name server.

Do I need to set my machine up as a name server? If so which is the
simplest way to do it or do I need to go the whole hog and install bind
or some such?

I would be loath to go to the lengths of compiling and installing yet
another indepth piece of software. A fortnight ago I'd never seen a
linux prompt and decided I needed to set a box up as a proxy and mail
server. Every time I try to install something though, there seems to be
five things that it depends on that need installing first. All of which
seem to my novice eyes to be tricky. Hence my aversion to tackling bind
at this point.

So what is the simplest way to set up the reverse DNS?

Regards,

Marcus Thornton.
 
Reply With Quote
 
Sisyphus
Guest
Posts: n/a
 
      09-26-2003
Marcus wrote:
> I was unable to compile some perl modules, because after running #perl
> Makefile.PL running #make was trying to call up /usr/bin/cc rather than
> gcc.
>


This happens presumably because 'perl -V:cc' reports 'cc' - which means
that cc is the appropriate compiler to use with this build of perl.
I gather you don't have cc installed - but it should be available from
the OS installation discs.
At least it's on my (Mandrake) linux pc and I certainly didn't purchase
it or download it over the web.

Afaik, neither cc nor gcc is part of the standard install - when I
installed gcc from the installation disks, cc mysteriously appeared also.

All I'm getting at is that it might be simpler for you to install cc and
stay with the existing perl installation *if* there's no other problems
with it.

The perl that came with my Linux is missing the CORE/ files - so I
installed another perl (running as a user, but I needed to run 'make
install' as root). Now I have 2 - the one that came with the OS (and
gets found by the OS or whenever I run as root), and the one I installed
(and gets found when I run as a user).

Sounds like you're trying to replace the original. Running as a user, I
had no problem in getting perl to build with both cc and gcc. I'm new to
Linux, and don't know which is the most appropriate course of action to
take. Just thought I'd throw this is in to give you something else to
think about (which I'm sure you need , and to see if someone has some
comments and advice that might lead to *my* edification, too.

Cheers,
Rob

 
Reply With Quote
 
Juha Laiho
Guest
Posts: n/a
 
      09-26-2003
Marcus <(E-Mail Removed)> said:
>Anyway make test went through to the end. At which point I was told that
>I'd failed just one of the tests. I was advised to set LD_LIBRARY_PATH
>to include the build directory and then run ./perl harness.
>
>I did this and was hit with this report:-
>----------------------------------------------------------------------
>Failed test ../lib/Net/t/hostname.t Total 2 Fail 1 Failed 50.00%
>List of Failed 1
>
>41 tests and 410 tests skipped.
>Failed 1 out of 712 test scripts, 99.86% okay. 1/68623 subtests failed,
>100.00% Okay.
>----------------------------------------------------------------------
>
>I found a newsgroup featuring somebody who had exactly this test failed
>at 50% and they said that they fixed it by setting the reverse DNS up.


Ok. Then you should be able to trust that perl in itself is working.

>So what is the simplest way to set up the reverse DNS?


Perl as such does not require reverse DNS - and even though the test
failed, you should be able to install the compilation results.

So, just go on and install - as you've identified that the cause of
problem is not with perl, and doesn't cripple your environment.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
 
Reply With Quote
 
so009t so009t is offline
Junior Member
Join Date: Sep 2013
Posts: 1
 
      09-27-2013
Hi everyone,

I am looking to change 'perl -V:cc' reports 'cc' to 'gcc' but I cannot seem to figure out how. Can someone assist with how to change perl's compiler to gcc?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling Perl with ICC vs GCC - Benchmarks UsenetBinaries.com Perl Misc 0 04-24-2007 04:24 PM
Compiling Perl modules on AIX using gcc instead of cc_r? Chris Perl Misc 3 06-29-2005 07:04 AM
gcc 2.95 and gcc 3.2 gouqizi.lvcha@gmail.com C++ 8 03-16-2005 02:34 AM
problem compiling perl source on AIX 5.1.0.0 using GCC marko sarunac Perl 0 11-17-2003 07:21 PM
C99 structure initialization in gcc-2.95.3 vs gcc-3.3.1 Kevin P. Fleming C Programming 2 11-06-2003 05:15 AM



Advertisments