Package: liboil
Version: 0.3.17-2
Usertags: goto-cc

During a rebuild of all Debian packages in a clean sid chroot (using cowbuilder
and pbuilder) the build failed with the following error. Please note that we
use our research compiler tool-chain (using tools from the cbmc package), which
permits extended reporting on type inconsistencies at link time.

[...]
libtool: link:  gcc -shared  .libs/liboiltmp.o  -Wl,--whole-archive 
./.libs/liboilfunctions.a -Wl,--no-whole-archive  -lm -lrt  -Wl,-z -Wl,relro   
-Wl,-soname -Wl,liboiltmp1.so.0 -Wl,-version-script -Wl,.libs/liboiltmp1.ver -o 
.libs/liboiltmp1.so.0.0.0

error: conflicting function declarations "oil_test_get_source_data"
old definition in module liboiltmp file liboiltmp.c line 7
void (void)
new definition in module idct8x8_c file ../../liboil/liboiltest.h line 109
void * (struct _OilTest *, int)
Makefile:642: recipe for target 'liboiltmp1.la' failed
make[4]: *** [liboiltmp1.la] Error 64
make[4]: Leaving directory 
'/srv/jenkins-slave/workspace/sid-goto-cc-liboil/liboil-0.3.17/liboil'
Makefile:979: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1

So I'm not really sure why liboiltmp.c exists in the first place as dummy
definitions (!) of functions might just shadow a different problem, but having
these with a wrong type just makes things worse. Obviously the default linker
ignores types, but here's what the C standard says:

Quoting 6.2.7 "Compatible and composite type", paragraph 2: "All declarations
that refer to the same object or function shall have compatible type;
otherwise, the behavior is undefined." So what's a compatible type: 6.7.6.3
"Function declarators (including prototypes)", paragraph 15: "For two function
types to be compatible, both shall specify compatible return types.146)
Moreover, the parameter type lists, if both are present, shall agree in the
number of parameters and in use of the ellipsis terminator; corresponding
parameters shall have compatible types. [...]"

Thus, at the very least, these should have a compatible type.

Best,
Michael

Attachment: pgpt9saTbn0_8.pgp
Description: PGP signature

Reply via email to