🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.lib.bug
Article #360

compiling for sgi

#360
From: ritter
Date: Fri, 20 Nov 1992 02:45
107 lines
4453 bytes
I am trying to compile libg++ for the sgi.
My configure command was such:
	configure iris --prefix=/usr/local/lib/gnu

This creates the Makefiles then I 'make all'.

The FIRST error that kills the make is,:

cd test; make all ...
        rm -f libg++.a
        rootme=`pwd` ; export rootme ; cd src ; ar qc ../libg++.a *.o
        rootme=`pwd`; export rootme; cd iostream; \
           ar qc ../libg++.a *.o
        cd ../libiberty; \
          ar qc ../libg++/libg++.a `cat needed-list` strerror.o strsignal.o
        true libg++.a
        touch .stmp-genclass
        touch .stmp-tests
        touch .stmp-etc
        (rootme=`pwd` ; export rootme ; cd src ; \
                make "CC=cc" "CFLAGS=-g" "XTRAFLAGS=" \
                "AR=`if [ -f ${rootme}/../../binutils/ar ] ; \
        then echo ${rootme}/../../binutils/ar ; \
        else echo ar ; fi`" "RANLIB=true")
        cc -g -nostdinc++  -DLO_CAL \
        -I../.. -I. -I./../../iostream -I./../../src \
        -I./../../g++-include  -c new.cc
cc: Error: malformed or unknown option -nostdinc++
*** Error code 2

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.

-------------------------- end make output -------------

For some reason, this area of make sets CC=cc, and then tries to pass
it the -nostdinc++ flag, which ofcourse cc doesn't accept.

Pne solution I have tried, which I hope is valid is changing the
definition of CC in the Makefile.in to "CC=gcc" as opposed to
"CC=$(CC)" which I hoped would set CC to gcc in all areas.  It worked,
sort of.  Now when I re-config and make all, I get an error that seems
to have been expected in certain cases:
.
.
.

        else echo ar ; fi`" "RANLIB=true")
        gcc -g -nostdinc++  -DLO_CAL \
        -I../.. -I. -I./../../iostream -I./../../src \
        -I./../../g++-include  -c new.cc
In file included from ./../../src/std.h:26, from new.cc:23:
./../../g++-include/string.h:28: declaration of `int  strlen (const char *)'
<built-in>:0: conflicts with built-in declaration `unsigned int  strlen (const char *)'
new.cc: In function `void * operator new (long int)':
new.cc:60: warning: ANSI C++ forbids implicit conversion from `void *' in assignment
*** Error code 1

Stop.
*** Error code 1

-------------------------- end make output -------------

So, I checked out string.h, and it has a comment:

// NOTE: If you get a error message from g++ that this declaration
// conflicts with a <built-in> declaration of strlen(), that usually
// indicates that __SIZE_TYPE__ is incorrectly defined by gcc.
// Fix or add SIZE_TYPE in the appropriate file in gcc/config/*.h.
size_t    strlen(const char*);

So now my question(s):
	a) Was setting CC=gcc ok to do or is it necessary to use cc
	   for part of the make. 
	b) If cc is needed how do I get rid of -nostdinc++?
	c) Which .h file do I change in gcc-2.3.1/config (iris.h??
	   svr4.h??) and do I have to recompile gcc to effect the
	   changes? (I already tried changing both without
	   re-compiling and it hits the same error messg.)

The only reason I am making libg++ is so I can compile InterViews,
which needso some of the libraries, so I just tried to copy the needed
libs to /usr/local/include.  This seems to work but I am still looking
for a lib called sysent.h, ever heard of it? Is it a libg++ lib? I am
pretty sure that it is in libC++ (CC).

Sorry for the length of the mail, but I didn't want to leave anything
out.  Thanks a lot for the time, if your're ever in SanDEiego, Happy
Hour is on me.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Stephen J. Ritter    			:: 		  ::
:: Salk Institute for Biological Studies,	::  This 	  ::
:: Computational Neuroscience Laboratory	::     Space	  ::
::						::         For    ::
:: e-mail: ritter@helmholtz.sdsc.edu		::           Rent ::
:: Phone:  (619) 453-4100 ext. 374 (voice)	::		  ::
:: Fax:    (619) 587-0417			::		  ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Technical Details
Message-ID: <9211201845.AA13719@dirac>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!helmholtz.sdsc.edu!ritter

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.lib.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!helmholtz.sdsc.edu!ritter
From: ritter@helmholtz.sdsc.edu
Subject: compiling for sgi
Message-ID: <9211201845.AA13719@dirac>
Sender: gnulists@ai.mit.edu
Organization: Gnus Not Usenet
Distribution: gnu
Date: Fri, 20 Nov 1992 02:45:28 GMT
Approved: bug-lib-g++@prep.ai.mit.edu
Lines: 126