🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: uk.comp.os.linux
6 messages
6 total messages Started by Nick Kew Tue, 04 Jul 2000 00:00
Getting a working libg++ on Linux
#770
Author: Nick Kew
Date: Tue, 04 Jul 2000 00:00
30 lines
2116 bytes
I've been struggling with this far too long.

I have a good deal of (older) software that relies on libg++.
I am looking to update the software, but really need a stable environment
for it to run on.  I should like to stick with Linux if possible, as any
alternative will involve disruption and downtime.

Now, the software works fine on older Linux, and on other systems with
a clean gcc2.6.x or 2.7.x installation.

On recent linux, the libg++ README hints darkly at the problems I have
been suffering.  It also refers the reader to a URL at sunsite for
a Linux-specific libg++, but that URL doesn't exist!

My current best attempt to run the software on Linux involved installing
a libg++, which led to problems with my software.  I was able to trace
the source of trouble to the "ostrstream" class being badly broken, and
worked around that.  However, this kind of patching is clearly not a
sound basis for further development.

I've spent most of today experimenting with different gcc/libstdc++/libg++
combos, without reaching a satisfactory result.

Is there a gcc/libstdc++/libg++ combination that *should* work?

-- 
Nick Kew

Site Valet - the essential service for anyone with a Website.
Now available at <URL:http://valet.webthing.com/>
Re: Getting a working libg++ on Linux
#771
Author: rich
Date: Wed, 05 Jul 2000 00:00
39 lines
1825 bytes
Nick Kew <nick@webthing.com> wrote:
[...]
: Is there a gcc/libstdc++/libg++ combination that *should* work?

I was able to get a program which uses the Integer class
working at the weekend by simply copying *.h, *.hP and *.cc
files out of the src/ subdir of the latest libg++ (2.8.1a
I think) and compiling as follows:

g++ -I. *.cc *.cpp -o my_program

(The *.cpp file was the source code to my own program).

For your information, to get Integer working, I needed the
following files:

AllocRing.cc
AllocRing.h
Integer.cc
Integer.h
Integer.hP
Obstack.cc
Obstack.h
builtin.cc
builtin.h
error.cc
fermat.cpp  <-- this was my program
fmtq.cc
gcd.cc
lg.cc
std.h

Rich.

-- 
rich@annexia.org | Is your school part of http://www.schoolmaster.net ?
BiblioTech Ltd, Unit 2 Piper Centre, 50 Carnwath Road, London, SW6 3EG.
+44 20 7384 6917 | http://www.annexia.org/cgi-bin/wbtx/choose.pl
Copyright � 2000 Richard Jones | GnuPG/PGP key from www.annexia.org
Re: Getting a working libg++ on Linux
#772
Author: Nix
Date: Thu, 06 Jul 2000 00:00
36 lines
2278 bytes
nick@webthing.com (Nick Kew) writes:

> I have a good deal of (older) software that relies on libg++.

Now that's *rare*.

> Now, the software works fine on older Linux, and on other systems with
> a clean gcc2.6.x or 2.7.x installation.

Yep. But it's not valid ISO C++, so it doesn't work on new g++'s.

> On recent linux, the libg++ README hints darkly at the problems I have
> been suffering.  It also refers the reader to a URL at sunsite for
> a Linux-specific libg++, but that URL doesn't exist!

You don't want it, anyway; there is a new-GCC-specific libg++.

> I've spent most of today experimenting with different gcc/libstdc++/libg++
> combos, without reaching a satisfactory result.
> 
> Is there a gcc/libstdc++/libg++ combination that *should* work?

Yes. On gcc.gnu.org and its mirrors, there is

/pub/gcc/infrastructure/libg++-2.8.1.3-20000419.tar.gz

which should work with gcc-2.95.* and above. It certainly works with the
latest GCC snapshots; I use it as an additional G++ testbed when
bootstrapping GCC snapshots after I've been hacking at them. It should
work with older GCCs too, but I'm not sure how far back it'll work; it's
probably not been tested with <2.95 for ages.

-- 
`I can guarantee it's no problem in my network, and if I don't get some
 sleep soon, I'll guarantee it will become a problem in your network.'
     --- Chris `Saundo' Saunderson deals with a late-night phone call
Re: Getting a working libg++ on Linux
#773
Author: Nick Kew
Date: Fri, 07 Jul 2000 00:00
27 lines
2064 bytes
In article <ddouj8.l4m.ln@www.bibliotech.net>,
	rich@no-annexia-spam.org writes:
> Nick Kew <nick@webthing.com> wrote:
> [...]
>: Is there a gcc/libstdc++/libg++ combination that *should* work?
> 
> I was able to get a program which uses the Integer class
> working at the weekend by simply copying *.h, *.hP and *.cc
> files out of the src/ subdir of the latest libg++ (2.8.1a

Thanks for the suggestion, but I tried that some time ago.
Unfortunately doing it with the String and Regex classes - which my
software uses heavily - took me on a long wild goose chase, ending up
with a broken ostrstream and an 'unstable' installation, which is
precisely the trouble I get when I install the whole thing.

I'm sure it has something to do with those dire warnings about libio ;-(

Guess I'll have to switch the server to BSD, and hope nothing else on it
breaks.  Hmph .. I know most of the s/w I need is OK, and I suppose sp and
postgres ought to be fine on it, but it's all more work, more testing, ...

-- 
Nick Kew

Site Valet - the essential service for anyone with a Website.
Now available at <URL:http://valet.webthing.com/>
Re: Getting a working libg++ on Linux
#774
Author: Nix
Date: Mon, 10 Jul 2000 00:00
18 lines
1736 bytes
nick@webthing.com (Nick Kew) writes:

> I'm sure it has something to do with those dire warnings about libio ;-(

No, libio is weird for quite a different reason; basically, to implement
sync_with_stdio and friends in the C++ iostreams library, the stdio and
iostreams have to be tied together. So the one is implmented in terms of
the other --- but this means encoding information about the mangled
names of some iostreams members into libio. So it is sensitive to
details of the mangler.

In GCC-3.0 the mangler is standardized (along with (much of) the rest of
the ABI), so this problem should get less severe.

-- 
`I can guarantee it's no problem in my network, and if I don't get some
 sleep soon, I'll guarantee it will become a problem in your network.'
     --- Chris `Saundo' Saunderson deals with a late-night phone call
Re: Getting a working libg++ on Linux
#769
Author: Nick Kew
Date: Thu, 13 Jul 2000 00:00
31 lines
2110 bytes
In article <ddouj8.l4m.ln@www.bibliotech.net>,
	rich@no-annexia-spam.org writes:
 
> I was able to get a program which uses the Integer class
> working at the weekend by simply copying *.h, *.hP and *.cc
> files out of the src/ subdir of the latest libg++ (2.8.1a
> I think) and compiling as follows:

Following your post and Nix's insights, I've tried another variant on
this approach, creating a libmini-g++ with only what I need from libg++,
and taking the real libg++ right out.  I'm getting promising-looking
results (compiles and links cleanly, and appears to run but needs more
testing).

This works by statically linking libmini-g++.a - at the obvious cost of
an extra 150Kb+ on my executable sizes - which are now significantly
larger than on FreeBSD (where the S/W has always worked cleanly).

> g++ -I. *.cc *.cpp -o my_program

I've used a slightly more sophisticated approach to build the mini-lib
as standalone.  Since parts of my S/W are GPL and LGPL, that'll leave
users the option to use mini-g++ or the real thing.

Testing over the weekend - round tuits permitting.

-- 
Nick Kew

Peninsular Penguin - Linux in the SouthWest
http://www.pen-pen.co.uk/
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