[ODE] BUG? autotools double compilation, leads to compilation flag ignore for libode.so

Tanguy Fautre tanguy.fautre at spaceapplications.com
Mon Apr 3 04:35:14 MST 2006


Hi,

While trying to fix the -fPIC problem on Linux x86_64, I just uncovered 
what may be a serious problem in the autotools make.

If you look closely at the make output you'll see that:

1/ libode.a source files are compiled
2/ libOPCODE.a source files are compiled
3/ libOPCODE.a is linked/created
4/ libode.a is linked/created
5/ ode and OPCODE source files are re-compiled
6/ libode.so is linked/created


As you can see, step 5 is completely redundant, but more importantly 
could be quite erroneous.

The problem is that step 5 seems to be ignoring all the compilation 
flags used by steps 1 & 2. Hence, -O2 and co are completely ignored.

If I didn't make any mistakes, this means that:

- output is always an unoptimized libode.so (which is quite slower), 
however libode.a is fine.

- it's nearly impossible to fix the -fPIC problem on Linux x86_64

- it may invalidate some previous commit I did (i.e. -O2 
-fno-strict-aliasing for OPCODE), as they are in fact untested.


PS:
- used ./configure --enable-release --with-opcode --with-double-precision

- tested on Debian unstable x86 and Debian AMD64.


Tanguy



More information about the ODE mailing list