This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: gcc 3.2 64 bit compiler error
- From: "Hillel (Sabba) Markowitz" <sabbahem at bcpl dot net>
- To: gcc-help at gcc dot gnu dot org
- Cc: sherwin at nlm dot nih dot gov
- Date: Thu, 24 Oct 2002 17:08:32 -0400
- Subject: RE: gcc 3.2 64 bit compiler error
----------------- Original Message -----------------------------------------
From: Ziying Sherwin <sherwin at lhc dot nlm dot nih dot gov>
To: gcc-help at gcc dot gnu dot org
Date: Wed, 23 Oct 2002 15:35:29 -0400 (EDT)
Subject: gcc 3.2 64 bit compiler error
We recently built and installed gcc 3.2 64bit compiler. It works fine with any
programs that requires 64 bits compiler. However, we kept getting the
following
error messages when we tried to build normal applications:
gcc -pipe -o expect exp_main_exp.o libexpect5.38.a
-L/depot/package/tcl_8.3.1/lib -ltcl8.3 -ldl -lsocket -lnsl -lpthread -lm
-Wl,-R,/depot/package/expect_5.38/vendor/lib:/depot/package/tk_8.3.1/lib:/depo
t/package/tcl_8.3.1/lib:/usr/openwin/lib
ld: fatal: file /depot/package/tcl_8.3.1/lib/libtcl8.3.so: wrong ELF class:
ELFCLASS32
ld: fatal: File processing errors. No output written to expect
collect2: ld returned 1 exit status
Any suggestions? Thanks. I am not on the gcc mailing list, please send your
response to sherwin@nlm.nih.gov.
Ziying Sherwin
----------------------- End of Message --------------------------------------
You do not specify which platform you are running on. However, it appears
that the gcc that you are using is built so that the default is 64 bit
compilation. The tcl library on the other hand was built in 32 bit mode. If
you are using a Solaris platform, use the option "-m32" to build in 32 bit
mode.
In any case, you will be better off if you always use the -m32 and -m64 (or
equivalent for your platform) explicitly. That way you will not get bitten if
the default changes.
If you are using Solaris, you should also use the -R option as well as the -L
option for linking. That way the application will pick up the correct run
time library.
--
Said the fox to the fish, "Join me ashore".
The fish are the Jews, Torah is our water
Hillel (Sabba) Markowitz - sabbahem@bcpl.net