[Pkg-gnupg-maint] Bug#710651: Bug#710651: gnupg: FTBFS: ../../util/regcomp.c:528:20: error: unknown type name 'preg'

Stephen Kitt skitt at debian.org
Sun Jun 2 22:53:16 UTC 2013


tag 710651 + patch
thanks

Hi,

On Sun, 2 Jun 2013 15:41:41 +0200, "Didier 'OdyX' Raboud" <odyx at debian.org>
wrote:
> can you take a look at that ? I have no clue how in that area and would 
> appreciate if you could take a look.

On Sat, June 1, 2013 18:38, Andrey Rahmatullin wrote:
> On Fri, May 31, 2013 at 08:37:24PM +0200, David Suárez wrote:  
>> > i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I../../util -I.. -I..  
>> -I../../include -I../../intl    -g -Os -fno-omit-frame-pointer -Wall
>> -Wno-pointer-sign -MT regex.o -MD -MP -MF .deps/regex.Tpo -c -o
>> regex.o ../../util/regex.c  
>> > In file included from ../../util/regex.c:50:0:
>> > ../../util/regcomp.c:528:20: error: unknown type name 'preg'
>> > ../../util/regcomp.c:528:26: error: unknown type name 'errbuf'
>> > ../../util/regcomp.c:528:34: error: unknown type name 'errbuf_size'
>> > ../../util/regcomp.c:533:1: error: expected identifier or '(' before  
>> '{' token  
> The code:
>
> size_t
> regerror (errcode, preg, errbuf, errbuf_size)
>     int errcode;
>     const regex_t *preg;
>     char *errbuf;
>     size_t errbuf_size;
> {
>
>
> So it looks like the i686-w64-mingw32-gcc used doesn't support K&R
> function
> definitions?  

Rest assured, it still supports K&R function definitions. This is a
combination of failures... On Windows, errcode is typedef'ed as int;
mingw-w64 added this recently. This combined with the K&R-style
function declaration means gcc can't compile regcomp.c!

The attached quilt patch fixes this.

While working on this I noticed another problem: the configure script no
longer determines that C symbols need underscores, so the assembler mpi files
don't produce the correct output. I'm trying to find a better fix, but a
quick workaround is to use

build-win32/config.status:
	dh_testdir
	(mkdir -p $(@D); cd $(@D); CFLAGS="-g -Os" \
	    ../configure $(CONFARGS) --host i686-w64-mingw32 \
	    --disable-gnupg-iconv --without-bzip2 --without-readline
	    --without-libcurl --disable-ldap ac_cv_sys_symbol_underscore=yes)

in debian/rules.

Regards,

Stephen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 710651_k_and_r_declarations.patch
Type: text/x-patch
Size: 1049 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnupg-maint/attachments/20130603/43febe14/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnupg-maint/attachments/20130603/43febe14/attachment.pgp>


More information about the Pkg-gnupg-maint mailing list