Here is the root cause. gettext use C linkage at gettext-runtime/libasprintf/vasprintf.h:
#ifdef __cplusplus extern "C" { #endif /* Write formatted output to a string dynamically allocated with malloc(). If the memory allocation succeeds, store the address of the string in *RESULT and return the number of resulting bytes, excluding the trailing NUL. Upon memory allocation error, or some other error, return -1. */ extern int asprintf (char **result, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); extern int vasprintf (char **result, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))); #ifdef __cplusplus } #endif On stdio.h, mingw-w64 use C++ linkage: /* There seems to be a bug about builtins and static overrides of them in g++. So we need to do here some trickery. */ #ifdef __cplusplus extern "C++" { #endif ... #ifdef _GNU_SOURCE __mingw_ovr __attribute__ ((__format__ (gnu_printf, 2, 3))) __attribute__((nonnull (1,2))) int asprintf(char **__ret, const char *__format, ...) { register int __retval; __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); __retval = __mingw_vasprintf( __ret, __format, __local_argv ); __builtin_va_end( __local_argv ); return __retval; } __mingw_ovr __attribute__ ((__format__ (gnu_printf, 2, 0))) __attribute__((nonnull (1,2))) int vasprintf(char **__ret, const char *__format, __builtin_va_list __local_argv) { return __mingw_vasprintf( __ret, __format, __local_argv ); } #endif /* _GNU_SOURCE */ ... I think mingw-w64 should not use C++ linkage for these C functions when use C++ compiler. On Sat, Apr 27, 2013 at 9:04 PM, JonY <jo...@users.sourceforge.net> wrote: > On 4/27/2013 20:54, Erik van Pienbroek wrote: >>>> /usr/i686-w64-mingw32/sys-root/mingw/include/stdio.h:319:5: error: >>>> previous declaration of 'int asprintf(char**, const char*, ...)' with 'C >>>> ++' linkage >>>> int asprintf(char **__ret, const char *__format, ...) >>>> ^ >>>> In file included >>>> from ../../../gettext-runtime/libasprintf/lib-asprintf.h:30:0, >>>> >>>> from ../../../gettext-runtime/libasprintf/autosprintf.cc:31: >>>> ../../../gettext-runtime/libasprintf/vasprintf.h:45:54: error: conflicts >>>> with new declaration with 'C' linkage >>>> __attribute__ ((__format__ (__printf__, 2, 3))); >>>> >>>> This looks like a change in mingw-w64 regarding the declaration of >>>> asprintf. Could one of the mingw-w64 devs take a look at this and >>>> indicate whether this should be fixed in mingw-w64 itself or in gettext? >>>> >>> >>> Hi, >>> >>> Can you retry? This was fixed very recently, depending on your timezone, >>> it may be on the 25th or 26th. >> >> The mass-rebuild was done against mingw-w64 trunk r5820 (I just verified >> this to be absolutely certain). This is still the latest mingw-w64 >> commit at the time of writing this mail so I guess the problem is still >> there. >> > > Can you check if gettext is actually checking if asprintf is available > or is it just assuming it is going to be missing for mingw? > > > > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr > _______________________________________________ > Mingw-w64-public mailing list > mingw-w64-pub...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > _______________________________________________ mingw mailing list mingw@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/mingw