Debian Bug report logs - #677861
lftp: FTBFS[kfreebsd-i386]: error: conflicting declaration 'typedef __int32_t gl_intptr_t'

version graph

Package: src:lftp; Maintainer for src:lftp is Noël Köthe <noel@debian.org>;

Reported by: debian-bsd@lists.debian.org

Date: Sun, 17 Jun 2012 10:28:10 UTC

Severity: serious

Tags: patch, sid, upstream, wheezy

Found in versions lftp/4.3.7-1, lftp/4.3.6-1

Fixed in versions lftp/4.3.8-1.1, lftp/4.3.6-1+deb7u1

Done: Ivo De Decker <ivo.dedecker@ugent.be>

Bug is archived. No further changes may be made.

Forwarded to http://univ.uniyar.ac.ru/pipermail/lftp-devel/2012-July/000028.html

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, debian-bsd@lists.debian.org, Noël Köthe <noel@debian.org>:
Bug#677861; Package src:lftp. (Sun, 17 Jun 2012 10:28:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to debian-bsd@lists.debian.org:
New Bug report received and forwarded. Copy sent to debian-bsd@lists.debian.org, Noël Köthe <noel@debian.org>. (Sun, 17 Jun 2012 10:28:17 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Christoph Egger <christoph@debian.org>
To: submit@bugs.debian.org
Subject: lftp: FTBFS[kfreebsd-i386]: error: conflicting declaration 'typedef __int32_t gl_intptr_t'
Date: Sun, 17 Jun 2012 12:27:17 +0200
Package: src:lftp
Version: 4.3.7-1
Severity: serious
Tags: sid wheezy
User: debian-bsd@lists.debian.org
Usertags: kfreebsd
X-Debbugs-Cc: debian-bsd@lists.debian.org
Justification: fails to build from source (but built successfully in the past)

Hi!

Your package failed to build on the kfreebsd-i386 buildds:

/bin/bash ../libtool --silent --tag=CXX   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../lib -I../lib -I../trio  -I/usr/include/p11-kit-1    -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -g -Wall -Wall -Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti -fno-implement-inlines -MT Resolver.lo -MD -MP -MF .deps/Resolver.Tpo -c -o Resolver.lo Resolver.cc
In file included from /usr/include/sys/kern/types.h:71:0,
                 from /usr/include/sys/kern/param.h:67,
                 from /usr/include/osreldate.h:1,
                 from /usr/include/i386-kfreebsd-gnu/sys/param.h:39,
                 from /usr/include/arpa/nameser.h:59,
                 from Resolver.cc:40:
/usr/include/sys/_stdint.h:74:21: error: conflicting declaration 'typedef __int32_t gl_intptr_t'
In file included from /usr/include/netinet/in.h:24:0,
                 from network.h:33,
                 from Resolver.h:29,
                 from Resolver.cc:25:
../lib/stdint.h:295:18: error: 'gl_intptr_t' has a previous declaration as 'typedef long int gl_intptr_t'
In file included from /usr/include/sys/kern/types.h:71:0,
                 from /usr/include/sys/kern/param.h:67,
                 from /usr/include/osreldate.h:1,
                 from /usr/include/i386-kfreebsd-gnu/sys/param.h:39,
                 from /usr/include/arpa/nameser.h:59,
                 from Resolver.cc:40:
/usr/include/sys/_stdint.h:78:22: error: conflicting declaration 'typedef __uintptr_t gl_uintptr_t'
In file included from /usr/include/netinet/in.h:24:0,
                 from network.h:33,
                 from Resolver.h:29,
                 from Resolver.cc:25:
../lib/stdint.h:296:27: error: 'gl_uintptr_t' has a previous declaration as 'typedef long unsigned int gl_uintptr_t'
make[2]: *** [Resolver.lo] Error 1
make[2]: Leaving directory `/build/buildd-lftp_4.3.7-1-kfreebsd-i386-lAjblU/lftp-4.3.7/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/build/buildd-lftp_4.3.7-1-kfreebsd-i386-lAjblU/lftp-4.3.7'
make: *** [build-stamp] Error 2
dpkg-buildpackage: error: debian/rules build-arch gave error exit status
2

Full build log at
https://buildd.debian.org/status/fetch.php?pkg=lftp&arch=kfreebsd-i386&ver=4.3.7-1&stamp=1339520753

Regards

    Christoph

If you have further questions please mail debian-bsd@lists.debian.org

-- 
9FED 5C6C E206 B70A 5857  70CA 9655 22B9 D49A E731
Debian Developer | Lisp Hacker | CaCert Assurer




Information forwarded to debian-bugs-dist@lists.debian.org, Noël Köthe <noel@debian.org>:
Bug#677861; Package src:lftp. (Thu, 21 Jun 2012 17:48:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Millan <rmh@debian.org>:
Extra info received and forwarded to list. Copy sent to Noël Köthe <noel@debian.org>. (Thu, 21 Jun 2012 17:48:06 GMT) Full text and rfc822 format available.

Message #10 received at 677861@bugs.debian.org (full text, mbox):

From: Robert Millan <rmh@debian.org>
To: debian-bsd@lists.debian.org, 677861@bugs.debian.org
Subject: Re: Bug#677861: lftp: FTBFS[kfreebsd-i386]: error: conflicting declaration 'typedef __int32_t gl_intptr_t'
Date: Thu, 21 Jun 2012 19:44:48 +0200
2012/6/17 Christoph Egger <christoph@debian.org>:
> ../lib/stdint.h:295:18: error: 'gl_intptr_t' has a previous declaration as 'typedef long int gl_intptr_t'

The problem is that lib/stdint.h is hijacking system headers with
definitions such as:

#define intptr_t gl_intptr_t
#define uintptr_t gl_uintptr_t

causing them to missbehave. These defines need to be removed. If you
want intptr_t, etc, you can get them from <stdint.h> as usual.

-- 
Robert Millan




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#677861; Package src:lftp. (Thu, 05 Jul 2012 22:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Noël Köthe <noel@debian.org>:
Extra info received and forwarded to list. (Thu, 05 Jul 2012 22:15:03 GMT) Full text and rfc822 format available.

Message #15 received at 677861@bugs.debian.org (full text, mbox):

From: Noël Köthe <noel@debian.org>
To: Robert Millan <rmh@debian.org>, 677861@bugs.debian.org
Cc: debian-bsd@lists.debian.org, control <control@bugs.debian.org>
Subject: Re: Bug#677861: lftp: FTBFS[kfreebsd-i386]: error: conflicting declaration 'typedef __int32_t gl_intptr_t'
Date: Fri, 06 Jul 2012 00:12:17 +0200
[Message part 1 (text/plain, inline)]
tags 677861 + upstream
forwarded 677861 lftp-devel@uniyar.ac.ru
thanks

Hello,

Am Donnerstag, den 21.06.2012, 19:44 +0200 schrieb Robert Millan:
> 2012/6/17 Christoph Egger <christoph@debian.org>:
> > ../lib/stdint.h:295:18: error: 'gl_intptr_t' has a previous declaration as 'typedef long int gl_intptr_t'
> 
> The problem is that lib/stdint.h is hijacking system headers with
> definitions such as:
> 
> #define intptr_t gl_intptr_t
> #define uintptr_t gl_uintptr_t
> 
> causing them to missbehave. These defines need to be removed. If you
> want intptr_t, etc, you can get them from <stdint.h> as usual.

Thanks for the report and the comment. I forwarded it to the upstream
mailinglist.

-- 
Noël Köthe <noel debian.org>
Debian GNU/Linux, www.debian.org
[signature.asc (application/pgp-signature, inline)]

Added tag(s) upstream. Request was from Noël Köthe <noel@debian.org> to control@bugs.debian.org. (Thu, 05 Jul 2012 22:15:04 GMT) Full text and rfc822 format available.

Set Bug forwarded-to-address to 'lftp-devel@uniyar.ac.ru'. Request was from Noël Köthe <noel@debian.org> to control@bugs.debian.org. (Thu, 05 Jul 2012 22:15:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Noël Köthe <noel@debian.org>:
Bug#677861; Package src:lftp. (Sat, 11 Aug 2012 12:09:05 GMT) Full text and rfc822 format available.

Message #22 received at 677861@bugs.debian.org (full text, mbox):

From: Jakub Wilk <jwilk@debian.org>
To: 677861@bugs.debian.org
Cc: debian-bsd@lists.debian.org
Subject: Re: Bug#677861: lftp: FTBFS[kfreebsd-i386]: error: conflicting declaration 'typedef __int32_t gl_intptr_t'
Date: Sat, 11 Aug 2012 14:04:55 +0200
Control: found -1 4.3.6-1

>>The problem is that lib/stdint.h is hijacking system headers with 
>>definitions such as:
>>
>>#define intptr_t gl_intptr_t
>>#define uintptr_t gl_uintptr_t

But the purpose of lib/stdint.h is:
| /*
|  * ISO C 99 <stdint.h> for platforms that lack it.
|  * <http://www.opengroup.org/susv3xbd/stdint.h.html>
|  */

Now the question is: why is this file being used in the first place?

>Thanks for the report and the comment. I forwarded it to the upstream 
>mailinglist.

N.b. I can't find your e-mail in the lftp-devel archives.

-- 
Jakub Wilk



Marked as found in versions lftp/4.3.6-1. Request was from Jakub Wilk <jwilk@debian.org> to 677861-submit@bugs.debian.org. (Sat, 11 Aug 2012 12:09:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#677861; Package src:lftp. (Wed, 15 Aug 2012 19:09:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Noël Köthe <noel@debian.org>:
Extra info received and forwarded to list. (Wed, 15 Aug 2012 19:09:05 GMT) Full text and rfc822 format available.

Message #29 received at 677861@bugs.debian.org (full text, mbox):

From: Noël Köthe <noel@debian.org>
To: Jakub Wilk <jwilk@debian.org>, 677861@bugs.debian.org
Cc: debian-bsd@lists.debian.org, control <control@bugs.debian.org>
Subject: Re: Bug#677861: lftp: FTBFS[kfreebsd-i386]: error: conflicting declaration 'typedef __int32_t gl_intptr_t'
Date: Wed, 15 Aug 2012 21:00:55 +0200
[Message part 1 (text/plain, inline)]
forwarded 677861 http://univ.uniyar.ac.ru/pipermail/lftp-devel/2012-July/000028.html
thanks

Hello Jakub,

Am Samstag, den 11.08.2012, 14:04 +0200 schrieb Jakub Wilk:

> >Thanks for the report and the comment. I forwarded it to the upstream 
> >mailinglist.
> 
> N.b. I can't find your e-mail in the lftp-devel archives.

yes, you were right. I asked Alexander the upstream author about and the
mail was in the mailman queue. It was now approved and it is available
in the mailinglist archive (see URL above). He will look at the problem.

Thanks for the hint.

-- 
Noël Köthe <noel debian.org>
Debian GNU/Linux, www.debian.org
[signature.asc (application/pgp-signature, inline)]

Changed Bug forwarded-to-address to 'http://univ.uniyar.ac.ru/pipermail/lftp-devel/2012-July/000028.html' from 'lftp-devel@uniyar.ac.ru' Request was from Noël Köthe <noel@debian.org> to control@bugs.debian.org. (Wed, 15 Aug 2012 19:09:07 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Noël Köthe <noel@debian.org>:
Bug#677861; Package src:lftp. (Sun, 14 Oct 2012 16:18:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steve McIntyre <steve@einval.com>:
Extra info received and forwarded to list. Copy sent to Noël Köthe <noel@debian.org>. (Sun, 14 Oct 2012 16:18:09 GMT) Full text and rfc822 format available.

Message #36 received at 677861@bugs.debian.org (full text, mbox):

From: Steve McIntyre <steve@einval.com>
To: noel@debian.org, 677861@bugs.debian.org
Cc: Jakub Wilk <jwilk@debian.org>, debian-bsd@lists.debian.org
Subject: Re: Bug#677861: lftp: FTBFS[kfreebsd-i386]: error: conflicting declaration 'typedef __int32_t gl_intptr_t'
Date: Sun, 14 Oct 2012 17:16:09 +0100
On Wed, Aug 15, 2012 at 09:00:55PM +0200, Noël Köthe wrote:
>forwarded 677861 http://univ.uniyar.ac.ru/pipermail/lftp-devel/2012-July/000028.html
>thanks
>
>Hello Jakub,
>
>Am Samstag, den 11.08.2012, 14:04 +0200 schrieb Jakub Wilk:
>
>> >Thanks for the report and the comment. I forwarded it to the upstream 
>> >mailinglist.
>> 
>> N.b. I can't find your e-mail in the lftp-devel archives.
>
>yes, you were right. I asked Alexander the upstream author about and the
>mail was in the mailman queue. It was now approved and it is available
>in the mailinglist archive (see URL above). He will look at the problem.
>
>Thanks for the hint.

Hi Noël,

Do you have any plan for getting this fixed so that we can ship lftp
with Wheezy? I can see that you've uploaded a new upstream version
since this was reported (and 4.3.8-1 looks to build OK on a test
machine for me), but the changes for from 4.3.6-1 (in current testing)
to 4.3.8-1 (current unstable) are *huge*, way too big for the release
team to accept them in my experience.

I would expect that a focussed TPU upload with just the changes needed
to fix kfreebsd building is much more likely to make it into wheezy.

-- 
Steve McIntyre, Cambridge, UK.                                steve@einval.com
Into the distance, a ribbon of black
Stretched to the point of no turning back




Information forwarded to debian-bugs-dist@lists.debian.org, Noël Köthe <noel@debian.org>:
Bug#677861; Package src:lftp. (Tue, 30 Oct 2012 20:21:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Henriksson <andreas@fatal.se>:
Extra info received and forwarded to list. Copy sent to Noël Köthe <noel@debian.org>. (Tue, 30 Oct 2012 20:21:06 GMT) Full text and rfc822 format available.

Message #41 received at 677861@bugs.debian.org (full text, mbox):

From: Andreas Henriksson <andreas@fatal.se>
To: Robert Millan <rmh@debian.org>
Cc: debian-bsd@lists.debian.org, 677861@bugs.debian.org
Subject: Re: Bug#677861: lftp: FTBFS[kfreebsd-i386]: error: conflicting declaration 'typedef __int32_t gl_intptr_t'
Date: Tue, 30 Oct 2012 21:18:08 +0100
Hello Robert Millan!

On Thu, Jun 21, 2012 at 07:44:48PM +0200, Robert Millan wrote:
> 2012/6/17 Christoph Egger <christoph@debian.org>:
> > ../lib/stdint.h:295:18: error: 'gl_intptr_t' has a previous declaration as 'typedef long int gl_intptr_t'
> 
> The problem is that lib/stdint.h is hijacking system headers with
> definitions such as:
> 
> #define intptr_t gl_intptr_t
> #define uintptr_t gl_uintptr_t

It also does "undef" prior to that. So if system headers got
included first, it should work.... but it seems it gets included
after (and that's why it looks like the system header is defining
gl_intptr_t when it's really typedefing intptr_t).

Looks like lib/stdint.in.h tries to include the system header first,
if it has been detected as existing (and configure output seems to
indicate that it did find it).

I guess someone needs to untangle all the preprocessor and configure
macros in lib/stdint.in.h.
If someone from the kfreebsd camp could post the generated lib/stdint.h
that would be helpful to be able to see things a bit more clearly.

> 
> causing them to missbehave. These defines need to be removed. If you
> want intptr_t, etc, you can get them from <stdint.h> as usual.

Just removing this part of stdint.in.h could be used as a hack to get things
to build on kfreebsd (since it's not used on linux), sure. That's not
suitable for upstream though....
Another possibility to hack around the problem could be to add
"#define __intptr_t_defined" to stdint.in.h. Still ugly, but would
hopefully avoid breaking (upstream target) platforms that do need
the (re)defines.

Begs to be asked why kfreebsd headers aren't C99 compatible though... or
are the configure tests invalid? Or wait, I don't want to know.

-- 
Andreas Henriksson



Information forwarded to debian-bugs-dist@lists.debian.org, Noël Köthe <noel@debian.org>:
Bug#677861; Package src:lftp. (Tue, 30 Oct 2012 21:09:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christoph Egger <christoph@debian.org>:
Extra info received and forwarded to list. Copy sent to Noël Köthe <noel@debian.org>. (Tue, 30 Oct 2012 21:09:04 GMT) Full text and rfc822 format available.

Message #46 received at 677861@bugs.debian.org (full text, mbox):

From: Christoph Egger <christoph@debian.org>
To: Andreas Henriksson <andreas@fatal.se>
Cc: Robert Millan <rmh@debian.org>, debian-bsd@lists.debian.org, 677861@bugs.debian.org
Subject: Re: Bug#677861: lftp: FTBFS[kfreebsd-i386]: error: conflicting declaration 'typedef __int32_t gl_intptr_t'
Date: Tue, 30 Oct 2012 14:04:42 -0700
[Message part 1 (text/plain, inline)]
Andreas Henriksson <andreas@fatal.se> writes:
> I guess someone needs to untangle all the preprocessor and configure
> macros in lib/stdint.in.h.
> If someone from the kfreebsd camp could post the generated lib/stdint.h
> that would be helpful to be able to see things a bit more clearly.

For the version in wheezy

[stdint.h (text/x-chdr, inline)]
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Copyright (C) 2001-2002, 2004-2012 Free Software Foundation, Inc.
   Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
   This file is part of gnulib.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, see <http://www.gnu.org/licenses/>.  */

/*
 * ISO C 99 <stdint.h> for platforms that lack it.
 * <http://www.opengroup.org/susv3xbd/stdint.h.html>
 */

#ifndef _GL_STDINT_H

#if __GNUC__ >= 3
#pragma GCC system_header
#endif


/* When including a system file that in turn includes <inttypes.h>,
   use the system <inttypes.h>, not our substitute.  This avoids
   problems with (for example) VMS, whose <sys/bitypes.h> includes
   <inttypes.h>.  */
#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H

/* On Android (Bionic libc), <sys/types.h> includes this file before
   having defined 'time_t'.  Therefore in this case avoid including
   other system header files; just include the system's <stdint.h>.
   Ideally we should test __BIONIC__ here, but it is only defined after
   <sys/cdefs.h> has been included; hence test __ANDROID__ instead.  */
#if defined __ANDROID__ \
    && defined _SYS_TYPES_H_ && !defined _SSIZE_T_DEFINED_
# include_next <stdint.h>
#else

/* Get those types that are already defined in other system include
   files, so that we can "#define int8_t signed char" below without
   worrying about a later system include file containing a "typedef
   signed char int8_t;" that will get messed up by our macro.  Our
   macros should all be consistent with the system versions, except
   for the "fast" types and macros, which we recommend against using
   in public interfaces due to compiler differences.  */

#if 1
# if defined __sgi && ! defined __c99
   /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users
      with "This header file is to be used only for c99 mode compilations"
      diagnostics.  */
#  define __STDINT_H__
# endif

  /* Some pre-C++11 <stdint.h> implementations need this.  */
# ifdef __cplusplus
#  ifndef __STDC_CONSTANT_MACROS
#   define __STDC_CONSTANT_MACROS 1
#  endif
#  ifndef __STDC_LIMIT_MACROS
#   define __STDC_LIMIT_MACROS 1
#  endif
# endif

  /* Other systems may have an incomplete or buggy <stdint.h>.
     Include it before <inttypes.h>, since any "#include <stdint.h>"
     in <inttypes.h> would reinclude us, skipping our contents because
     _GL_STDINT_H is defined.
     The include_next requires a split double-inclusion guard.  */
# include_next <stdint.h>
#endif

#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
#define _GL_STDINT_H

/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
   IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
   AIX 5.2 <sys/types.h> isn't needed and causes troubles.
   MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
   relies on the system <stdint.h> definitions, so include
   <sys/types.h> after <stdint.h>.  */
#if 1 && ! defined _AIX
# include <sys/types.h>
#endif

/* Get LONG_MIN, LONG_MAX, ULONG_MAX.  */
#include <limits.h>

#if 1
  /* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
     int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
     <inttypes.h> also defines intptr_t and uintptr_t.  */
# include <inttypes.h>
#elif 0
  /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
     the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX.  */
# include <sys/inttypes.h>
#endif

#if 1 && ! defined __BIT_TYPES_DEFINED__
  /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
     int{8,16,32,64}_t and __BIT_TYPES_DEFINED__.  In libc5 >= 5.2.2 it is
     included by <sys/types.h>.  */
# include <sys/bitypes.h>
#endif

#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H

/* Minimum and maximum values for an integer type under the usual assumption.
   Return an unspecified value if BITS == 0, adding a check to pacify
   picky compilers.  */

#define _STDINT_MIN(signed, bits, zero) \
  ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero))

#define _STDINT_MAX(signed, bits, zero) \
  ((signed) \
   ? ~ _STDINT_MIN (signed, bits, zero) \
   : /* The expression for the unsigned case.  The subtraction of (signed) \
        is a nop in the unsigned case and avoids "signed integer overflow" \
        warnings in the signed case.  */ \
     ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)

#if !GNULIB_defined_stdint_types

/* 7.18.1.1. Exact-width integer types */

/* Here we assume a standard architecture where the hardware integer
   types have 8, 16, 32, optionally 64 bits.  */

#undef int8_t
#undef uint8_t
typedef signed char gl_int8_t;
typedef unsigned char gl_uint8_t;
#define int8_t gl_int8_t
#define uint8_t gl_uint8_t

#undef int16_t
#undef uint16_t
typedef short int gl_int16_t;
typedef unsigned short int gl_uint16_t;
#define int16_t gl_int16_t
#define uint16_t gl_uint16_t

#undef int32_t
#undef uint32_t
typedef int gl_int32_t;
typedef unsigned int gl_uint32_t;
#define int32_t gl_int32_t
#define uint32_t gl_uint32_t

/* If the system defines INT64_MAX, assume int64_t works.  That way,
   if the underlying platform defines int64_t to be a 64-bit long long
   int, the code below won't mistakenly define it to be a 64-bit long
   int, which would mess up C++ name mangling.  We must use #ifdef
   rather than #if, to avoid an error with HP-UX 10.20 cc.  */

#ifdef INT64_MAX
# define GL_INT64_T
#else
/* Do not undefine int64_t if gnulib is not being used with 64-bit
   types, since otherwise it breaks platforms like Tandem/NSK.  */
# if LONG_MAX >> 31 >> 31 == 1
#  undef int64_t
typedef long int gl_int64_t;
#  define int64_t gl_int64_t
#  define GL_INT64_T
# elif defined _MSC_VER
#  undef int64_t
typedef __int64 gl_int64_t;
#  define int64_t gl_int64_t
#  define GL_INT64_T
# elif 1
#  undef int64_t
typedef long long int gl_int64_t;
#  define int64_t gl_int64_t
#  define GL_INT64_T
# endif
#endif

#ifdef UINT64_MAX
# define GL_UINT64_T
#else
# if ULONG_MAX >> 31 >> 31 >> 1 == 1
#  undef uint64_t
typedef unsigned long int gl_uint64_t;
#  define uint64_t gl_uint64_t
#  define GL_UINT64_T
# elif defined _MSC_VER
#  undef uint64_t
typedef unsigned __int64 gl_uint64_t;
#  define uint64_t gl_uint64_t
#  define GL_UINT64_T
# elif 1
#  undef uint64_t
typedef unsigned long long int gl_uint64_t;
#  define uint64_t gl_uint64_t
#  define GL_UINT64_T
# endif
#endif

/* Avoid collision with Solaris 2.5.1 <pthread.h> etc.  */
#define _UINT8_T
#define _UINT32_T
#define _UINT64_T


/* 7.18.1.2. Minimum-width integer types */

/* Here we assume a standard architecture where the hardware integer
   types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
   are the same as the corresponding N_t types.  */

#undef int_least8_t
#undef uint_least8_t
#undef int_least16_t
#undef uint_least16_t
#undef int_least32_t
#undef uint_least32_t
#undef int_least64_t
#undef uint_least64_t
#define int_least8_t int8_t
#define uint_least8_t uint8_t
#define int_least16_t int16_t
#define uint_least16_t uint16_t
#define int_least32_t int32_t
#define uint_least32_t uint32_t
#ifdef GL_INT64_T
# define int_least64_t int64_t
#endif
#ifdef GL_UINT64_T
# define uint_least64_t uint64_t
#endif

/* 7.18.1.3. Fastest minimum-width integer types */

/* Note: Other <stdint.h> substitutes may define these types differently.
   It is not recommended to use these types in public header files. */

/* Here we assume a standard architecture where the hardware integer
   types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
   are taken from the same list of types.  Assume that 'long int'
   is fast enough for all narrower integers.  */

#undef int_fast8_t
#undef uint_fast8_t
#undef int_fast16_t
#undef uint_fast16_t
#undef int_fast32_t
#undef uint_fast32_t
#undef int_fast64_t
#undef uint_fast64_t
typedef long int gl_int_fast8_t;
typedef unsigned long int gl_uint_fast8_t;
typedef long int gl_int_fast16_t;
typedef unsigned long int gl_uint_fast16_t;
typedef long int gl_int_fast32_t;
typedef unsigned long int gl_uint_fast32_t;
#define int_fast8_t gl_int_fast8_t
#define uint_fast8_t gl_uint_fast8_t
#define int_fast16_t gl_int_fast16_t
#define uint_fast16_t gl_uint_fast16_t
#define int_fast32_t gl_int_fast32_t
#define uint_fast32_t gl_uint_fast32_t
#ifdef GL_INT64_T
# define int_fast64_t int64_t
#endif
#ifdef GL_UINT64_T
# define uint_fast64_t uint64_t
#endif

/* 7.18.1.4. Integer types capable of holding object pointers */

#undef intptr_t
#undef uintptr_t
typedef long int gl_intptr_t;
typedef unsigned long int gl_uintptr_t;
#define intptr_t gl_intptr_t
#define uintptr_t gl_uintptr_t

/* 7.18.1.5. Greatest-width integer types */

/* Note: These types are compiler dependent. It may be unwise to use them in
   public header files. */

/* If the system defines INTMAX_MAX, assume that intmax_t works, and
   similarly for UINTMAX_MAX and uintmax_t.  This avoids problems with
   assuming one type where another is used by the system.  */

#ifndef INTMAX_MAX
# undef INTMAX_C
# undef intmax_t
# if 1 && LONG_MAX >> 30 == 1
typedef long long int gl_intmax_t;
#  define intmax_t gl_intmax_t
# elif defined GL_INT64_T
#  define intmax_t int64_t
# else
typedef long int gl_intmax_t;
#  define intmax_t gl_intmax_t
# endif
#endif

#ifndef UINTMAX_MAX
# undef UINTMAX_C
# undef uintmax_t
# if 1 && ULONG_MAX >> 31 == 1
typedef unsigned long long int gl_uintmax_t;
#  define uintmax_t gl_uintmax_t
# elif defined GL_UINT64_T
#  define uintmax_t uint64_t
# else
typedef unsigned long int gl_uintmax_t;
#  define uintmax_t gl_uintmax_t
# endif
#endif

/* Verify that intmax_t and uintmax_t have the same size.  Too much code
   breaks if this is not the case.  If this check fails, the reason is likely
   to be found in the autoconf macros.  */
typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
                                ? 1 : -1];

#define GNULIB_defined_stdint_types 1
#endif /* !GNULIB_defined_stdint_types */

/* 7.18.2. Limits of specified-width integer types */

/* 7.18.2.1. Limits of exact-width integer types */

/* Here we assume a standard architecture where the hardware integer
   types have 8, 16, 32, optionally 64 bits.  */

#undef INT8_MIN
#undef INT8_MAX
#undef UINT8_MAX
#define INT8_MIN  (~ INT8_MAX)
#define INT8_MAX  127
#define UINT8_MAX  255

#undef INT16_MIN
#undef INT16_MAX
#undef UINT16_MAX
#define INT16_MIN  (~ INT16_MAX)
#define INT16_MAX  32767
#define UINT16_MAX  65535

#undef INT32_MIN
#undef INT32_MAX
#undef UINT32_MAX
#define INT32_MIN  (~ INT32_MAX)
#define INT32_MAX  2147483647
#define UINT32_MAX  4294967295U

#if defined GL_INT64_T && ! defined INT64_MAX
/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
   evaluates the latter incorrectly in preprocessor expressions.  */
# define INT64_MIN  (- INTMAX_C (1) << 63)
# define INT64_MAX  INTMAX_C (9223372036854775807)
#endif

#if defined GL_UINT64_T && ! defined UINT64_MAX
# define UINT64_MAX  UINTMAX_C (18446744073709551615)
#endif

/* 7.18.2.2. Limits of minimum-width integer types */

/* Here we assume a standard architecture where the hardware integer
   types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
   are the same as the corresponding N_t types.  */

#undef INT_LEAST8_MIN
#undef INT_LEAST8_MAX
#undef UINT_LEAST8_MAX
#define INT_LEAST8_MIN  INT8_MIN
#define INT_LEAST8_MAX  INT8_MAX
#define UINT_LEAST8_MAX  UINT8_MAX

#undef INT_LEAST16_MIN
#undef INT_LEAST16_MAX
#undef UINT_LEAST16_MAX
#define INT_LEAST16_MIN  INT16_MIN
#define INT_LEAST16_MAX  INT16_MAX
#define UINT_LEAST16_MAX  UINT16_MAX

#undef INT_LEAST32_MIN
#undef INT_LEAST32_MAX
#undef UINT_LEAST32_MAX
#define INT_LEAST32_MIN  INT32_MIN
#define INT_LEAST32_MAX  INT32_MAX
#define UINT_LEAST32_MAX  UINT32_MAX

#undef INT_LEAST64_MIN
#undef INT_LEAST64_MAX
#ifdef GL_INT64_T
# define INT_LEAST64_MIN  INT64_MIN
# define INT_LEAST64_MAX  INT64_MAX
#endif

#undef UINT_LEAST64_MAX
#ifdef GL_UINT64_T
# define UINT_LEAST64_MAX  UINT64_MAX
#endif

/* 7.18.2.3. Limits of fastest minimum-width integer types */

/* Here we assume a standard architecture where the hardware integer
   types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
   are taken from the same list of types.  */

#undef INT_FAST8_MIN
#undef INT_FAST8_MAX
#undef UINT_FAST8_MAX
#define INT_FAST8_MIN  LONG_MIN
#define INT_FAST8_MAX  LONG_MAX
#define UINT_FAST8_MAX  ULONG_MAX

#undef INT_FAST16_MIN
#undef INT_FAST16_MAX
#undef UINT_FAST16_MAX
#define INT_FAST16_MIN  LONG_MIN
#define INT_FAST16_MAX  LONG_MAX
#define UINT_FAST16_MAX  ULONG_MAX

#undef INT_FAST32_MIN
#undef INT_FAST32_MAX
#undef UINT_FAST32_MAX
#define INT_FAST32_MIN  LONG_MIN
#define INT_FAST32_MAX  LONG_MAX
#define UINT_FAST32_MAX  ULONG_MAX

#undef INT_FAST64_MIN
#undef INT_FAST64_MAX
#ifdef GL_INT64_T
# define INT_FAST64_MIN  INT64_MIN
# define INT_FAST64_MAX  INT64_MAX
#endif

#undef UINT_FAST64_MAX
#ifdef GL_UINT64_T
# define UINT_FAST64_MAX  UINT64_MAX
#endif

/* 7.18.2.4. Limits of integer types capable of holding object pointers */

#undef INTPTR_MIN
#undef INTPTR_MAX
#undef UINTPTR_MAX
#define INTPTR_MIN  LONG_MIN
#define INTPTR_MAX  LONG_MAX
#define UINTPTR_MAX  ULONG_MAX

/* 7.18.2.5. Limits of greatest-width integer types */

#ifndef INTMAX_MAX
# undef INTMAX_MIN
# ifdef INT64_MAX
#  define INTMAX_MIN  INT64_MIN
#  define INTMAX_MAX  INT64_MAX
# else
#  define INTMAX_MIN  INT32_MIN
#  define INTMAX_MAX  INT32_MAX
# endif
#endif

#ifndef UINTMAX_MAX
# ifdef UINT64_MAX
#  define UINTMAX_MAX  UINT64_MAX
# else
#  define UINTMAX_MAX  UINT32_MAX
# endif
#endif

/* 7.18.3. Limits of other integer types */

/* ptrdiff_t limits */
#undef PTRDIFF_MIN
#undef PTRDIFF_MAX
#if 0
# ifdef _LP64
#  define PTRDIFF_MIN  _STDINT_MIN (1, 64, 0l)
#  define PTRDIFF_MAX  _STDINT_MAX (1, 64, 0l)
# else
#  define PTRDIFF_MIN  _STDINT_MIN (1, 32, 0)
#  define PTRDIFF_MAX  _STDINT_MAX (1, 32, 0)
# endif
#else
# define PTRDIFF_MIN  \
    _STDINT_MIN (1, 32, 0)
# define PTRDIFF_MAX  \
    _STDINT_MAX (1, 32, 0)
#endif

/* sig_atomic_t limits */
#undef SIG_ATOMIC_MIN
#undef SIG_ATOMIC_MAX
#define SIG_ATOMIC_MIN  \
   _STDINT_MIN (1, 32, \
                0)
#define SIG_ATOMIC_MAX  \
   _STDINT_MAX (1, 32, \
                0)


/* size_t limit */
#undef SIZE_MAX
#if 0
# ifdef _LP64
#  define SIZE_MAX  _STDINT_MAX (0, 64, 0ul)
# else
#  define SIZE_MAX  _STDINT_MAX (0, 32, 0ul)
# endif
#else
# define SIZE_MAX  _STDINT_MAX (0, 32, 0u)
#endif

/* wchar_t limits */
/* Get WCHAR_MIN, WCHAR_MAX.
   This include is not on the top, above, because on OSF/1 4.0 we have a
   sequence of nested includes
   <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
   <stdint.h> and assumes its types are already defined.  */
#if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX)
  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
     included before <wchar.h>.  */
# include <stddef.h>
# include <stdio.h>
# include <time.h>
# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
# include <wchar.h>
# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
#endif
#undef WCHAR_MIN
#undef WCHAR_MAX
#define WCHAR_MIN  \
   _STDINT_MIN (1, 32, 0)
#define WCHAR_MAX  \
   _STDINT_MAX (1, 32, 0)

/* wint_t limits */
#undef WINT_MIN
#undef WINT_MAX
#define WINT_MIN  \
   _STDINT_MIN (0, 32, 0u)
#define WINT_MAX  \
   _STDINT_MAX (0, 32, 0u)

/* 7.18.4. Macros for integer constants */

/* 7.18.4.1. Macros for minimum-width integer constants */
/* According to ISO C 99 Technical Corrigendum 1 */

/* Here we assume a standard architecture where the hardware integer
   types have 8, 16, 32, optionally 64 bits, and int is 32 bits.  */

#undef INT8_C
#undef UINT8_C
#define INT8_C(x) x
#define UINT8_C(x) x

#undef INT16_C
#undef UINT16_C
#define INT16_C(x) x
#define UINT16_C(x) x

#undef INT32_C
#undef UINT32_C
#define INT32_C(x) x
#define UINT32_C(x) x ## U

#undef INT64_C
#undef UINT64_C
#if LONG_MAX >> 31 >> 31 == 1
# define INT64_C(x) x##L
#elif defined _MSC_VER
# define INT64_C(x) x##i64
#elif 1
# define INT64_C(x) x##LL
#endif
#if ULONG_MAX >> 31 >> 31 >> 1 == 1
# define UINT64_C(x) x##UL
#elif defined _MSC_VER
# define UINT64_C(x) x##ui64
#elif 1
# define UINT64_C(x) x##ULL
#endif

/* 7.18.4.2. Macros for greatest-width integer constants */

#ifndef INTMAX_C
# if 1 && LONG_MAX >> 30 == 1
#  define INTMAX_C(x)   x##LL
# elif defined GL_INT64_T
#  define INTMAX_C(x)   INT64_C(x)
# else
#  define INTMAX_C(x)   x##L
# endif
#endif

#ifndef UINTMAX_C
# if 1 && ULONG_MAX >> 31 == 1
#  define UINTMAX_C(x)  x##ULL
# elif defined GL_UINT64_T
#  define UINTMAX_C(x)  UINT64_C(x)
# else
#  define UINTMAX_C(x)  x##UL
# endif
#endif

#endif /* _GL_STDINT_H */
#endif /* !(defined __ANDROID__ && ...) */
#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */

Information forwarded to debian-bugs-dist@lists.debian.org, Noël Köthe <noel@debian.org>:
Bug#677861; Package src:lftp. (Sun, 25 Nov 2012 21:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Stapelberg <stapelberg@debian.org>:
Extra info received and forwarded to list. Copy sent to Noël Köthe <noel@debian.org>. (Sun, 25 Nov 2012 21:15:04 GMT) Full text and rfc822 format available.

Message #51 received at 677861@bugs.debian.org (full text, mbox):

From: Michael Stapelberg <stapelberg@debian.org>
To: Christoph Egger <christoph@debian.org>
Cc: Andreas Henriksson <andreas@fatal.se>, Robert Millan <rmh@debian.org>, debian-bsd@lists.debian.org, 677861@bugs.debian.org
Subject: Re: Bug#677861: lftp: FTBFS[kfreebsd-i386]: error: conflicting declaration 'typedef __int32_t gl_intptr_t'
Date: Sun, 25 Nov 2012 22:11:46 +0100
Hi,

On Tue, 30 Oct 2012 14:04:42 -0700
Christoph Egger <christoph@debian.org> wrote:
> Andreas Henriksson <andreas@fatal.se> writes:
> > I guess someone needs to untangle all the preprocessor and configure
> > macros in lib/stdint.in.h.
> > If someone from the kfreebsd camp could post the generated
> > lib/stdint.h that would be helpful to be able to see things a bit
> > more clearly.
Here is some further analysis:

lftp’s configure script checks for a working stdint.h and that test
fails on kfreebsd-i386 (tested on fischer.debian.org). The test contains
these lines at the top of the file:

#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
#include <stdint.h>

#if !(defined WCHAR_MIN && defined WCHAR_MAX)
#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
#endif

However, libc0.1-dev:kfreebsd-i386’s /usr/include/stdint.h defines
WCHAR_MIN and others within a block that is guarded by:

/* The ISO C99 standard specifies that in C++ implementations these
   macros should only be defined if explicitly requested.  */
#if !defined __cplusplus || defined __STDC_LIMIT_MACROS

Looking at the current version of the corresponding m4 file, it seems
like this was already fixed in autotools:
http://codesearch.debian.net/show?file=m4_1.4.16-3%2Fm4%2Fstdint.m4&line=70&numfiles=185#L70

I therefore think that this bug can be fixed by "simply" rebuilding
lftp’s configure. However, I have no clue on what the best way to do
this is, so I’ll leave that up to somebody else.

-- 
Best regards,
Michael



Information forwarded to debian-bugs-dist@lists.debian.org, Noël Köthe <noel@debian.org>:
Bug#677861; Package src:lftp. (Sun, 25 Nov 2012 22:21:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Henriksson <andreas@fatal.se>:
Extra info received and forwarded to list. Copy sent to Noël Köthe <noel@debian.org>. (Sun, 25 Nov 2012 22:21:08 GMT) Full text and rfc822 format available.

Message #56 received at 677861@bugs.debian.org (full text, mbox):

From: Andreas Henriksson <andreas@fatal.se>
To: Michael Stapelberg <stapelberg@debian.org>
Cc: Christoph Egger <christoph@debian.org>, Robert Millan <rmh@debian.org>, debian-bsd@lists.debian.org, 677861@bugs.debian.org
Subject: Re: Bug#677861: lftp: FTBFS[kfreebsd-i386]: error: conflicting declaration 'typedef __int32_t gl_intptr_t'
Date: Sun, 25 Nov 2012 23:22:29 +0100
Hello Michael Stapelberg!

On Sun, Nov 25, 2012 at 10:11:46PM +0100, Michael Stapelberg wrote:
> Here is some further analysis:

Thanks for this! I'll contribute by adding some further confusion below.

> 
> lftp’s configure script checks for a working stdint.h and that test
> fails on kfreebsd-i386 (tested on fischer.debian.org). The test contains
> these lines at the top of the file:
> 
> #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
> #include <stdint.h>
> 
> #if !(defined WCHAR_MIN && defined WCHAR_MAX)
> #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
> #endif
> 
> However, libc0.1-dev:kfreebsd-i386’s /usr/include/stdint.h defines
> WCHAR_MIN and others within a block that is guarded by:
> 
> /* The ISO C99 standard specifies that in C++ implementations these
>    macros should only be defined if explicitly requested.  */

     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> #if !defined __cplusplus || defined __STDC_LIMIT_MACROS
> 
> Looking at the current version of the corresponding m4 file, it seems
> like this was already fixed in autotools:
> http://codesearch.debian.net/show?file=m4_1.4.16-3%2Fm4%2Fstdint.m4&line=70&numfiles=185#L70

Apparently this stdint.m4 file in src:m4 is not installed in any binary
package.

Additionally the header of src:m4 version of m4/stdint.m4 says:

# stdint.m4 serial 39
dnl Copyright (C) 2001-2011 Free Software Foundation, Inc.

While lftp packages m4/stdint.m4 says:

# stdint.m4 serial 43
dnl Copyright (C) 2001-2012 Free Software Foundation, Inc.


So it seems lftp's copy is actually newer?!?



> 
> I therefore think that this bug can be fixed by "simply" rebuilding
> lftp’s configure. However, I have no clue on what the best way to do
> this is, so I’ll leave that up to somebody else.

According to random google searches it seems people are saying that
these defines should NOT be needed according to C++11 and that earlier
versions didn't say anything explicit at all about them.

See http://lists.gnu.org/archive/html/bug-gnulib/2011-12/msg00073.html
and the mailing list thread pointed out in the beginning of that mail.

(This makes me question the quoted part of the stdint.h from kfreebsd
libc headers above.)

I'm too confused right now to see an obvious solution, but fixing
kfreebsd libc headers still seems like a valid alternative to me.

-- 
Andreas Henriksson



Information forwarded to debian-bugs-dist@lists.debian.org, Noël Köthe <noel@debian.org>:
Bug#677861; Package src:lftp. (Mon, 26 Nov 2012 02:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Henriksson <andreas@fatal.se>:
Extra info received and forwarded to list. Copy sent to Noël Köthe <noel@debian.org>. (Mon, 26 Nov 2012 02:00:03 GMT) Full text and rfc822 format available.

Message #61 received at 677861@bugs.debian.org (full text, mbox):

From: Andreas Henriksson <andreas@fatal.se>
To: Michael Stapelberg <stapelberg@debian.org>
Cc: Christoph Egger <christoph@debian.org>, Robert Millan <rmh@debian.org>, debian-bsd@lists.debian.org, 677861@bugs.debian.org
Subject: Re: Bug#677861: lftp: FTBFS[kfreebsd-i386]: error: conflicting declaration 'typedef __int32_t gl_intptr_t'
Date: Mon, 26 Nov 2012 02:57:44 +0100
Hello again!

After looking more at this I think I'm less confused now....

On Sun, Nov 25, 2012 at 11:22:28PM +0100, Andreas Henriksson wrote:
> > lftp’s configure script checks for a working stdint.h and that test
> > fails on kfreebsd-i386 (tested on fischer.debian.org).

Please note that the check for a C99 conformant stdint.h also
fails on i386 linux (and all others as well?)....
so that's not kfreebsd-specific!

> > The test contains
> > these lines at the top of the file:
> > 
> > #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
> > #include <stdint.h>
> > 
> > #if !(defined WCHAR_MIN && defined WCHAR_MAX)
> > #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
> > #endif
> > 
> > However, libc0.1-dev:kfreebsd-i386’s /usr/include/stdint.h defines
> > WCHAR_MIN and others within a block that is guarded by:
> > 
> > /* The ISO C99 standard specifies that in C++ implementations these
> >    macros should only be defined if explicitly requested.  */
> > #if !defined __cplusplus || defined __STDC_LIMIT_MACROS

The same guard is used in /usr/include/stdint.h on linux eglibc!

The test is built using C++, so this is the cause for the failure
on all architectures... but again not kFreeBSD specific.

> > 
> > Looking at the current version of the corresponding m4 file, it seems
> > like this was already fixed in autotools:
> > http://codesearch.debian.net/show?file=m4_1.4.16-3%2Fm4%2Fstdint.m4&line=70&numfiles=185#L70

Actually, this was in gnulib but was dropped because it broke stuff:
http://git.savannah.gnu.org/cgit/gnulib.git/commit/m4/stdint.m4?id=501af6ba6cbdb199856d2a12f8a1ee754e7bd2ae
http://git.savannah.gnu.org/cgit/gnulib.git/commit/m4/stdint.m4?id=efd3a9be2cb5340e953dad2bc324bc14f6903b1f

So lftp stdint.m4 is actually newer then the one pointed to in the m4 source.

> > 
> > I therefore think that this bug can be fixed by "simply" rebuilding
> > lftp’s configure. However, I have no clue on what the best way to do
> > this is, so I’ll leave that up to somebody else.

True. I do think we can revert what upstream did to hopefully get
further in the build process (by not having to involve the gnulib
version of stdint.h at all), but I wonder if it's a good idea to
go directly against gnulib upstream like that.....

Since gnulib is supposed to help us out with portability, fixing
it in any case would probably be a good idea.

I think the problem is something like this:

lftp includes (gnu)lib/stdint.h, which includes_next /usr/include/stdint.h,
then it undef and redefines intptr_t et.al. Standard include guards protect
the include files against being re-included again.

This is enough on Linux .... unfortunately not on kFreeBSD, because
/usr/include/sys/_stdint.h gets pulled in by other headers later on
and this header has not been included before and also tries to define
intptr_t (which is already redefined to gl_intptr_t, thus giving the crazy
looking error message in the build log).

The definitions of intptr_t are conditional in both places,
but they use DIFFERENT conditions!

From /usr/include/stdint.h:

# ifndef __intptr_t_defined
typedef int                     intptr_t;
#  define __intptr_t_defined
# endif

From /usr/include/sys/_stdint.h:

#ifndef _INTPTR_T_DECLARED
typedef __intptr_t              intptr_t;
#define _INTPTR_T_DECLARED
#endif

(I have no idea how these are prevented from clashing on kFreeBSD
in general.)


I see two versions of basically the same fix for gnulib. When doing
#include_next <stdint.h> from lib/stdint.h, also do either:

#include <sys/_stdint.h>

or to just prevent it from being included:

#define _SYS__STDINT_H_


(Another version would be to go for the more fine grained guards
and define _INTPTR_T_DECLARED et.al.... but that is probably less
likely to be a solution that works good in the long run.)


Hopefully the explanation of this mail makes more sense.
Anyone with a kFreeBSD installation are welcome to try to build
lftp with any of the solutions discussed to see how much further
this gets us.....

-- 
Andreas Henriksson



Information forwarded to debian-bugs-dist@lists.debian.org, Noël Köthe <noel@debian.org>:
Bug#677861; Package src:lftp. (Mon, 26 Nov 2012 07:42:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Stapelberg <stapelberg@debian.org>:
Extra info received and forwarded to list. Copy sent to Noël Köthe <noel@debian.org>. (Mon, 26 Nov 2012 07:42:03 GMT) Full text and rfc822 format available.

Message #66 received at 677861@bugs.debian.org (full text, mbox):

From: Michael Stapelberg <stapelberg@debian.org>
To: Andreas Henriksson <andreas@fatal.se>
Cc: Christoph Egger <christoph@debian.org>, Robert Millan <rmh@debian.org>, debian-bsd@lists.debian.org, 677861@bugs.debian.org
Subject: Re: Bug#677861: lftp: FTBFS[kfreebsd-i386]: error: conflicting declaration 'typedef __int32_t gl_intptr_t'
Date: Mon, 26 Nov 2012 08:38:17 +0100
Hi Andreas,

Thanks for your excellent further analysis of the problem at hand.

Andreas Henriksson <andreas@fatal.se> writes:
> Hopefully the explanation of this mail makes more sense.
> Anyone with a kFreeBSD installation are welcome to try to build
> lftp with any of the solutions discussed to see how much further
> this gets us.....
This is slightly off-topic, but aren’t porter boxes supposed to help
with that? I fail to see how I can use them (e.g. fischer.debian.org) in
this very case: I don’t have root access, so I cannot install the
build-deps of lftp. Do I really have to send a request and wait for some
human to install the deps before I can do any work on this?

-- 
Best regards,
Michael



Information forwarded to debian-bugs-dist@lists.debian.org, Noël Köthe <noel@debian.org>:
Bug#677861; Package src:lftp. (Mon, 26 Nov 2012 19:27:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Cyril Brulebois <kibi@debian.org>:
Extra info received and forwarded to list. Copy sent to Noël Köthe <noel@debian.org>. (Mon, 26 Nov 2012 19:27:03 GMT) Full text and rfc822 format available.

Message #71 received at 677861@bugs.debian.org (full text, mbox):

From: Cyril Brulebois <kibi@debian.org>
To: Michael Stapelberg <stapelberg@debian.org>
Cc: Andreas Henriksson <andreas@fatal.se>, Christoph Egger <christoph@debian.org>, Robert Millan <rmh@debian.org>, debian-bsd@lists.debian.org, 677861@bugs.debian.org
Subject: Re: Bug#677861: lftp: FTBFS[kfreebsd-i386]: error: conflicting declaration 'typedef __int32_t gl_intptr_t'
Date: Mon, 26 Nov 2012 20:22:24 +0100
[Message part 1 (text/plain, inline)]
Hello,

Michael Stapelberg <stapelberg@debian.org> (26/11/2012):
> Andreas Henriksson <andreas@fatal.se> writes:
> > Hopefully the explanation of this mail makes more sense.
> > Anyone with a kFreeBSD installation are welcome to try to build
> > lftp with any of the solutions discussed to see how much further
> > this gets us.....
> This is slightly off-topic, but aren’t porter boxes supposed to help
> with that? I fail to see how I can use them (e.g. fischer.debian.org) in
> this very case: I don’t have root access, so I cannot install the
> build-deps of lftp. Do I really have to send a request and wait for some
> human to install the deps before I can do any work on this?

yes: http://dsa.debian.org/doc/install-req/

Installed in fischer's sid chroot.

Mraw,
KiBi.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Noël Köthe <noel@debian.org>:
Bug#677861; Package src:lftp. (Mon, 26 Nov 2012 21:27:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Henriksson <andreas@fatal.se>:
Extra info received and forwarded to list. Copy sent to Noël Köthe <noel@debian.org>. (Mon, 26 Nov 2012 21:27:04 GMT) Full text and rfc822 format available.

Message #76 received at 677861@bugs.debian.org (full text, mbox):

From: Andreas Henriksson <andreas@fatal.se>
To: Cyril Brulebois <kibi@debian.org>
Cc: Michael Stapelberg <stapelberg@debian.org>, Christoph Egger <christoph@debian.org>, Robert Millan <rmh@debian.org>, debian-bsd@lists.debian.org, 677861@bugs.debian.org
Subject: Re: Bug#677861: lftp: FTBFS[kfreebsd-i386]: error: conflicting declaration 'typedef __int32_t gl_intptr_t'
Date: Mon, 26 Nov 2012 22:25:00 +0100
[Message part 1 (text/plain, inline)]
tags 677861 patch
thanks

On Mon, Nov 26, 2012 at 08:22:24PM +0100, Cyril Brulebois wrote:
[...]
> Installed in fischer's sid chroot.

Thanks. The attached patch works around the issue on kFreeBSD.
Build tested in the sid chroot on fischer.debian.org.

Hopefully kFreeBSD porters or package maintainers can now pick
this up and discuss a suitable long term solution for gnulib
on kFreeBSD with gnulib upstream?!

-- 
Andreas Henriksson
[sys-stdint-kfreebsd.patch (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Added tag(s) patch. Request was from Andreas Henriksson <andreas@fatal.se> to control@bugs.debian.org. (Mon, 26 Nov 2012 21:27:08 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Noël Köthe <noel@debian.org>:
Bug#677861; Package src:lftp. (Sun, 02 Dec 2012 15:27:13 GMT) Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Noël Köthe <noel@debian.org>. (Sun, 02 Dec 2012 15:27:13 GMT) Full text and rfc822 format available.

Message #83 received at 677861@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: 677861@bugs.debian.org
Subject: lftp: diff for NMU version 4.3.8-1.1
Date: Sun, 2 Dec 2012 16:26:40 +0100
[Message part 1 (text/plain, inline)]
tags 677861 + pending
thanks

Dear maintainer,

Ivo De Decker has prepared an NMU for lftp (versioned as 4.3.8-1.1)
and I've uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

Regards.

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Beatles
[lftp-4.3.8-1.1-nmu.diff (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Added tag(s) pending. Request was from gregor herrmann <gregoa@debian.org> to control@bugs.debian.org. (Sun, 02 Dec 2012 15:27:21 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#677861; Package src:lftp. (Mon, 03 Dec 2012 13:36:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Noël Köthe <noel@debian.org>:
Extra info received and forwarded to list. (Mon, 03 Dec 2012 13:36:09 GMT) Full text and rfc822 format available.

Message #90 received at 677861@bugs.debian.org (full text, mbox):

From: Noël Köthe <noel@debian.org>
To: gregor herrmann <gregoa@debian.org>, 677861@bugs.debian.org
Cc: Andreas Henriksson <andreas@fatal.se>, Ivo De Decker <ivo.dedecker@ugent.be>
Subject: Re: Bug#677861: lftp: diff for NMU version 4.3.8-1.1
Date: Mon, 03 Dec 2012 14:26:01 +0100
[Message part 1 (text/plain, inline)]
Hello,

Am Sonntag, den 02.12.2012, 16:26 +0100 schrieb gregor herrmann:

> Ivo De Decker has prepared an NMU for lftp (versioned as 4.3.8-1.1)
> and I've uploaded it to DELAYED/2. Please feel free to tell me if I
> should delay it longer.

Thanks for all your work with the patch, the NMU and the upload.

-- 
Noël Köthe <noel debian.org>
Debian GNU/Linux, www.debian.org
[signature.asc (application/pgp-signature, inline)]

Reply sent to Ivo De Decker <ivo.dedecker@ugent.be>:
You have taken responsibility. (Tue, 04 Dec 2012 15:51:06 GMT) Full text and rfc822 format available.

Notification sent to debian-bsd@lists.debian.org:
Bug acknowledged by developer. (Tue, 04 Dec 2012 15:51:06 GMT) Full text and rfc822 format available.

Message #95 received at 677861-close@bugs.debian.org (full text, mbox):

From: Ivo De Decker <ivo.dedecker@ugent.be>
To: 677861-close@bugs.debian.org
Subject: Bug#677861: fixed in lftp 4.3.8-1.1
Date: Tue, 04 Dec 2012 15:47:54 +0000
Source: lftp
Source-Version: 4.3.8-1.1

We believe that the bug you reported is fixed in the latest version of
lftp, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 677861@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ivo De Decker <ivo.dedecker@ugent.be> (supplier of updated lftp package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 01 Dec 2012 15:53:02 +0100
Source: lftp
Binary: lftp
Architecture: source amd64
Version: 4.3.8-1.1
Distribution: unstable
Urgency: low
Maintainer: Noël Köthe <noel@debian.org>
Changed-By: Ivo De Decker <ivo.dedecker@ugent.be>
Description: 
 lftp       - Sophisticated command-line FTP/HTTP client programs
Closes: 677861
Changes: 
 lftp (4.3.8-1.1) unstable; urgency=low
 .
   * Non-maintainer upload.
   * Fix build on kfreebsd. Thanks to Andreas Henriksson for the patch and
     Christoph Egger for the report.
     closes: Bug#677861
Checksums-Sha1: 
 71dbc5117ff9661c3cc904e1da64e434530b67bb 1762 lftp_4.3.8-1.1.dsc
 ab1f5a102ea86b5a61d7c93604b626f310e931df 13848 lftp_4.3.8-1.1.debian.tar.gz
 269d73bd2ce9d13adae3d7b6caa0a153d7afd6ac 719208 lftp_4.3.8-1.1_amd64.deb
Checksums-Sha256: 
 9a82b7ae8094a2f6756b2335a9cac0684cfd539e0962a856630bcda286239cf6 1762 lftp_4.3.8-1.1.dsc
 9a712a4a2070c9ac5aef0ca837cd27527d97b66c938a0a6efce08c85aea7e906 13848 lftp_4.3.8-1.1.debian.tar.gz
 78d59a83c7ceada06f5cc3e2eb4ab78445834aa9b187172ae40f041cf9f0491c 719208 lftp_4.3.8-1.1_amd64.deb
Files: 
 efcd677c11e4b4b41146f652b4679434 1762 net optional lftp_4.3.8-1.1.dsc
 bd8ea9c8e2c506df096fac923925a195 13848 net optional lftp_4.3.8-1.1.debian.tar.gz
 81961d5401cad63e41f07d6872f69722 719208 net optional lftp_4.3.8-1.1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJQu3KTAAoJELs6aAGGSaoGp8YQAJNJGJSVWcQVZMZe2e1+OKeb
cMSTHQo6SxAKl+kqWefkBJxljO2PUAcI2FcLLcG2kJuZ08y6A9ba+WO3nwhOTgj/
KLlPIfPA+3plomHM9zUXQ8OWgjYEtAsxKIBV37x2+FE5v2mobxV/kThDLIzK1ISA
YpXYBkSSjqYJCJywOHsulgmt4ScEZ0xNs7kij3OAhPL5ZuEWeeBxPrqFwfPdXngz
TdsXXMthRWsLGBA5adxmpr12Ln2Ci+0lQUWTteIrYYp8cZ4rFw/Y935nVmS6ZV+b
Dhm4dp3mDYnNHitmd0TfAnBNRtyV8m8aNnEFTk8eKw5M0fCTGfq+n5lXMcj4eVP4
UWdXgkJwGNkHgkiCqzgvGuE1uXQQnn0xHEOeq3DIJauuXmj2hocaiuZcZlsa6Xd8
e1XfZnjMS6iKgMxMj/cmMou+llODTaQgX0ueIcDgRRnBAavjFqhmm/hFuZiKfAps
fTSJddgEq5RjEYbEwq59Y/9p8CDCgZBiy3lPUyQKocADu7NDwXh0kFm0jaUQt9a3
CzHdU15jdzixDSRhAl2rAtEQqBc5BpXU8DQQUnKnNzbsw15e+tU/E4zS6H2pfvXd
S+rh3HzUpOwzEM/7nBTWk+x88inxGeYuDfeBbalGgbw1WrZ4Gm/pV0QFbAGVg2Kf
M8KIyGjsVw3eos8SOEQX
=kwTc
-----END PGP SIGNATURE-----




Information forwarded to debian-bugs-dist@lists.debian.org, Noël Köthe <noel@debian.org>:
Bug#677861; Package src:lftp. (Tue, 11 Dec 2012 15:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Noël Köthe <noel@debian.org>. (Tue, 11 Dec 2012 15:45:03 GMT) Full text and rfc822 format available.

Message #100 received at 677861@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: Ivo De Decker <ivo.dedecker@ugent.be>
Cc: 695626-done@bugs.debian.org, 677861@bugs.debian.org
Subject: Re: RFS: lftp/4.3.6-1+deb7u1 [RC] [NMU] [T-P-U]
Date: Tue, 11 Dec 2012 16:41:55 +0100
[Message part 1 (text/plain, inline)]
On Mon, 10 Dec 2012 23:25:12 +0100, Ivo De Decker wrote:

> I am looking for a sponsor for my NMU for testing-proposed-updates of "lftp".
> It was approved by the release team:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=695152

Uploaded, thank you.


Cheers,
gregor
 

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Funny Van Dannen: Versteht Ihr was von Vögeln?
[signature.asc (application/pgp-signature, inline)]

Reply sent to Ivo De Decker <ivo.dedecker@ugent.be>:
You have taken responsibility. (Tue, 11 Dec 2012 15:51:04 GMT) Full text and rfc822 format available.

Notification sent to debian-bsd@lists.debian.org:
Bug acknowledged by developer. (Tue, 11 Dec 2012 15:51:04 GMT) Full text and rfc822 format available.

Message #105 received at 677861-close@bugs.debian.org (full text, mbox):

From: Ivo De Decker <ivo.dedecker@ugent.be>
To: 677861-close@bugs.debian.org
Subject: Bug#677861: fixed in lftp 4.3.6-1+deb7u1
Date: Tue, 11 Dec 2012 15:47:29 +0000
Source: lftp
Source-Version: 4.3.6-1+deb7u1

We believe that the bug you reported is fixed in the latest version of
lftp, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 677861@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ivo De Decker <ivo.dedecker@ugent.be> (supplier of updated lftp package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 04 Dec 2012 18:08:44 +0100
Source: lftp
Binary: lftp
Architecture: source amd64
Version: 4.3.6-1+deb7u1
Distribution: testing-proposed-updates
Urgency: low
Maintainer: Noël Köthe <noel@debian.org>
Changed-By: Ivo De Decker <ivo.dedecker@ugent.be>
Description: 
 lftp       - Sophisticated command-line FTP/HTTP client programs
Closes: 677861
Changes: 
 lftp (4.3.6-1+deb7u1) testing-proposed-updates; urgency=low
 .
   * Non-maintainer upload.
   * Upload to testing for wheezy.
   * Fix build kfreebsd. Thanks to Andreas Henriksson for the patch and
     Christoph Egger for the report.
     closes: Bug#677861
Checksums-Sha1: 
 c8545c9672c71749743607ac8b085d4132c21f68 1782 lftp_4.3.6-1+deb7u1.dsc
 b778a7043b10025f13a6007edd52aa0269da20e8 13834 lftp_4.3.6-1+deb7u1.debian.tar.gz
 bbfdf4d93a81b6143c3abca04deede3f496be785 718958 lftp_4.3.6-1+deb7u1_amd64.deb
Checksums-Sha256: 
 b29586b6017b4368fa81146240e13bb5450cadf6cc9e5e636e0e784db3f58108 1782 lftp_4.3.6-1+deb7u1.dsc
 acfcfa90f6298736744f0a95f22a83bb16274a92c8071fbb7047d97862fc9f26 13834 lftp_4.3.6-1+deb7u1.debian.tar.gz
 08fb2768b87057e18373037347098bbb5a3a7b55bd37bb0b406f83f9004e45f8 718958 lftp_4.3.6-1+deb7u1_amd64.deb
Files: 
 9daa9c6041096a93c920b2d6a1d7ffb1 1782 net optional lftp_4.3.6-1+deb7u1.dsc
 258f8f5a155a294d0bb5f15e9609588c 13834 net optional lftp_4.3.6-1+deb7u1.debian.tar.gz
 ade1e2d0f923993e04add1c1a46d69bd 718958 net optional lftp_4.3.6-1+deb7u1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJQx1OnAAoJELs6aAGGSaoG++MQAIZMS4qR86r2602aHzSwcM9Z
Z2av71WJiHru4go9RvE2Rwx+UN7kTorywZ2aea5VXCYuT6i6BEH6n1bxIOe3uZ2E
A19YA0F4In0ZlNbWk4YcQ2crkIznblI9ODmGLoqyvEksryd8+lutBcDOWjSforiq
ng/LxknJRdEJD+pziTxvB6cRvKLpTyfu/T3n6FT3O6RUrva/iLl9l2fAqAE1KUsV
scKuA9X6HuG2ytsh1JAiSNrbXjResVMin4utS/yqT8dm74hzKiAexDpWNrw7h+4z
nLvCSxTIXeMaDAuHx056X+NXgm+NTv81nR/MzzxNo0/x4cux6BEZOABXXBqRDWTO
jJxgH1gg9/uHr0Ic35z2JCCu1yNtRKe9R5m99phVvbMsB1Wban3sfPinsmA7un6/
Od9doMLGM2YEe8+icn6c7zvhIz1EwfsI7HTgXSP1AV1k4/RXKpiwtkme0dVzB7l8
fDZ8WOXwmET0kt2hbZWMp43Hk6W+j7IbkQubLWN4I/+vytthbPpVIjOg8itFw6VE
leI8Yf54cUl1RlHvNIPZWsMNDmhFiOgRtVsXJfiSG61OfNbfBEGP8jpCIyndBIf5
CFIlZRmSghkvcOCOi1auEpA5mg3fRszhQO0b3MKCNX0zbdHYFrVrtRl7FUqM3+Jo
ZgzbZj7hjgSnML8ub+o8
=9pEj
-----END PGP SIGNATURE-----




Bug 677861 cloned as bug 695871 Request was from Steven Chamberlain <steven@pyro.eu.org> to control@bugs.debian.org. (Thu, 13 Dec 2012 18:45:08 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 11 Jan 2013 07:27:36 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 16:43:24 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.