Gcc-4.2 funktioniert nicht

Hallo Leute ich hab grade versucht Firefox selber zu kompilieren.

bei make -f client.mk build

bekomme ich :

[quote]checking for gcc… gcc-4.2
checking whether the C compiler (gcc-4.2 ) works… no
configure: error: installation or configuration problem: C compiler cannot create executables.
*** Fix above errors and then restart with “make -f client.mk build”
make[1]: *** [configure] Error 1
make: *** [/Users/Theo/mozilla-central/objdir-ff-release/Makefile] Error 2
[/quote]

Wie kann ich das richten ?

Verrat’ und mal, was die config.log so sagt.

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:987: checking host system type
configure:1008: checking target system type
configure:1026: checking build system type
configure:1110: checking for mawk
configure:1110: checking for gawk
configure:1240: checking for perl5
configure:2261: checking for gcc
configure:2374: checking whether the C compiler (gcc-4.2 ) works
configure:2390: gcc-4.2 -o conftest conftest.c 1>&5
/Users/Theo/mozilla-central/configure: line 2389: gcc-4.2: command not found
configure: failed program was:

#line 2385 “configure”
#include “confdefs.h”

main(){return(0);}

Oha. Kann es sein, dass gcc auf dem System nicht richtig installiert ist? Mach mal ein

which gcc

und ein

echo $PATH

im Terminal.

iMac:~ Theo$ which gcc
iMac:~ Theo$ echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

(nix)
…das ist schonmal schlecht. XCode hast Du installiert? Mir hat es (wahrscheinlich beim SL-Upgrade) auch die Links auf das gcc-binary zerhobelt. Am Sichersten wäre, wenn Du XCode neu installierst.

Jupp, kann ich bestaetigen, musste Xcode auch neu installieren.

make -f client.mk bringt :

sh-3.2# make -f client.mk Adding client.mk options from /Users/Theo/mozilla-central/mozconfig: MOZ_OBJDIR=$(TOPSRCDIR)/objdir-ff-release MOZ_MAKE_FLAGS=-j4 cd /Users/Theo/mozilla-central/objdir-ff-release /Users/Theo/mozilla-central/configure Adding configure options from /Users/Theo/mozilla-central/mozconfig: --enable-application=browser loading cache ./config.cache checking host system type... powerpc-apple-darwin9.4.0 checking target system type... powerpc-apple-darwin9.4.0 checking build system type... powerpc-apple-darwin9.4.0 checking for mawk... no checking for gawk... gawk checking for perl5... /opt/local/bin/perl5 checking for gcc... gcc-4.2 checking whether the C compiler (gcc-4.2 ) works... no configure: error: installation or configuration problem: C compiler cannot create executables. *** Fix above errors and then restart with "make -f client.mk build" make[1]: *** [configure] Error 1 make: *** [/Users/Theo/mozilla-central/objdir-ff-release/Makefile] Error 2 sh-3.2#

sh-3.2# which gcc /usr/bin/gcc sh-3.2# echo $PATH /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

Gnarf! :smiley:

config.log?

das gleiche wie oben.

und ./configure sagt mir :

sh-3.2# ./configure Adding configure options from ./mozconfig: --enable-application=browser creating cache ./config.cache checking host system type... powerpc-apple-darwin9.4.0 checking target system type... powerpc-apple-darwin9.4.0 checking build system type... powerpc-apple-darwin9.4.0 checking for mawk... no checking for gawk... gawk checking for perl5... /opt/local/bin/perl5 checking for gcc... gcc-4.2 checking whether the C compiler (gcc-4.2 ) works... no configure: error: installation or configuration problem: C compiler cannot create executables.

Hm! Hast Du config.cache mal gelöscht? Sollte aber kein Problem sein, nachdem er behauptet, das anzulegen. Mach dann mal ein

which gcc-4.2

…ich denke mal, ihm fehlt ein symlink von gcc auf gcc-4.2.

Ist aber ein frischinstallierter Imac G5 mit Leopard 10.5.8
und den passendem Xcode

which gcc-4.2 gibt keine Rückmeldung

ohmAN kann das sein das gcc 4.2 überhaupt nicht installiert ist ?

[quote=“maxpower”]which gcc-4.2 gibt keine Rückmeldung

ohmAN kann das sein das gcc 4.2 überhaupt nicht installiert ist ?[/quote]

Er schreibt ja…
"suche nach gcc… (gefunden hat er gcc4.2.)
"Prüfe ob gcc4.2 funktioniert… (Nein!!)

weiß jetzt nicht obs hilft aber lies mal nach, mit welcher gcc version die das Prog
compiliert haben… Manchmal liegt da der Hund begraben…

wenn ja musst du dir dann eine gcc version zusätzlich installieren.

Naja, configure meint ja, dass es die richtige gcc-Version gefunden hat. Also mal schauen (da es gcc gibt):

gcc --version

und dann ggf. einen Link von Hand einbauen:

cd /usr/bin sudo ln -s gcc gcc-4.2

[quote]iMac:~ Theo$ gcc --version
powerpc-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
Copyright © 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[/quote]

also gcc-4.0.1 ist installiert.

Wie kann ich den 4.2er installieren ?

kann ich den über macport installieren?

[quote=“maxpower”]
also gcc-4.0.1 ist installiert.[/quote]

Hä???
Des will mir jetzt nicht ganz in den Kopf…
make sagt bei dir doch, dass er gcc 4.2 gefunden habe… :open_mouth:
Den hergang würde ich nun gern mal verstehen…

vielleicht ist es wirklich so, dass du die neue version schon hast und
die nicht ordentlich verlinkt is.

Bei mir unter SnowLeo sind die versionen 4.0 und 4.2 vorhanden, auf “gcc” ist version 4.2 verlinkt.

Also vorgang :

iMac G5 neuinstalliert mit 10.5.4 und dann auf 10.5.8 geupdated

dann hab ich den XCode installiert und dann wollte ich Firefox drauf kompilieren.

Mehr hab ich nicht gemacht.

Hierran hab ich mich gehalten :

developer.mozilla.org/En/Simple_Firefox_build

aber bei make -f client.mk bleibt er hängen