public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Lorens Kockum <lk-egcs-gen@bigears.solsoft.com>
To: egcs@egcs.cygnus.com
Subject: egcs 1.1.1: apparently multiple library inclusion??
Date: Tue, 22 Dec 1998 10:42:00 -0000	[thread overview]
Message-ID: <19981222194228.F3581@bigears.solsoft.fr> (raw)

Hi, I just installed egcs for evaluation, and I have a bit of a
problem during linking.

At first, compiling my existing C and C++ code, no problems.
Then I spent two days adding in STL lists, compiling the object
files as I went, with (finally, at least ;-)) no errors.  (No, I
did not forget the make clean...)

The first errors that come out of the linker are:
% ./display_npl.o: In function `int lexicographical_compare_3way<signed char const *, signed char const *>(signed char const *, signed char const *, signed char const *, signed char const *)':
% /usr/include/g++-2/stl_algobase.h(.text+0x0): multiple definition of `operator new(unsigned int, void *)'
% ./main.o(.text+0x0):/usr/include/g++-2/stl_algobase.h: first defined here
% ./display_npl.o: In function `operator new [](unsigned int, void *)':
% /usr/lib/gcc-lib/i486-linux/egcs-2.91.60/include/new:43: multiple definition of `operator new [](unsigned int, void *)'
% ./main.o:/usr/lib/gcc-lib/i486-linux/egcs-2.91.60/include/new:43: first defined here
% ./display_npl.o: In function `ios::init(streambuf *, ostream *)':
% /usr/include/g++-2/streambuf.h:469: multiple definition of `ios::init(streambuf *, ostream *)'
% ./main.o:/usr/include/g++-2/streambuf.h:469: first defined here

I don't get it.  Does this mean that the offending definitions,
the ones that can not be made multiple times, are made and
included in each object file?

How do I correct that?


FWIW, the errors get even funnier; using a different machine,
system and egcs installed by a different person, AFAICS
according to the recommendations in the egcs documentation:

	su - sysop
	cd /home/sysop/egcs-compile
	../egcs-untar/configure --prefix=/usr/local/egcs
	make
	make install
	logout
	export PATH=/usr/local/egcs/bin:$PATH
	cd project_sources
        ./configure
	make

I have one definition in a .h that is in the compilation
directories /home/sysop/egcs-compile, which are unreadable
for the user doing the compile, and the other in
/usr/local/egcs/whatever.  I suppose that means that a library
is generated during egcs compilation, and that library is put in
/usr/local/egcs, and that I somehow contrive to include both?

Anyway, if someone could point me in the right direction, I'd be
very happy, I'm going in circles here.  More info upon request.

-- 
#include <std_disclaim.h>                          Lorens Kockum

             reply	other threads:[~1998-12-22 10:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-22 10:42 Lorens Kockum [this message]
1998-12-29  3:21 ` Please, a word of help (Was: Re: egcs 1.1.1: apparently multiple library inclusion??) Lorens Kockum
1999-01-31 23:58   ` Chip Salzenberg
1999-01-31 23:58     ` Lorens Kockum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19981222194228.F3581@bigears.solsoft.fr \
    --to=lk-egcs-gen@bigears.solsoft.com \
    --cc=egcs@egcs.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).