Article View: gnu.utils.bug
Article #847tar-1.11
From: Frank Warmerdam
Date: Mon, 14 Sep 1992 17:01
Date: Mon, 14 Sep 1992 17:01
56 lines
3220 bytes
3220 bytes
The follow relates a few problems I had building GNU tar under
under IRIX 4.0.1 on a Personal Iris:
While attempting to compile using the default cc with ANSI headers
but to __STDC__ defined or strict type checking I get the following:
cc -c -g -DMAJOR_IN_SYSMACROS=1 -DDIRENT=1 -DHAVE_SYS_MTIO_H=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_STRSTR=1 -DHAVE_MKDIR=1 -DHAVE_MKNOD=1 -DHAVE_RENAME=1 -DHAVE_FTRUNCATE=1 -DHAVE_VPRINTF=1 -DHAVE_ALLOCA_H=1 -DDEF_AR_FILE=\"/dev/tape\" -DDEFBLOCKING=20 -I. -I. tar.c
accom: Error: /usr/include/stdlib.h, line 102: Qualifier mismatch in prototype, pointer toconst char versus pointer to char
extern int system( char *);
---------------------------------^
I discovered that this is because stdio.h defines system() to take a
'const char *' as an argument, and later port.h #define's const out of
existence. After this occurs stdlib.h defines system() again, but
this time the 'const' key word is deleted. These problems would have
been avoided if __STDC__ where defined so I reran configure with
CC="cc -ansi", the stringent ANSI version of the IRIX C compiler.
Nevertheless this problem might be avoidable right from the start.
Following this I ran into an error related to passing restore_times
as the second argument to utime(). It seems that on the SGI utime()
takes a second argument of type 'struct utimbuf *', which of course
only contains two time_t elements. restore_times is just an array
of two time_t values, but the type checking fails generating a fatal
compiler error. I am not if struct utimbuf exists on all machines,
but it does exist on most of the machines I checked. I leave the
final solution of this problem to you.
Tiring somewhat of these prototyping problems, I reconfigured using
CC="cc -cckr" (K & R version). The build was then uneventful with
the exception of #ifdef's spaced away from the beginning of the line
in expand.c, and buffer.c.
ie.
#ifdef __MSDOS__
In my experience a wide range of systems can grok the following:
# ifdef __MSDOS__
so you might consider using that style of preprocessor identation
if you really want to indent preprocessor directives.
One thing that was rather perturbing was when the 'make install'
procedure replace my system /etc/rmt without much warning. While
I realize in retrospect that this was mentioned in the README, it
still caught me by surprise. Perhaps this ought to be rethought
a little.
I am still looking into how well GNU tar actually runs. I will
update you on this. Keep up the good work!
-------------------------------------------------------------------------------
Frank Warmerdam | Who can give them back their lives | warmerda@pci.on.ca
Software Artist | and all those wasted years? - Rush |
Technical Details
Message-ID:
<m0mURIQ-0007ZoC@pci.on.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!pci.on.CA!warmerdaShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!pci.on.CA!warmerda From: warmerda@pci.on.CA (Frank Warmerdam) Subject: tar-1.11 Message-ID: <m0mURIQ-0007ZoC@pci.on.ca> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Mon, 14 Sep 1992 17:01:00 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 57