PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Hab kein C++ ???????????



Sachse
26.10.02, 13:12
Möchte nach der Umstellung von 7.3 suf 8.1 SuSE Prog's kompilieren.
Jetzt dekomme ich immer nen Fehlermeldung :
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.


Findet die Configure C++ nicht ?

Wie kann ich diesen Fehler beheben ?

C++ ist installiert.

gfc
26.10.02, 13:17
Original geschrieben von Sachse
Möchte nach der Umstellung von 7.3 suf 8.1 SuSE Prog's kompilieren.
Jetzt dekomme ich immer nen Fehlermeldung :
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.


Findet die Configure C++ nicht ?

Wie kann ich diesen Fehler beheben ?

C++ ist installiert.

komisch.. gcc sollte eigentlich installiert sein.. um welches Progi in welcher Version gehts denn??

probier sonst mal: ./configure --prefix=/opt/kde3

Rototom
26.10.02, 13:18
hast du gcc-c++ installiert?

Sachse
26.10.02, 13:23
Hi auch schlechtes Wetter ?

Es geht um die GTK und Glib und alles was ich dazu brauche atk ,pango ,pkgconfig....

./configure --prefix=/opt/kde3 läuft auch nicht

Belkira
26.10.02, 13:36
Wie kommst Du auf C++? :rolleyes:

Configure meckert über einen C Compiler, der unbrauchbare Ausgaben liefert. Schau mal an das Ende von config.log im Arbeitsverzeichnis, woran "configure" gescheitert ist.

Trillian
26.10.02, 13:37
Und was soll bei so einem Problem ein anderes Prefix bringen? :ugly:

Sachse
26.10.02, 13:45
configure: exit 1


Ähh

Nebenbei ....

Ich kann ./configure nur mit sh ./configure aufrufen . Ist das nicht sonderbar?

gfc
26.10.02, 13:54
Original geschrieben von Trillian
Und was soll bei so einem Problem ein anderes Prefix bringen? :ugly:

keine Ahnung.. aber nur so konnte ich sim und den mplayer kompilieren... wenn du ne Erklärung hast.. ich habe nur praktikble lösungen....

tomes
26.10.02, 16:57
http://www.linuxinfoserver.de/forums/showthread.php?s=&threadid=46182&highlight=host

checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
Nach deiner letzten Zeile scheint es sich um das selbe/gleiche Problem zu handeln.

T;o)Mes

zander
27.10.02, 10:06
Es empfiehlt sich bei derartigen Problem immer zunächst die configure Logdatei (config.log) zu konsultieren, in der Regel steht dort mehr oder weniger deutlich, wo das Problem ist. In diesem Fall könnte z.B. einfach eine Bibliothek nicht durch den linker aufzufinden sein...

Sachse
27.10.02, 12:45
Für mich alles unklar

Der beschwert sich wegen fehlender Recht so wie es sehe.Bin nicht der Englender der alles lesen kann.
Wie gesagt wenn ich ./configure aufrufe wie bei SuSE7.3 brauche ich jetzt immer sh oder bash davor.
An irgend einer Stelle set dann der Compiler aus. So sehe ich das .
Mache alles in der Consoele mit su root . Aber selbst alls Root eingeloggt funzt das so nicht.


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

It was created by configure, which was
generated by GNU Autoconf 2.53. Invocation command line was

Hier mal die Log dazu


$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = linux
uname -m = i686
uname -r = 2.4.19-4GB
uname -s = Linux
uname -v = #1 Fri Sep 13 13:14:56 UTC 2002

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/sbin
PATH: /bin
PATH: /usr/bin
PATH: /sbin
PATH: /usr/X11R6/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1479: checking for a BSD-compatible install
configure:1533: result: /usr/bin/install -c
configure:1544: checking whether build environment is sane
configure:1587: result: yes
configure:1602: checking whether make sets ${MAKE}
configure:1622: result: yes
configure:1645: checking for working aclocal
configure:1652: result: found
configure:1660: checking for working autoconf
configure:1667: result: found
configure:1675: checking for working automake
configure:1682: result: found
configure:1690: checking for working autoheader
configure:1697: result: found
configure:1705: checking for working makeinfo
configure:1712: result: found
configure:1755: checking whether to enable maintainer-specific portions of Makefiles
configure:1764: result: no
configure:1785: checking build system type
configure:1803: result: i686-pc-linux-gnu
configure:1811: checking host system type
configure:1825: result: i686-pc-linux-gnu
configure:1834: checking for the BeOS
configure:1844: result: no
configure:1848: checking for Win32
configure:1876: result: no
configure:2000: checking whether to enable garbage collector friendliness
configure:2012: result: no
configure:2016: checking whether to disable memory pools
configure:2019: result: no
configure:2078: checking for gcc
configure:2094: found /usr/bin/gcc
configure:2104: result: gcc
configure:2348: checking for C compiler version
configure:2351: gcc --version </dev/null >&5
gcc (GCC) 3.2
Copyright (C) 2002 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.

configure:2354: $? = 0
configure:2356: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.2/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i486-suse-linux
Thread model: posix
gcc version 3.2
configure:2359: $? = 0
configure:2361: gcc -V </dev/null >&5
gcc: argument to `-V' is missing
configure:2364: $? = 1
configure:2390: checking for C compiler default output
configure:2393: gcc conftest.c >&5
configure:2396: $? = 0
configure:2429: result: a.out
configure:2434: checking whether the C compiler works
configure:2440: ./a.out
./configure: line 1: ./a.out: Permission denied
configure:2443: $? = 126
configure:2451: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnu
ac_cv_build_alias=i686-pc-linux-gnu
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=
ac_cv_host=i686-pc-linux-gnu
ac_cv_host_alias=i686-pc-linux-gnu
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
lt_cv_sys_path_separator=:

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define GLIB_MAJOR_VERSION 2
#define GLIB_MINOR_VERSION 0
#define GLIB_MICRO_VERSION 6
#define GLIB_INTERFACE_AGE 6
#define GLIB_BINARY_AGE 6
#define G_COMPILED_WITH_DEBUGGING "minimum"

configure: exit 1

Belkira
27.10.02, 12:56
Der beschwert sich wegen fehlender Recht so wie es sehe.Bin nicht der Englender der alles lesen kann.

Mag ja sein, aber wenigstens die Rechte überprüfen kannst Du doch, oder?


Wie gesagt wenn ich ./configure aufrufe wie bei SuSE7.3 brauche ich jetzt immer sh oder bash davor.

Hier ebenfalls. In der ersten Zeile von configure steht sicherlich #!/bin/sh. Hast Du /bin/sh bzw. einen Link von /bin/sh, und stimmen sowohl in /bin als auch dieser Shell die Rechte?


configure:2390: checking for C compiler default output
configure:2393: gcc conftest.c >&5
configure:2396: $? = 0
configure:2429: result: a.out
configure:2434: checking whether the C compiler works
configure:2440: ./a.out
./configure: line 1: ./a.out: Permission denied

Tja, das kann meiner Meinung nach viele Ursachen haben, falsche Zugriffsrechte auf Verzeichnissen z.B. (da hilft dann auch kein root). Müßtest halt mal ein ganz einfaches C Testprogramm probeweise compilieren, um das zu analysieren.

bachi|tuX
27.10.02, 19:21
so was ähnliches hatte ich auch mal... o_O
gleiches programm, aber anderer user, und schon gings... kA warum... :/ war auch nur mal bei einem einzigen programm
wollte ich nur mal erwähnt haben...

christophwth
27.10.02, 23:34
Hi

da hat wohl ein vorheriges autoconf oder automake
sondermüll für den gcc 3.2 erzeugt
( wobei der trotzdem problemlos kompileren könnte, weil
der fehler im configure zu suchen ist )

hier ein beispielausschnitt : aus dem glib-2.06 configure
ab zeile 2432


# Check the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:$LINENO: checking whether the C compiler works" >&5
echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
if { ac_try='./$ac_file'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'." >&5
echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
fi




ich bin nicht sicher ob das configure von glib , welcher version ? ,problemlos mit dem gcc3.2 arbeitet.

was genau fehlt kannst du eventuell mit strace feststellen


gruss
christoph

LiquidAcid
28.10.02, 13:53
Liegt es vielleicht daran, dass er zum gcc Test eine a.out Binary linkt und der Kernel vielleicht kein a.out versteht und auch kein passendes Modul kompiliert wurde. Normalerweise sind die neueres Executables ja im ELF-Format gehalten, deshalb lässt man gern mal den a.out Code aus dem Kernel raus (da er ja überholt ist).
Keine Ahnung obs wirklich daran liegt.

cya
liquid

zander
28.10.02, 17:42
Nein, denn obwohl gcc die Ausgabedatei standardmässig a.out nennt, ist diese dennoch im ELF Format. Ich kann mich nur der Empfehlung anschliessen, ein kleies Testprogramm analog zu dem configure script zu übersetzen und so zu versuchen, die Ursache des Problems herauszufinden; es kann auch nicht schaden, google zu konsultieren, Du dürftest nicht der Erste mit diesem Problem sein.

Sachse
28.10.02, 18:36
Hab SuSE belästigt . die haben das ja verzapft .
Mal sehen was die sagen .