bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] compiling tar cvs using mingw


From: Gerry Reno
Subject: Re: [Bug-tar] compiling tar cvs using mingw
Date: Tue, 9 Sep 2003 21:25:10 -0700 (PDT)

Paul,

--- Paul Eggert <address@hidden> wrote:
> Gerry Reno <address@hidden> writes:
> 
> > Ok, I think I know why xcreate.c can't find pwd.h or grp.h.  Mingw
> > cannot see Cygwin mount points so although the files are in
> > /usr/include I don't think it can see them.  They would have to be
> in
> > d:/mingw/include.
> 
> Once you've set up your environment correctly, can you please resend
> the problems that you have?

  Ok, I set the INCLUDES in src/Makefile to add d:/mingw/include and
d:/mingw/include/sys (which I didn't think would be necessary since
cygwin usually selects the correct header set based on -mno-cygwin) and
 then put all files back to original.

errors/warnings from make -k:
-----------------------------
if gcc -mno-cygwin -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../lib
-Id:/mingw/inc
lude -Id:/mingw/include/sys -I/usr/include -I/usr/include/sys    -g -O2
-MT crea
te.o -MD -MP -MF ".deps/create.Tpo" \
  -c -o create.o `test -f 'create.c' || echo './'`create.c; \
then mv -f ".deps/create.Tpo" ".deps/create.Po"; \
else rm -f ".deps/create.Tpo"; exit 1; \
fi
create.c:25:18: pwd.h: No such file or directory
create.c:26:18: grp.h: No such file or directory
create.c: In function `mode_to_chars':
create.c:266: warning: comparison is always false due to limited range
of data t
ype
create.c: In function `start_header':
create.c:537: warning: comparison is always false due to limited range
of data t
ype
create.c:542: warning: comparison is always false due to limited range
of data t
ype
d:\mingw\bin\mingw32-make.exe[2]: *** [create.o] Error 1
...

if gcc -mno-cygwin -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../lib
-Id:/mingw/inc
lude -Id:/mingw/include/sys -I/usr/include -I/usr/include/sys    -g -O2
-MT extr
act.o -MD -MP -MF ".deps/extract.Tpo" \
  -c -o extract.o `test -f 'extract.c' || echo './'`extract.c; \
then mv -f ".deps/extract.Tpo" ".deps/extract.Po"; \
else rm -f ".deps/extract.Tpo"; exit 1; \
fi
extract.c: In function `make_directories':
extract.c:385: too many arguments to function `mkdir'
extract.c: In function `extract_archive':
extract.c:722: warning: assignment makes pointer from integer without a
cast
extract.c:1142: too many arguments to function `mkdir'
d:\mingw\bin\mingw32-make.exe[2]: *** [extract.o] Error 1
...

if gcc -mno-cygwin -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../lib
-Id:/mingw/inc
lude -Id:/mingw/include/sys -I/usr/include -I/usr/include/sys    -g -O2
-MT xhea
der.o -MD -MP -MF ".deps/xheader.Tpo" \
  -c -o xheader.o `test -f 'xheader.c' || echo './'`xheader.c; \
then mv -f ".deps/xheader.Tpo" ".deps/xheader.Po"; \
else rm -f ".deps/xheader.Tpo"; exit 1; \
fi
xheader.c:21:17: grp.h: No such file or directory
xheader.c:23:17: pwd.h: No such file or directory
d:\mingw\bin\mingw32-make.exe[2]: *** [xheader.o] Error 1
...

if gcc -mno-cygwin -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../lib
-Id:/mingw/inc
lude -Id:/mingw/include/sys -I/usr/include -I/usr/include/sys    -g -O2
-MT list
.o -MD -MP -MF ".deps/list.Tpo" \
  -c -o list.o `test -f 'list.c' || echo './'`list.c; \
then mv -f ".deps/list.Tpo" ".deps/list.Po"; \
else rm -f ".deps/list.Tpo"; exit 1; \
fi
list.c: In function `decode_header':
list.c:531: warning: passing arg 2 of `uname_to_uid' from incompatible
pointer t
ype
list.c:536: warning: passing arg 2 of `gname_to_gid' from incompatible
pointer t
ype
...

if gcc -mno-cygwin -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../lib
-Id:/mingw/inc
lude -Id:/mingw/include/sys -I/usr/include -I/usr/include/sys    -g -O2
-MT name
s.o -MD -MP -MF ".deps/names.Tpo" \
  -c -o names.o `test -f 'names.c' || echo './'`names.c; \
then mv -f ".deps/names.Tpo" ".deps/names.Po"; \
else rm -f ".deps/names.Tpo"; exit 1; \
fi
names.c:23:17: grp.h: No such file or directory
names.c:25:17: pwd.h: No such file or directory
names.c: In function `uid_to_uname':
names.c:79: dereferencing pointer to incomplete type
names.c: In function `gid_to_gname':
names.c:109: dereferencing pointer to incomplete type
names.c: In function `uname_to_uid':
names.c:138: dereferencing pointer to incomplete type
names.c:139: dereferencing pointer to incomplete type
names.c: In function `gname_to_gid':
names.c:168: dereferencing pointer to incomplete type
d:\mingw\bin\mingw32-make.exe[2]: *** [names.o] Error 1
...

if gcc -mno-cygwin -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../lib
-Id:/mingw/inc
lude -Id:/mingw/include/sys -I/usr/include -I/usr/include/sys    -g -O2
-MT rtap
elib.o -MD -MP -MF ".deps/rtapelib.Tpo" \
  -c -o rtapelib.o `test -f 'rtapelib.c' || echo './'`rtapelib.c; \
then mv -f ".deps/rtapelib.Tpo" ".deps/rtapelib.Po"; \
else rm -f ".deps/rtapelib.Tpo"; exit 1; \
fi
rtapelib.c: In function `do_command':
rtapelib.c:115: `SIGPIPE' undeclared (first use in this function)
rtapelib.c:115: (Each undeclared identifier is reported only once
rtapelib.c:115: for each function it appears in.)
rtapelib.c: In function `rmt_write__':
rtapelib.c:589: `SIGPIPE' undeclared (first use in this function)
d:\mingw\bin\mingw32-make.exe[2]: *** [rtapelib.o] Error 1
-----------------------------

<snip/>

> This one you need to fix, either by making sure that grp.h is
> includable,
> or by defining the symbol that prevents it from being included.
> 
> > > #define mkdir(file, mode) (mkdir) (file)
> 
> >  I tried your suggestion but no luck.  Same error as before.
> 
> The '#define' should have prevented it.  Perhaps you can use 'gcc -E'
> to find out why it didn't.

  The gcc -E output shows:
int __attribute__((__cdecl__)) mkdir (const char*); (looks like mingw
io.h)
and calls like:
status = mkdir (file_name, mode ^ invert_permissions);

  I changed the #define for system.h to be:
#define mkdir(file, mode) (mkdir(file))

and the module compiles:
$cd src;gcc -mno-cygwin -DHAVE_CONFIG_H -I. -I. -I.. -
I../lib -I../lib -Id:/mingw/include -Id:/mingw/include/sys
-I/usr/include -I/us
r/include/sys    -g -O2 -MT extract.o -MD -MP -MF ".deps/extract.Tpo"
-c -o ext
ract.o `test -f 'extract.c' || echo './'`extract.c; cd ..
extract.c: In function `extract_archive':
extract.c:722: warning: assignment makes pointer from integer without a
cast

  As far as pwd.h and grp.h, mingw (windows native) doesn't have the
same notion of user password and group password in the /etc/passwd
sense so maybe this should somehow not be required for mingw.

thx,
Gerry Reno




__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com




reply via email to

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