🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Unable to properly install g++ and libg++.a

#191
From: "Stephen C. Pope"
Date: Sat, 25 Nov 1989 02:48
78 lines
3308 bytes
on Thu, 23 Nov 89 06:15:25 EST,
Manavendra K. Thakur <thakur@zerkalo.harvard.edu> said:


Manavendra> Hi there,

Manavendra> I'm trying to install g++ 1.36.1 and libg++ 1.36.1 on a Sun 3/470 (68030
Manavendra> cpu) running SunOS 4.0.3.  

Manavendra> I've using gcc 1.36, bison 1.03, and gas 1.34.  (All of these installed
Manavendra> without any problems.)


Manavendra> Observation #1

Manavendra> The instructions for installing g++ conflict with what I find in the
Manavendra> Makefile, particularly in regard to linking with crt0+.o instead of
Manavendra> crt0.o:

Ignore whatever the various documents say.  Reality changes much faster
than documentation.  G++-1.36 and up now *must* use gas and Gnu ld.
Meanwhile, the usual Sun supplied crt0.o and such are used also.

What to do:

   * Install gas 1.34 (or gas.xtar.Z frm labrea) as $(libdir)/gcc-as
   * Install ld++ from the g++-1.36.1 distribution as $(libdir)/gcc-ld
     (Note: do *not* attempt to use Gnu ld from the binutils distribution.
     Also, installing Gnu ld as such will cause gcc to use it also,
     meaning that will will no longer get anything dynamically loaded.
     If you must have your gcc-compiled code dynamically loaded,
     install ld++ as something else, and tweak the ld spec in
     g++'s gcc.c.

If trying to compile libg++ test programs result in ld error messages
involving __DYNAMIC, __CTOR_LIST, or __main, you've done something wrong.

Manavendra> OBSERVATION #2

Manavendra> The README for g++ does not say anything about how to install g++.

Simply ``make install'', but note that you'll have to install ld++ by
hand, as noted above

Manavendra> This would not be much of a problem, except that the README *does* say
Manavendra> to "proceed to use GNU C++ to build the GNU C++ run-time libraries"

If you really don't want to install g++ before testing, then change
your compilation flags in libg++ Makefile(s) to use
    /usr/whereever/g++-1.36.1/g++ -B/usr/whereever/g++-1.36.1/

Manavendra> OBSERVATION #4

Manavendra> Next hurdle: the Sun 3 assembler dies a horrible death if you try to use
Manavendra> the -pipe argument to g++.  From the man page for the Sun as:

Use gas installed as gcc-as as per above

Manavendra> builtin.cc:848: warning: structure has no data members
Manavendra> as: error (/usr/tmp/cca15252.s:1388): Invalid operand
Manavendra> as: error (/usr/tmp/cca15252.s:1404): Invalid operand

ditto.


Manavendra> OBSERVATION #5

Manavendra> How in the world do I tell g++ what assembler to use?

gcc.c starts by looking for $(libdir)/gcc-as, then searches the rest of
your $path for /whatever/as.  You can tweak all the compiler table
entry specs if you like.


stephen pope
santa fe institute
scp@sfi.santafe.edu
Technical Details
Message-ID: <8911250248.AA02475@gila.santafe.edu>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!tut.cis.ohio-state.edu!SFI.SANTAFE.EDU!scp
References: <8911231115.AA16394@zerkalo.harvard.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!tut.cis.ohio-state.edu!SFI.SANTAFE.EDU!scp
From: scp@SFI.SANTAFE.EDU ("Stephen C. Pope")
Newsgroups: gnu.g++.lib.bug
Subject: Unable to properly install g++ and libg++.a
Message-ID: <8911250248.AA02475@gila.santafe.edu>
Date: 25 Nov 89 02:48:11 GMT
References: <8911231115.AA16394@zerkalo.harvard.edu>
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 78