This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
C++ compiler cannot create executables.
- To: gcc-help at gcc dot gnu dot org
- Subject: C++ compiler cannot create executables.
- From: lbergman <lbergman at abi dot tconline dot net>
- Date: Mon, 19 Mar 2001 11:11:15 -0600
- Organization: Texas Comm
- Reply-To: lbergman at abi dot tconline dot net
First, I must say I believe this might be a problem related to RH7.0
I have updated all gcc and libstdc stuff per RH errata.
[root@lewis /root]# rpm -q gcc
gcc-2.96-69
[root@lewis /root]# gcc --version
2.96
[root@lewis /root]# automake --version
automake (GNU automake) 1.4
[root@lewis /root]# /sbin/ldconfig --version
ldconfig (GNU libc) 2.2
[root@lewis /root]# rpm -q binutils
binutils-2.10.0.18-1
I found an email in an archive that referenced running gcc on this file:
[root@lewis /root]# cat hello.cc
int main()
{}
Which yeilded the following result :
[root@lewis /root]# cat hello.o
ELF4( U]01.01GCC: (GNU) 2.96 20000731 (Red Hat Linux 7.0).symtab.strtab.shstrtab.text.data.bss.note.comment
!@@,@2T.;(
hello.ccgcc2_compiled.mainkonsole
I am unsure where to turn next as RedHat doesn't support the compiler. They
only support the binary programs, (even though the compiler is one).
As a secondary note here is an example of some of the config.log file errors
that are shown when a real program is configured:
This is PHP4. Sorry for the long list but I thought it might be helpfull.
configure:1299: checking for a BSD compatible install
configure:1352: checking whether build environment is sane
configure:1409: checking whether make sets ${MAKE}
configure:1448: checking for working aclocal
configure:1461: checking for working autoconf
configure:1474: checking for working automake
configure:1487: checking for working autoheader
configure:1500: checking for working makeinfo
configure:1530: checking whether to enable maintainer-specific portions of Makefiles
configure:1559: checking host system type
configure:1587: checking for gawk
configure:1621: checking for bison
configure:1655: checking bison version
configure:1668: checking for gcc
configure:1781: checking whether the C compiler (gcc ) works
configure:1797: gcc -o conftest conftest.c 1>&5
configure:1823: checking whether the C compiler (gcc ) is a cross-compiler
configure:1828: checking whether we are using GNU C
configure:1837: gcc -E conftest.c
configure:1856: checking whether gcc accepts -g
configure:1888: checking how to run the C preprocessor
configure:1909: gcc -E conftest.c >/dev/null 2>conftest.out
configure:1968: checking for AIX
configure:2013: checking for gcc option to accept ANSI C
configure:2066: gcc -c -g -O2 conftest.c 1>&5
configure:2093: checking for ranlib
configure:2122: checking whether gcc and cc understand -c and -o together
configure:2137: gcc -c conftest.c -o conftest.o 1>&5
configure:2138: gcc -c conftest.c -o conftest.o 1>&5
configure:2143: cc -c conftest.c 1>&5
configure:2145: cc -c conftest.c -o conftest.o 1>&5
configure:2146: cc -c conftest.c -o conftest.o 1>&5
configure:2173: checking whether ln -s works
configure:2200: checking for flex
configure:2233: checking for flex
configure:2267: checking for yywrap in -lfl
configure:2286: gcc -o conftest -g -O2 conftest.c -lfl 1>&5
configure:2309: checking lex output file root
configure:2330: checking whether yytext is a pointer
configure:2349: gcc -o conftest -g -O2 conftest.c -lfl 1>&5
configure:2372: checking for working const
configure:2426: gcc -c -g -O2 conftest.c 1>&5
configure:2543: gcc -o conftest -g -O2 conftest.c 1>&5
/tmp/ccKP70uF.o: In function `main':
/root/tar/php-4.0.4pl1/configure:2538: undefined reference to `pthread_mutexattr_init'
/root/tar/php-4.0.4pl1/configure:2539: undefined reference to `pthread_create'
collect2: ld returned 1 exit status
configure: failed program was:
#line 2525 "configure"
#include "confdefs.h"
This same configure and confdefs.h appear a ton of times but usually with
differing line numbers.
This is the last few lines of config.log:
configure:36451: checking for c++
configure:36483: checking whether the C++ compiler (c++ -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/lib/lib -L/usr/lib/lib -Wl,-rpath,/usr/X11R6/lib/lib -L/usr/X11R6/lib/lib -Wl,-rpath,/lib -L/lib -Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql -Wl,-rpath,/usr/lib/pgsql -L/usr/lib/pgsql) works
configure:36499: c++ -o conftest -DLINUX=22 -DMOD_SSL=208100 -DEAPI -DEAPI_MM -DUSE_EXPAT -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/lib/lib -L/usr/lib/lib -Wl,-rpath,/usr/X11R6/lib/lib -L/usr/X11R6/lib/lib -Wl,-rpath,/lib -L/lib -Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql -Wl,-rpath,/usr/lib/pgsql -L/usr/lib/pgsql conftest.C -lqt -lpspell -lpq -lmysqlclient -lmhash -lldap -llber -lgmp -lt1 -lttf -lgd -lX11 -lXpm -ljpeg -lcurl -lresolv -lm -ldl -lcrypt -lnsl -lresolv -L/usr/lib/lib -ljpeg -L/usr/X11R6/lib/lib -lXpm -L/usr/X11R6/lib/lib -lX11 -L/lib -lt1 1>&5
/usr/bin/ld: cannot find -lqt
collect2: ld returned 1 exit status
configure: failed program was:
#line 36494 "configure"
#include "confdefs.h"
int main(){return(0);}
I have reinstalled all the lates rpm's with respect to binutils, gcc and libc,
libstdc. I have even tried the snapshot of gcc from gnu.org. I am really at a
loss here.
Any help would be greatly appreciated.
--
Lewis Bergman
Texas Communications
4309 Maple St.
Abilene, TX 79602
915-695-6962