crtbeginS.o problems linking 32bits DSOs



After an upgrade of my system, I am now getting problems linking 32-
bits DSOs, like:


Linking CXX shared library ../../../../../lib/mentalray35/
exr_shader.so
cd /home/gga/code/Maya/mrLiquid/BUILD/Linux-2.6.22-14-generic-32/
Release/tmp/8.0/mrClasses/GGShaderLib/src && /usr/local/bin/cmake -E
cmake_link_script CMakeFiles/exr_shader.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -O3 -DNDEBUG -m32 -L/lib32 -L/usr/lib32 -export-
dynamic --whole-archive -Bsymbolic -shared -Wl,-soname,exr_shader.so.
0.2 -o ../../../../../lib/mentalray35/exr_shader.so.0.2 "CMakeFiles/
exr_shader.dir/gg_exr_standalone.o" -L../../mrLibrary -L/usr/autodesk/
maya8.0/devkit/mentalray/include/../lib -L/home/gga/code/Maya/mrLiquid/
BUILD/Linux-2.6.22-14-generic-32/Release/lib/mentalray35 -L/usr/local/
lib -lIlmImf -lImath -lIex -lHalf -lIlmThread
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/
x86_64-linux-gnu/4.1.3/crtbeginS.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/
x86_64-linux-gnu/4.1.3/crtendS.o' is incompatible with i386 output
collect2: ld returned 1 exit status


It seems the compiler is picking the wrong crtbeginS/crtendS. I am
wondering where should the 32-bits version of them be stored and how
would I go about getting them.
.



Relevant Pages

  • Re: Scriptbasic - Compiling the generated C code
    ... compiler), which I have used in the past, tell me that it has a GCC ... a command line similar to Microsoft C. ... collect2: ld returned 1 exit status ...
    (comp.os.linux.development.system)
  • Re: Posix fortran and the gnu toolchain
    ... collect2: ld returned 1 exit status ... specifying a library to a compiler via the '-l' switch, ... 'lib' is omitted. ...
    (comp.lang.fortran)
  • Re: installing perl
    ... >>You need to find a working C compiler. ... collect2: ld returned 1 exit status ... You can test for symbolic links with '/usr/bin/test -h'. ...
    (comp.lang.perl.misc)
  • Re: Linking libc *BSD (amd64)
    ... : undefined reference to `main' ... collect2: ld returned 1 exit status ... I am pretty sure the compiler is looking for main, ...
    (alt.lang.asm)
  • Re: Thank You -- Thomas J. Gritzan
    ... realloc() and free. ... My compiler chokes without using the cast for mallocor calloc. ... exit(1); ...
    (comp.lang.c)