home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / gnu / g / lib / bug / 592 < prev    next >
Encoding:
Text File  |  1992-11-12  |  3.6 KB  |  117 lines

  1. Newsgroups: gnu.g++.lib.bug
  2. Path: sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ms.washington.edu!rcf
  3. From: rcf@ms.washington.edu (Richard Fairfield)
  4. Subject: problems installing libg++.a on DS 5000 running DEC OSF/1
  5. Message-ID: <9211130257.AA16655@coco.ms.washington.edu>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: Gnus Not Usenet
  8. Distribution: gnu
  9. Date: Thu, 12 Nov 1992 10:57:19 GMT
  10. Approved: bug-lib-g++@prep.ai.mit.edu
  11. Lines: 104
  12.  
  13. I have been able to hack together an installation of libg++.a version 2.2 on a
  14. DECstation 5000/200 running DEC OSF/1 Version 1.0. The installation is not at
  15. all clean so I am hoping that someone can help me clean it up a bit.
  16.  
  17. Anyway, here is what I did:
  18.  
  19. 1) I installed gcc version 2.3.1. This installation went smoothly. I did NOT
  20.    do "make install-fixincludes" (see below).
  21.  
  22.  
  23. 2) I modified Makefile.in in the libg++.a source directory to use a locally
  24.    installed bsd-style install program. The OSF/1 version of install does not
  25.    work with "make install".  Here is a diff of the modified Makefile:
  26.  
  27.     46c46
  28.     < INSTALL = install -c
  29.     ---
  30.     > INSTALL = /usr/local/bin/install-bsd -c
  31.  
  32.  
  33. 3) I ran "configure mips-dec-osf1". The release doesn't really seem to know
  34.    about OSF/1 on a DECstation, but it swallowed this, so OK.
  35.  
  36.  
  37. 4) I modified /usr/include/machine/endian.h. Basically, I removed the special
  38.    GNUC section because it causes errors like this on g++ source files:
  39.  
  40.     /usr/include/machine/endian.h:109: `w' undeclared, outside of functions
  41.     /usr/include/machine/endian.h:110: parse error before `w'
  42.     /usr/include/machine/endian.h:111: register name not specified for `w'
  43.     /usr/include/machine/endian.h:111: parse error before `{'
  44.     /usr/include/machine/endian.h:118: `l' undeclared, outside of functions
  45.     /usr/include/machine/endian.h:119: parse error before `l'
  46.     /usr/include/machine/endian.h:120: register name not specified for `l'
  47.     /usr/include/machine/endian.h:120: parse error before `{'
  48.  
  49.    This is the sort of thing that I would expect the "make install-fixincludes"
  50.    in the gcc release to fix. But when if I do that I get lots include file
  51.    errors when I try to compile libgcc.a.
  52.  
  53.  
  54.    Here is a diff of my changes to the include file:
  55.  
  56. 96,97d95
  57. < #if defined(lint) || !defined(__GNUC__)
  58. <
  59. 100,125d97
  60. <
  61. < #else /* !lint && LITTLE_ENDIAN && __GNUC__ */
  62. <
  63. < /*
  64. <  * Use GNUC support to inline the byteswappers.
  65. <  */
  66. <
  67. < static __inline__
  68. < unsigned long /* XXX "long" (and &xff's) needed for optimality */
  69. < ntohs(w)
  70. <       register unsigned long w;
  71. < {
  72. <       return ((w << 8) | ((w >> 8) & 0xff)) & 0xffff;
  73. < }
  74. < #define       htons   ntohs
  75. <
  76. < static __inline__
  77. < unsigned long
  78. < ntohl(l)
  79. <       register unsigned long l;
  80. < {
  81. <       return (l << 24) | (l >> 24) | ((l & 0xff00) << 8) | ((l >> 8) & 0xff00)
  82. ;
  83. < }
  84. < #define htonl ntohl
  85. <
  86. < #endif        /* __GNUC__ inlines */
  87.  
  88.  
  89.  
  90. 5) Here are the commands I used to build and install libgcc.a (remember that
  91.    I am using my local install program):
  92.     
  93.     make CC=gcc
  94.     make install
  95.  
  96.  
  97.  
  98. At this point, I am able to compile and run "regular" C programs with any of
  99. cc, gcc, or g++. But I am just learning C++ and there are no other users on
  100. this system yet, so I haven't really been able to test g++ and libg++.a.
  101.  
  102. I am thinking that I should replace include file <machine/endian.h> with its
  103. original version before I start having other problems. But I then expect any
  104. g++ program which uses this include file to fail (for example, anything that
  105. includes <sys/file.h> gets <machine/endian.h>).
  106.  
  107.  
  108. Any help will be appreciated.
  109.  
  110. thanks,
  111. Richard Fairfield
  112. Math Sciences Computing Center
  113. University of Washington
  114. 206-685-2303
  115. rcf@ms.washington.edu
  116.  
  117.