🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Larry W. Virden, x2487 Mon, 05 Oct 1992 16:43
Anyone compiled shellutils-1.7 on SunOS 4.1.2?
#1007
Author: Larry W. Virden, x2487
Date: Mon, 05 Oct 1992 16:43
22 lines
1869 bytes
If anyone has built shellutils version 1.7 on a Sun, would you drop me an
email ?  I am having problems getting the lib directory to compile.

I am getting the following:
gcc -O -c -g  -DHAVE_LIMITS_H=1 -DHAVE_SYSLOG_H=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_FTIME=1 -DHAVE_UT_HOST=1 -DHAVE_C_LINE=1 -DHAVE_VPRINTF=1 -DHAVE_ALLOCA_H=1 -DHAVE_TM_ZONE=1 -DDIRENT=1 -I. strtoul.c
In file included from /projects/gnu/sun4/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/include/stdlib.h:10, from ./strtol.c:33, from strtoul.c:21:
/usr/include/sys/stdtypes.h:27: redefinition of `size_t'
/projects/gnu/sun4/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/include/stddef.h:82: `size_t' previously declared here
/usr/include/sys/stdtypes.h:28: redefinition of `ptrdiff_t'
/projects/gnu/sun4/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/include/stddef.h:45: `ptrdiff_t' previously declared here
/usr/include/sys/stdtypes.h:30: redefinition of `wchar_t'
/projects/gnu/sun4/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/include/stddef.h:120: `wchar_t' previously declared here
gmake[1]: *** [strtoul.o] Error 1
making all in src
gmake[1]: *** No way to make target `../lib/libshu.a'.  Stop.
making all in man
gmake[1]: Nothing to be done for `all'.
-- 
Larry W. Virden                 UUCP: osu-cis!chemabs!lvirden
Same Mbox: BITNET: lvirden@cas  INET: lvirden@cas.org
Personal: 674 Falls Place,   Reynoldsburg, OH 43068-1614
America Online: lvirden@aol.com
Re: Anyone compiled shellutils-1.7 on SunOS 4.1
#1010
Author: Joachim Wiesel
Date: Tue, 06 Oct 1992 09:20
58 lines
3104 bytes
In article AA14616@cas.org, lwv26@cas.ORG (Larry W. Virden, x2487) writes:
>If anyone has built shellutils version 1.7 on a Sun, would you drop me an
>email ?  I am having problems getting the lib directory to compile.
>
>I am getting the following:
>gcc -O -c -g  -DHAVE_LIMITS_H=1 -DHAVE_SYSLOG_H=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_FTIME=1 -DHAVE_UT_HOST=1 -DHAVE_C_LINE=1 -DHAVE_VPRINTF=1 -DHAVE_ALLOCA_H=1 -DHAVE_TM_ZONE=1 -DDIRENT=1 -I. strtoul.c
>In file included from /projects/gnu/sun4/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/include/stdlib.h:10, from ./strtol.c:33, from strtoul.c:21:
>/usr/include/sys/stdtypes.h:27: redefinition of `size_t'
>/projects/gnu/sun4/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/include/stddef.h:82: `size_t' previously declared here
>/usr/include/sys/stdtypes.h:28: redefinition of `ptrdiff_t'
>/projects/gnu/sun4/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/include/stddef.h:45: `ptrdiff_t' previously declared here
>/usr/include/sys/stdtypes.h:30: redefinition of `wchar_t'
>/projects/gnu/sun4/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/include/stddef.h:120: `wchar_t' previously declared here
>gmake[1]: *** [strtoul.o] Error 1
>making all in src
>gmake[1]: *** No way to make target `../lib/libshu.a'.  Stop.
>making all in man
>gmake[1]: Nothing to be done for `all'.

This is caused by erroniously defining 'size_t, prtdiff_t and wchar_t' in <sys/stdtypes.h> in SUNOS 4.1.x. There is an excellent article on this by
Rainer Klute in the IX/Magazine 10/92 pp.124.
I'll summarize:

Copy /usr/include/sys/stdtypes.h to your gcc tree include directory.
(e.g: /usr/local/lib/gcc-lib/sparc/2.2.2/include/sys in our case)
Delete  the lines:
....
typedef int             size_t;         /* ??? */
typedef int             ptrdiff_t;      /* result of subtracting two pointers */
 
typedef unsigned short  wchar_t;        /* big enough for biggest char set */
....
from the copy.

Add #include <stddef.h> to the copy of <sys/stdtypes.h> before the very first
line of this file, e.g.:
....
#include <stddef.h>
#ifndef __sys_stdtypes_h
#define __sys_stdtypes_h
....


That's it.

Joachim

 */
#include <stddef.h>
#ifndef __sys_stdtypes_h
#define __sys_stdtypes_h
 
---

Joachim Wiesel, Institut fuer Photogrammetrie und Fernerkundung,
Universitaet  Karlsruhe, Englerstr. 7, D-7500 Karlsruhe, Germany
Phone: +49 721 608 2316                      Fax: +49 721 694 568
Internet: wiesel@ipf.bau-verm.uni-karlsruhe.de
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads