bug-gnulib
[Top][All Lists]
Advanced

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

fallout on mingw


From: Bruno Haible
Subject: fallout on mingw
Date: Fri, 20 Oct 2006 15:55:20 +0200
User-agent: KMail/1.9.1

Hi,

A build of the complete gnulib on mingw fails with a number of errors.

1) 'savewd'

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT savewd.o -MD -MP -MF .deps/savewd.Tpo -c -o 
savewd.o savewd.c
savewd.c:31:22: sys/wait.h: No such file or directory
make[3]: *** [savewd.o] Error 1

I think this module would require a quite different code for mingw.

2)

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT idcache.o -MD -MP -MF .deps/idcache.Tpo -c -o 
idcache.o idcache.c
idcache.c:25:17: pwd.h: No such file or directory
idcache.c:26:17: grp.h: No such file or directory
idcache.c: In function `getuser':
idcache.c:64: warning: assignment makes pointer from integer without a cast
idcache.c:67: error: dereferencing pointer to incomplete type
idcache.c: In function `getuidbyname':
idcache.c:96: warning: assignment makes pointer from integer without a cast
idcache.c:113: error: dereferencing pointer to incomplete type
idcache.c: In function `getgroup':
idcache.c:140: warning: assignment makes pointer from integer without a cast
idcache.c:143: error: dereferencing pointer to incomplete type
idcache.c: In function `getgidbyname':
idcache.c:172: warning: assignment makes pointer from integer without a cast
idcache.c:189: error: dereferencing pointer to incomplete type
make[3]: *** [idcache.o] Error 1

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT userspec.o -MD -MP -MF .deps/userspec.Tpo -c -o 
userspec.o userspec.c
userspec.c:29:17: pwd.h: No such file or directory
userspec.c:30:17: grp.h: No such file or directory
userspec.c: In function `parse_with_separator':
userspec.c:159: warning: assignment makes pointer from integer without a cast
userspec.c:181: error: dereferencing pointer to incomplete type
userspec.c:187: error: dereferencing pointer to incomplete type
userspec.c:188: warning: assignment makes pointer from integer without a cast
userspec.c:189: error: dereferencing pointer to incomplete type
userspec.c:199: warning: assignment makes pointer from integer without a cast
userspec.c:209: error: dereferencing pointer to incomplete type
make[3]: *** [userspec.o] Error 1

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT getugroups.o -MD -MP -MF .deps/getugroups.Tpo -c 
-o getugroups.o getugroups.c
getugroups.c:26:17: grp.h: No such file or directory
getugroups.c: In function `getugroups':
getugroups.c:68: error: dereferencing pointer to incomplete type
getugroups.c:77: error: dereferencing pointer to incomplete type
getugroups.c:90: error: dereferencing pointer to incomplete type
make[3]: *** [getugroups.o] Error 1

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT glob.o -MD -MP -MF .deps/glob.Tpo -c -o glob.o 
glob.c
glob.c:43:17: pwd.h: No such file or directory
glob.c: In function `rpl_glob':
glob.c:549: warning: assignment makes pointer from integer without a cast
glob.c:552: error: dereferencing pointer to incomplete type
glob.c:628: warning: assignment makes pointer from integer without a cast
glob.c:631: error: dereferencing pointer to incomplete type
make[3]: *** [glob.o] Error 1

mingw doesn't have <pwd.h>, <grp.h>. The stat() and fstat() functions return
struct stat records where st_uid and st_gid is always zero. But files do have
owners, and owners have a string representation that can be a local or remote
user. Fixing this propertly would IMO imply to
  - implement a <pwd.h> substitute that is based on LookupAccountSid,
    GetLengthSid, CopySid, EqualSid, ConvertSidToStringSid,
  - implement a <grp.h> that is a dummy (only a single group),
  - replace stat() and fstat() with functions that also call GetSecurityInfo.

3)

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT canonicalize.o -MD -MP -MF .deps/canonicalize.Tpo 
-c -o canonicalize.o canonicalize.c
canonicalize.c: In function `canonicalize_filename_mode':
canonicalize.c:240: error: `ELOOP' undeclared (first use in this function)
canonicalize.c:240: error: (Each undeclared identifier is reported only once
canonicalize.c:240: error: for each function it appears in.)
make[3]: *** [canonicalize.o] Error 1

Patch in a separate mail.

4)

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT chdir-safer.o -MD -MP -MF .deps/chdir-safer.Tpo -c 
-o chdir-safer.o chdir-safer.c
chdir-safer.c: In function `chdir_no_follow':
chdir-safer.c:61: error: `ELOOP' undeclared (first use in this function)
chdir-safer.c:61: error: (Each undeclared identifier is reported only once
chdir-safer.c:61: error: for each function it appears in.)
make[3]: *** [chdir-safer.o] Error 1

Any idea what to do with this?

5)

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT fchmodat.o -MD -MP -MF .deps/fchmodat.Tpo -c -o 
fchmodat.o fchmodat.c
In file included from fchmodat.c:50:
at-func.c: In function `fchmodat':
at-func.c:55: error: `EOPNOTSUPP' undeclared (first use in this function)
at-func.c:55: error: (Each undeclared identifier is reported only once
at-func.c:55: error: for each function it appears in.)
make[3]: *** [fchmodat.o] Error 1

Patch in a separate mail.

6)

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT fts.o -MD -MP -MF .deps/fts.Tpo -c -o fts.o fts.c
fts.c: In function `fts_build':
fts.c:898: error: `nlink_t' undeclared (first use in this function)
fts.c:898: error: (Each undeclared identifier is reported only once
fts.c:898: error: for each function it appears in.)
fts.c:898: error: syntax error before "nlinks"
fts.c:940: error: `nlinks' undeclared (first use in this function)
make[3]: *** [fts.o] Error 1

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT isapipe.o -MD -MP -MF .deps/isapipe.Tpo -c -o 
isapipe.o isapipe.c
isapipe.c: In function `isapipe':
isapipe.c:47: error: `nlink_t' undeclared (first use in this function)
isapipe.c:47: error: (Each undeclared identifier is reported only once
isapipe.c:47: error: for each function it appears in.)
isapipe.c:47: error: syntax error before "pipe_link_count_max"
isapipe.c:86: error: `pipe_link_count_max' undeclared (first use in this 
function)
make[3]: *** [isapipe.o] Error 1

We could define nlink_t in <config.h>.

7)

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT gai_strerror.o -MD -MP -MF .deps/gai_strerror.Tpo 
-c -o gai_strerror.o gai_strerror.c
gai_strerror.c:67: error: conflicting types for 'gai_strerrorA'
/cross/i386-pc-mingw-tools/bin/../lib/gcc/i386-pc-mingw32/3.4.6/../../../../i386-pc-mingw32/include/ws2tcpip.h:301:
 error: previous declaration of 'gai_strerrorA' was here
gai_strerror.c:67: error: conflicting types for 'gai_strerrorA'
/cross/i386-pc-mingw-tools/bin/../lib/gcc/i386-pc-mingw32/3.4.6/../../../../i386-pc-mingw32/include/ws2tcpip.h:301:
 error: previous declaration of 'gai_strerrorA' was here
make[3]: *** [gai_strerror.o] Error 1

It appears that <ws2tcpip.h> already defines gai_strerror, getaddrinfo etc.
gnulib should not redefine them then.

8)

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT getndelim2.o -MD -MP -MF .deps/getndelim2.Tpo -c 
-o getndelim2.o getndelim2.c
getndelim2.c: In function `getndelim2':
getndelim2.c:91: error: `SSIZE_MAX' undeclared (first use in this function)
getndelim2.c:91: error: (Each undeclared identifier is reported only once
getndelim2.c:91: error: for each function it appears in.)
make[3]: *** [getndelim2.o] Error 1

Patch in a separate mail.

9)

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT gettime.o -MD -MP -MF .deps/gettime.Tpo -c -o 
gettime.o gettime.c
gettime.c:49:5: #error "Only 1-second nominal clock resolution found.  Is that 
intended?" "If so, compile with the -DOK_TO_USE_1S_CLOCK option."
make[3]: *** [gettime.o] Error 1

Should use GetSystemTimeAsFileTime.

10)

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT mkdir-p.o -MD -MP -MF .deps/mkdir-p.Tpo -c -o 
mkdir-p.o mkdir-p.c
mkdir-p.c: In function `make_dir_parents':
mkdir-p.c:119: error: too many arguments to function `rpl_mkdir'
make[3]: *** [mkdir-p.o] Error 1

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT mkdirat.o -MD -MP -MF .deps/mkdirat.Tpo -c -o 
mkdirat.o mkdirat.c
In file included from mkdirat.c:43:
at-func.c: In function `mkdirat':
at-func.c:39: error: too many arguments to function `rpl_mkdir'
at-func.c:39: error: too many arguments to function `rpl_mkdir'
at-func.c:46: error: too many arguments to function `rpl_mkdir'
at-func.c:46: error: too many arguments to function `rpl_mkdir'
at-func.c:55: error: `EOPNOTSUPP' undeclared (first use in this function)
at-func.c:55: error: (Each undeclared identifier is reported only once
at-func.c:55: error: for each function it appears in.)
at-func.c:74: error: too many arguments to function `rpl_mkdir'
at-func.c:74: error: too many arguments to function `rpl_mkdir'
make[3]: *** [mkdirat.o] Error 1

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT tempname.o -MD -MP -MF .deps/tempname.Tpo -c -o 
tempname.o tempname.c
tempname.c: In function `__gen_tempname':
tempname.c:280: error: too many arguments to function `rpl_mkdir'
make[3]: *** [tempname.o] Error 1

Copy the workaround from mkdtemp.c, or augment the mkdir module.

11)

i386-pc-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. 
-I..  -I../intl   -g -O2 -MT poll.o -MD -MP -MF .deps/poll.Tpo -c -o poll.o 
poll.c
poll.c: In function `rpl_poll':
poll.c:180: error: `ESHUTDOWN' undeclared (first use in this function)
poll.c:180: error: (Each undeclared identifier is reported only once
poll.c:180: error: for each function it appears in.)
poll.c:180: error: `ECONNRESET' undeclared (first use in this function)
poll.c:181: error: `ECONNABORTED' undeclared (first use in this function)
poll.c:181: error: `ENETRESET' undeclared (first use in this function)
make[3]: *** [poll.o] Error 1

Needs special mingw support.


Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]