[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



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


Reply to: