Bug#747200: tests: duplicate definition of function main

Michael Tautschnig mt at debian.org
Tue May 6 10:08:56 UTC 2014


Package: gnutls26
Version: 2.12.23-15
Severity: wishlist
Usertags: goto-cc

During a rebuild of all packages in a clean sid chroot (and cowbuilder+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 -std=gnu99 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -I/usr/include/p11-kit-1 -Wl,-z -Wl,relro -o certificate_set_x509_crl certificate_set_x509_crl.o  ../lib/.libs/libgnutls.so ../gl/.libs/libgnu.a ./.libs/libutils.a -L/usr/lib/x86_64-linux-gnu -lgcrypt -lp11-kit -Wl,-rpath -Wl,/srv/jenkins-slave/workspace/sid-goto-cc-gnutls26/gnutls26-2.12.23/lib/.libs -Wl,-rpath -Wl,/usr/lib/x86_64-linux-gnu

error: conflicting function declarations "main"
old definition in module certificate_set_x509_crl file certificate_set_x509_crl.c line 52
signed int (void)
new definition in module utils file utils.c line 130
signed int (signed int argc, char **argv)

Looking at those two declarations, it seems both are actually definitions of
(different) main functions:

http://sources.debian.net/src/gnutls26/2.12.23-15/tests/certificate_set_x509_crl.c#L51
http://sources.debian.net/src/gnutls26/2.12.23-15/tests/utils.c#L129

While the linker might be doing "the right thing" in picking the main function
of certificate_set_x509_crl.c, there is certainly no guarantee for it to do so
(and different linkers may have different behaviour). Consequently one of the
tests may become useless in that the same main function is executed twice rather
than each of them being picked for the separate tests.

Best,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 859 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnutls-maint/attachments/20140506/e9b8babe/attachment.sig>


More information about the Pkg-gnutls-maint mailing list