Compiling perl with GCC

Discussion in 'Perl Misc' started by Tim Haynes, Sep 25, 2003.

  1. Tim Haynes

    Tim Haynes Guest

    Marcus <> 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
     
    Tim Haynes, Sep 25, 2003
    #1
    1. Advertising

  2. Tim Haynes

    Marcus Guest

    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.
     
    Marcus, Sep 25, 2003
    #2
    1. Advertising

  3. Tim Haynes

    Marcus Guest

    In article <>,
    says...
    > Marcus <> 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.
     
    Marcus, Sep 25, 2003
    #3
  4. Tim Haynes

    Juha Laiho Guest

    Marcus <> 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)
     
    Juha Laiho, Sep 25, 2003
    #4
  5. Tim Haynes

    Marcus Guest

    In article <bkv4po$5td$-int>, says...
    > Marcus <> 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.
     
    Marcus, Sep 26, 2003
    #5
  6. Tim Haynes

    Sisyphus Guest

    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
     
    Sisyphus, Sep 26, 2003
    #6
  7. Tim Haynes

    Juha Laiho Guest

    Marcus <> 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)
     
    Juha Laiho, Sep 26, 2003
    #7
  8. Tim Haynes

    so009t

    Joined:
    Sep 27, 2013
    Messages:
    1
    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?
     
    so009t, Sep 27, 2013
    #8
    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. marko sarunac
    Replies:
    0
    Views:
    591
    marko sarunac
    Nov 17, 2003
  2. Replies:
    8
    Views:
    442
  3. Kevin P. Fleming

    C99 structure initialization in gcc-2.95.3 vs gcc-3.3.1

    Kevin P. Fleming, Nov 6, 2003, in forum: C Programming
    Replies:
    2
    Views:
    655
    Kevin P. Fleming
    Nov 6, 2003
  4. Chris
    Replies:
    3
    Views:
    1,003
    Sisyphus
    Jun 29, 2005
  5. UsenetBinaries.com

    Compiling Perl with ICC vs GCC - Benchmarks

    UsenetBinaries.com, Apr 24, 2007, in forum: Perl Misc
    Replies:
    0
    Views:
    120
    UsenetBinaries.com
    Apr 24, 2007
Loading...

Share This Page