From owner-freebsd-questions Thu Nov 16 19:22:14 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id TAA06966 for questions-outgoing; Thu, 16 Nov 1995 19:22:14 -0800 Received: from chemserv.umd.edu (chemserv.umd.edu [129.2.64.40]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id TAA06908 ; Thu, 16 Nov 1995 19:21:43 -0800 Received: from espresso.eng.umd.edu (espresso.eng.umd.edu [129.2.98.13]) by chemserv.umd.edu (8.7.1/8.7) with ESMTP id WAA05127; Thu, 16 Nov 1995 22:21:33 -0500 (EST) Received: (chuckr@localhost) by espresso.eng.umd.edu (8.7.1/8.6.4) id WAA15395; Thu, 16 Nov 1995 22:21:32 -0500 (EST) Date: Thu, 16 Nov 1995 22:21:32 -0500 (EST) From: Chuck Robey X-Sender: chuckr@espresso.eng.umd.edu To: "Marc G. Fournier" cc: freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Shared Libraries...almost there... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org Precedence: bulk On Thu, 16 Nov 1995, Marc G. Fournier wrote: > > Hi... > > Well, I've finally got it down to the point that I have > to compile with -fpic, and then link with "ld -Bshareable" to create > a shared library...but it doesn't look right... > > Looking at /usr/share/mk/bsd.lib.mk, I'm supposed to be using > "shlib_version" to get major/minor numbers for the libraries I create, > but I can't find that. And, the shared library I created is over 3x > the size of the original ncurses shared library that comes with the > system...so I screwed up somewhere :( > > So...back to the drawing board... > > what am I missing? can someone who has the src's distribution > available send me the Makefile for ncurses that is being used for the > standard ncurses distribution? > > Essentially, so that I don't get a bunch of "just type make out > of the src's directory" answers this time...I'm trying to get ncurses > 1.9.8 compiled and working. It compiles and works cleanly using static > libraries, but getting it to compile shared has been a new experience... > > ...so, what key step have I missed in all this? I assume that > when gcc compiles, its going to look at the "registered" ncurses shared > library, which is the one that was installed when the system was built, > right? You know there's two version of that pic flag stuff, which stands for Position Independent Code (I think). The -fPIC is supposed to be stronger in force than the -fpic, but most code does not need the strong -fPIC. I don't know how to tell the difference, except to try it and find out. As far as code size, have you checked to see if you happen to be using the -g flag? That causes gcc to stuff in a huge number of debugging flags and can really bloat out code. A lot of packages come with that set automatically, which I think is dumb, because if you're sophisticated enough to know how to use a debugger, then you would know how to set the -g your ownself. If you weren't that familiar with it, then you would have huge code and no idea how to fix it. > > > thanks... > > > Marc G. Fournier | Knowledge, Information and Communications, Inc (ki.net) > scrappy@hub.org | > soon to be: | > scrappy@ki.net | For more information, send me email. > > ========================================================================== Chuck Robey chuckr@eng.umd.edu, I run FreeBSD-current on n3lxx + Journey2 Here's OJ's internet address in hex code: 00 2F 2F 2F 2F 5C 7F 2D 0D 15 1B 19 24 24 24 18 If you can't recall the translation, here it is: null character, slash, slash, slash, slash, backslash, rubout, dash, carriage return, negative acknowledgement, escape, end of media, dollar sign, dollar sign, dollar sign, cancel