Article View: comp.mail.uucp
Article #5345Re: problem compiling GNU UUCP 1.04 on Sun
From: Greg Earle
Date: Sun, 21 Feb 1993 10:23
Date: Sun, 21 Feb 1993 10:23
76 lines
3966 bytes
3966 bytes
In article <1993Feb17.121311.16288@tware.com> bash@tware.com (Paul Bash) writes: >Is anyone else having trouble compiling GNU (Taylor) UUCP 1.04 under >SunOS with gcc? > >The specifics are: > > Sun 4/330 > SunOS 4.1.2 > gcc 2.3.3 > GNU UUCP 1.04 > >After running 'configure', the Makefile has the following: > > CC = gcc -traditional > >Executing make, the compilation fails with the following messages: > > > gcc -traditional -c -g -I. -I. -DSBINDIR=\"/usr/local/lib/uucp\" -DOWNER=\"uucp\ " -DVERSION=\"1.04\" uucico.c > In file included from uucp.h:47, from uucico.c:26: > /usr/include/stdio.h:25: warning: `NULL' redefined > /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.3/include/stddef.h:187: warning: this is the location of the previous definition > In file included from /usr/include/sys/signal.h:294, from /usr/include/signal.h: 15, from uucp.h:48, from uucico.c:26: > /usr/include/sys/stdtypes.h:27: redefinition of `size_t' > /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.3/include/stddef.h:111: `size_t' previously declared here > /usr/include/sys/stdtypes.h:28: redefinition of `ptrdiff_t' > /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.3/include/stddef.h:73: `ptrdiff_ t' previously declared here > /usr/include/sys/stdtypes.h:30: redefinition of `wchar_t' > /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.3/include/stddef.h:155: `wchar_t ' previously declared here > *** Error code 1 > make: Fatal error: Command failed for target `uucico.o' > >After changing CC from 'gcc -traditional' to 'cc', everything compiles fine. >I'm pretty sure the gcc distribution is installed correctly since I used it >to compile the X11R5 and XView distributions that I'm currently running on >that workstation. I'm pretty sure the gcc distribution is not installed correctly, because your problems are symptomatic of not having run "make install-fixincludes" at the end of your gcc 2.3.3 installation process. If you had, your compilations would be including /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.3/include/sys/stdtypes.h instead of /usr/include/sys/stdtypes.h (as per your messages above). By running "fixincludes", it would have created a modified <sys/stdtypes.h> in the gcc includes directory that contains (at the end) ... #ifndef _GCC_SIZE_T #define _GCC_SIZE_T typedef int size_t; /* ??? */ #endif #ifndef _GCC_PTRDIFF_T #define _GCC_PTRDIFF_T typedef int ptrdiff_t; /* result of subtracting two pointers */ #endif #ifndef _GCC_WCHAR_T #define _GCC_WCHAR_T typedef unsigned short wchar_t; /* big enough for biggest char set */ #endif #endif /* !__sys_stdtypes_h */ This would have prevented the inclusion (in <stddef.h>) of the various redeclarations of size_t, ptrdiff_t, wchar_t et al. because "_GCC_SIZE_T" et al. would have been defined, and the code in gcc's <stddef.h> that checks for these being set would have caused the redefines to be skipped over. -- - Greg Earle Phone: (818) 353-8695 FAX: (818) 353-1877 Internet: earle@isolar.Tujunga.CA.US UUCP: isolar!earle@elroy.JPL.NASA.GOV a.k.a. ...!elroy!isolar!earle
Technical Details
Message-ID:
<1m7l6g$82s@isolar.Tujunga.CA.US>Path:
arc1-ca.pugleaf.net!sparky!uunet!ukma!wupost!usc!elroy.jpl.nasa.gov!isolar!isolar!not-for-mailReferences:
<1993Feb17.121311.16288@tware.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,af4a9a304d9b6bc8,start X-Google-Attributes: gid11318c,public X-Google-Thread: 10d3b3,353377526f4d055a X-Google-Attributes: gid10d3b3,public X-Google-ArrivalTime: 1993-02-21 02:23:12 PST Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!wupost!usc!elroy.jpl.nasa.gov!isolar!isolar!not-for-mail From: earle@isolar.Tujunga.CA.US (Greg Earle) Newsgroups: comp.mail.uucp,gnu.gcc.help Subject: Re: problem compiling GNU UUCP 1.04 on Sun Followup-To: comp.mail.uucp Date: 21 Feb 1993 02:23:12 -0800 Organization: Personal Usenet site, Tujunga, CA USA Lines: 76 Distribution: world Message-ID: <1m7l6g$82s@isolar.Tujunga.CA.US> References: <1993Feb17.121311.16288@tware.com> NNTP-Posting-Host: isolar.tujunga.ca.us Summary: Run "fixnincludes" Keywords: fixincludes