home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / gnu / g / lib / bug / 607 < prev    next >
Encoding:
Text File  |  1992-11-20  |  4.3 KB  |  139 lines

  1. Newsgroups: gnu.g++.lib.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!helmholtz.sdsc.edu!ritter
  3. From: ritter@helmholtz.sdsc.edu
  4. Subject: compiling for sgi
  5. Message-ID: <9211201845.AA13719@dirac>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: Gnus Not Usenet
  8. Distribution: gnu
  9. Date: Fri, 20 Nov 1992 02:45:28 GMT
  10. Approved: bug-lib-g++@prep.ai.mit.edu
  11. Lines: 126
  12.  
  13. I am trying to compile libg++ for the sgi.
  14. My configure command was such:
  15.     configure iris --prefix=/usr/local/lib/gnu
  16.  
  17. This creates the Makefiles then I 'make all'.
  18.  
  19. The FIRST error that kills the make is,:
  20.  
  21. cd test; make all ...
  22.         rm -f libg++.a
  23.         rootme=`pwd` ; export rootme ; cd src ; ar qc ../libg++.a *.o
  24.         rootme=`pwd`; export rootme; cd iostream; \
  25.            ar qc ../libg++.a *.o
  26.         cd ../libiberty; \
  27.           ar qc ../libg++/libg++.a `cat needed-list` strerror.o strsignal.o
  28.         true libg++.a
  29.         touch .stmp-genclass
  30.         touch .stmp-tests
  31.         touch .stmp-etc
  32.         (rootme=`pwd` ; export rootme ; cd src ; \
  33.                 make "CC=cc" "CFLAGS=-g" "XTRAFLAGS=" \
  34.                 "AR=`if [ -f ${rootme}/../../binutils/ar ] ; \
  35.         then echo ${rootme}/../../binutils/ar ; \
  36.         else echo ar ; fi`" "RANLIB=true")
  37.         cc -g -nostdinc++  -DLO_CAL \
  38.         -I../.. -I. -I./../../iostream -I./../../src \
  39.         -I./../../g++-include  -c new.cc
  40. cc: Error: malformed or unknown option -nostdinc++
  41. *** Error code 2
  42.  
  43. Stop.
  44. *** Error code 1
  45.  
  46. Stop.
  47. *** Error code 1
  48.  
  49. Stop.
  50. *** Error code 1
  51.  
  52. Stop.
  53.  
  54. -------------------------- end make output -------------
  55.  
  56. For some reason, this area of make sets CC=cc, and then tries to pass
  57. it the -nostdinc++ flag, which ofcourse cc doesn't accept.
  58.  
  59. Pne solution I have tried, which I hope is valid is changing the
  60. definition of CC in the Makefile.in to "CC=gcc" as opposed to
  61. "CC=$(CC)" which I hoped would set CC to gcc in all areas.  It worked,
  62. sort of.  Now when I re-config and make all, I get an error that seems
  63. to have been expected in certain cases:
  64. .
  65. .
  66. .
  67.  
  68.         else echo ar ; fi`" "RANLIB=true")
  69.         gcc -g -nostdinc++  -DLO_CAL \
  70.         -I../.. -I. -I./../../iostream -I./../../src \
  71.         -I./../../g++-include  -c new.cc
  72. In file included from ./../../src/std.h:26, from new.cc:23:
  73. ./../../g++-include/string.h:28: declaration of `int  strlen (const char *)'
  74. <built-in>:0: conflicts with built-in declaration `unsigned int  strlen (const char *)'
  75. new.cc: In function `void * operator new (long int)':
  76. new.cc:60: warning: ANSI C++ forbids implicit conversion from `void *' in assignment
  77. *** Error code 1
  78.  
  79. Stop.
  80. *** Error code 1
  81.  
  82. -------------------------- end make output -------------
  83.  
  84. So, I checked out string.h, and it has a comment:
  85.  
  86. // NOTE: If you get a error message from g++ that this declaration
  87. // conflicts with a <built-in> declaration of strlen(), that usually
  88. // indicates that __SIZE_TYPE__ is incorrectly defined by gcc.
  89. // Fix or add SIZE_TYPE in the appropriate file in gcc/config/*.h.
  90. size_t    strlen(const char*);
  91.  
  92. So now my question(s):
  93.     a) Was setting CC=gcc ok to do or is it necessary to use cc
  94.        for part of the make. 
  95.     b) If cc is needed how do I get rid of -nostdinc++?
  96.     c) Which .h file do I change in gcc-2.3.1/config (iris.h??
  97.        svr4.h??) and do I have to recompile gcc to effect the
  98.        changes? (I already tried changing both without
  99.        re-compiling and it hits the same error messg.)
  100.  
  101. The only reason I am making libg++ is so I can compile InterViews,
  102. which needso some of the libraries, so I just tried to copy the needed
  103. libs to /usr/local/include.  This seems to work but I am still looking
  104. for a lib called sysent.h, ever heard of it? Is it a libg++ lib? I am
  105. pretty sure that it is in libC++ (CC).
  106.  
  107. Sorry for the length of the mail, but I didn't want to leave anything
  108. out.  Thanks a lot for the time, if your're ever in SanDEiego, Happy
  109. Hour is on me.
  110.  
  111. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  112. :: Stephen J. Ritter                ::           ::
  113. :: Salk Institute for Biological Studies,    ::  This       ::
  114. :: Computational Neuroscience Laboratory    ::     Space      ::
  115. ::                        ::         For    ::
  116. :: e-mail: ritter@helmholtz.sdsc.edu        ::           Rent ::
  117. :: Phone:  (619) 453-4100 ext. 374 (voice)    ::          ::
  118. :: Fax:    (619) 587-0417            ::          ::
  119. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.