[ODE] [fix] ode doesn't compile on 64 bit platforms

Russell Smith russ at q12.org
Tue Dec 6 19:43:16 MST 2005


i've applied your patch. thanks!

russ.

On 12/5/05, Dmitry Marakasov <amdmi3 at mail.ru> wrote:
> Hi Russell!
>
> There seem to be a problem when compiling ode library on non-x86 archs
> (i.e. amd64, ia64). I've ran into this when porting XMoto game
> (xmoto.sf.net) to freebsd - this game use ode, but ode ports are marked
> broken for non-x86 archs in the FreeBSD ports collection, as ode doesn't
> compile on these.
>
> I've done some investigation and with help of some testers (I personally
> have only i386 machines in the vicinity) came out with the following:
>
> On amd64 there these errors come out when compiling timer.cpp:
>
> c++ -Iinclude -c   -fno-exceptions  -fomit-frame-pointer -O -pipe -I/usr/X11R6/include   -DdNODEBUG -o ode/src/timer.o ode/src/timer.cpp
> {standard input}: Assembler messages:
> {standard input}:62: Error: `(%esi)' is not a valid 64 bit base/index expression
> {standard input}:63: Error: `4(%esi)' is not a valid 64 bit base/index expression
> {standard input}:86: Error: `(%esi)' is not a valid 64 bit base/index expression
> {standard input}:87: Error: `4(%esi)' is not a valid 64 bit base/index expression
> {standard input}:172: Error: `(%esi)' is not a valid 64 bit base/index expression
> {standard input}:173: Error: `4(%esi)' is not a valid 64 bit base/index expression
> {standard input}:194: Error: `(%esi)' is not a valid 64 bit base/index expression
> {standard input}:195: Error: `4(%esi)' is not a valid 64 bit base/index expression
> {standard input}:234: Error: `(%esi)' is not a valid 64 bit base/index expression
> {standard input}:235: Error: `4(%esi)' is not a valid 64 bit base/index expression
> gmake: *** [ode/src/timer.o] Error 1
> *** Error code 2
>
> That is caused by bug in configurator.c, which, because of weak testing
> for pentium compatibility, wrongly adds '#define PENTIUM 1' line in
> config.h on 64 bit systems.
>
> Configurator uses this assembly code in the test:
>
> mov $0, %eax
> cpuid
>
> while it should also at least test addressing scheme like this:
>
> mov %eax,(%esi)
>
> Patch for last snapshot version is attached. It is untested, though,
> but it definitely doesn't break ode build process on i386, and should
> fix build on 64 bit platforms. Using uninitialized esi as a pointer is
> surely ugly, but as that test code won't be run I think it's ok.
>
> It would be great it this issue gets fixed in the next release :)
> Thank you very much for your work.
>
> --
> Best regards,
>  Dmitry                          mailto:amdmi3 at mail.ru
>
>
>


--
Russ Smith
http://www.q12.org/



More information about the ODE mailing list