4

I write a 3D engine in C++ with OpenGL. I usually work on this project on my archlinux 64 bits, but on theese holidays I do on a 32 bits system. I use subversion, and since the last svn up on my 64 bits system, I've got errors :

http://pastebin.be/23730

core, wrapper and interface are compilet using the -fPIC option, I do not understand so ...

Thanks :)

Skypers
  • 41
  • 1
  • You did delete all the .o files from 64-bit land before building on the 32-bit side? – bmargulies Feb 27 '10 at 22:31
  • yes i did, no bin file broadcast through svn – Skypers Feb 27 '10 at 23:19
  • Are you *sure* everything is being compiled with `-fPIC`? The linker obviously doesn't think so. – ephemient Feb 28 '10 at 08:31
  • I thought. A friend explained me make can runs with a "implicit rule". There was some troubles with that, and although I wrote "-fPIC", they weren't done. I really don't know why ... I placed -fPIC in the CXXFLAGS (before -fPIC was be in the "%.o" rule), and it works since. – Skypers Mar 01 '10 at 00:57
  • Did you already read this http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3 ? – coelhudo Mar 02 '10 at 21:41
  • a more complete answer was provided 14 months later to similar question: http://stackoverflow.com/questions/6093547/what-does-r-x86-64-32s-relocation-mean – marcin Mar 01 '12 at 17:22

2 Answers2

2

It appears to be a relocation error, some of your files aren't being compiled with -fPIC. Change your flags to include -fPIC and then do a make clean before building again.

Joe D
  • 2,855
  • 2
  • 31
  • 25
0

Relocation errors like these are almost always generated when fubar'ing 32 and 64bit build options. These happen when using options like -m64 or -march=medium in your build, which forces things to 64bit, which is something you don't want at this time.

  • I don't think so. If the architectures don't match, you'd get an error more like `ld: i386 architecture of input file '32.o' is incompatible with i386:x86-64 output` – ephemient Feb 28 '10 at 16:34