From owner-freebsd-hackers Wed Apr 17 12:15:18 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA28852 for hackers-outgoing; Wed, 17 Apr 1996 12:15:18 -0700 (PDT) Received: from horst.bfd.com ([204.160.242.10]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id MAA28847 for ; Wed, 17 Apr 1996 12:15:17 -0700 (PDT) Received: from harlie.bfd.com (bastion.bfd.com [204.160.242.2]) by horst.bfd.com (8.7.5/8.7.3) with SMTP id MAA09070; Wed, 17 Apr 1996 12:20:27 -0700 (PDT) Date: Wed, 17 Apr 1996 12:16:51 -0700 (PDT) From: "Eric J. Schwertfeger" To: Warner Losh cc: hackers@FreeBSD.org Subject: Re: How to make g++ shared libraries? In-Reply-To: <199604171831.MAA02678@rover.village.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk On Wed, 17 Apr 1996, Warner Losh wrote: > : I'm trying to create a shared version of the Cvo (Cray Visual Objects) > : c++ library, but it isn't working. > > Are you linking the library is gcc or g++? Also, where does one get > cvo? It sounds kinda like something that I used to work on :-) Ah, this is what John Polstra pointed out. > You must include "/usr/lib/c++rt0.o" near the front of your "ld" command > line when creating C++ shared libraries. E.g., As for where, Paul Borman is maintaining the following > You can pick up > > ftp://ftp.krystal.com/pub/Cvo.1.0.2.README > ftp://ftp.krystal.com/pub/Cvo.1.0.2.src.pax.gz > ftp://ftp.krystal.com/pub/Cvo.1.0.2.doc.pax.gz You will need to add the following to Cvo/_Machine.h++ (I did it right after the linux section). #if defined(__FreeBSD__) #define __SIGNAL_RETURN_INT__ #define __NEED_SELECT_DEF__ #define __NEED_SYS_IOCTL__ #endif > g++ often does things that gcc won't do. You may also have found a > linker bug, but I could have sworn that global ctors in shared > libraries were called on FreeBSD. Not the case, the above fixed the problem > I had OI running on FreeBSD before > we went through and gutted all the global objects that needed global > ctors due to other OSes being somewhat brain damaged wrt shared c++ > libraries. Is there a free OI kit for FreeBSD? I've heard good things about it, and would like to try it, but couldn't find it under ports. Since I'm still in the brushing up stage for C++ (long, agrivating story), and just learning Cvo, I'm quite open to change. Of course, I'm also not against doing a Cvo port myself, even if I do change over to OI.