This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: glibc-2.1.X, c++ and libstdc++


Hi

>>>>> On Mon, 15 Nov 1999 11:20:28 -0500, "k" == kutek  <kutek@cybercomm.net> wrote:

k> somewhere between glibc 2.1 and 2.1.2 , all my c++ compilers
k> dropped dead.  (2.7.2.3, 2.7.2.3-stackguard, 2.8.1, egcs 1.1.2) and
k> now c++ 2.95.2, for which i cannot get a working version.

k> thus i tried to recompile libstdc++ for the various gcc versions,
k> but i am unable to get a functioning compiler (gcc works fine).when
k> i plug in redhat's libstdc++ i can compile working programs...but
k> not produce a working libstdc++.

k> i did apply any patches i could find for libstdc++ ( for
k> libstdc++-2.8.1.1) relating to glibc 2.1.X but i still can't
k> compile it ( well, it compiles, it just doesn't work)

k> i assumed that gcc 2.95.2 would contain any fixes for issues
k> related to glibc-2.1.X, but c++ and the included libstdc++ do not
k> work. again, the C compiler seems to work fine.

k> how do i know? this simple program (from configure) will compile
k> ok, but segfaults when run.

k> #include "confdefs.h" main(){ return(0);
	
k> 	}

k> any suggestions?

Looks like some part is compiled with vtable-thunks an some without.
If you want to build a working C++ program you have to make sure that
every part is compiled the same way.  Out of the box libstdc++ in
gcc-2.95.2 is compiled with vtable-thunks but glibc-2.1.2 the old
fashioned way.  I'm not using any linux distribution.  But when
redhead's libstdc++ works with your self compiled libc I would suggest
to build your own libstdc++ with `fno-vtable-thunks' to make the
system work with foreign binaries.  You have to do that with _every_
lib that contains C++ sources.

Frank

-- 
Frank Vahldiek			Zedernweg 5
fjv@hondo.escape.de		D-38108 Braunschweig-Hondelage

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]