NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
toolchain/51820: toolchain build fails in Cygwin due to conflicting prototypes for asnprintf()
>Number: 51820
>Category: toolchain
>Synopsis: toolchain build fails in Cygwin due to conflicting prototypes for asnprintf()
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 11 07:20:00 +0000 2017
>Originator: Santhosh Raju
>Release: NetBSD 7.99.57
>Organization:
>Environment:
CYGWIN_NT-6.1 DELTA 2.6.1(0.305/5/3) 2016-12-16 11:55 x86_64 Cygwin
>Description:
When I tried to build the tool chain using the command
./build.sh -j3 -U -m i386 -u tools
The build failed with an error message saying there were conflicting prototype declaration for the function asnprintf(), the conflict was from the file "/usr/include/stdio.h" the file from Cygwin
The full error message is as follows.
--- basename.lo ---
In file included from ./nbtool_config.h:867:0,
from /cygdrive/d/dev/projects/netbsd/src/src-wip/tools/compat/namespace.h:9,
from /cygdrive/d/dev/projects/netbsd/src/src-wip/lib/libc/gen/basename.c:37:
/cygdrive/d/dev/projects/netbsd/src/src-wip/tools/compat/compat_defs.h:238:5: error: conflicting types for 'asnprintf'
int asnprintf(char **, size_t, const char *, ...);
^
In file included from /usr/include/sys/types.h:20:0,
from /cygdrive/d/dev/projects/netbsd/src/src-wip/tools/compat/compat_defs.h:35,
from ./nbtool_config.h:867,
from /cygdrive/d/dev/projects/netbsd/src/src-wip/tools/compat/namespace.h:9,
from /cygdrive/d/dev/projects/netbsd/src/src-wip/lib/libc/gen/basename.c:37:
/usr/include/stdio.h:288:8: note: previous declaration of 'asnprintf' was here
char * _EXFUN(asnprintf, (char *__restrict, size_t *__restrict, const char *__restrict, ...)
^
*** [basename.lo] Error code 1
In order to make sure it was not some cached files I re-ran the build without the -u switch, but this did not help either.
The toolchain build was working without issues until recently when
after I had updated my Cygwin installation, but I am not sure if this is what is causing the build breakage.
>How-To-Repeat:
1. Install a Cygwin in Windows 7
2. Pull the NetBSD current repository via CVS
3. Run ./build.sh -j3 -U -m i386 -u tools
>Fix:
As a temporary solution I edited the file "/usr/include/stdio.h" commented the lines 288 and 289.
char * _EXFUN(asnprintf, (char *__restrict, size_t *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
After this I re-ran ./build.sh -j3 -U -m i386 -u tools which then build the toolchain without issues.
Home |
Main Index |
Thread Index |
Old Index