From owner-freebsd-current Mon Feb 20 03:30:10 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id DAA11231 for current-outgoing; Mon, 20 Feb 1995 03:30:10 -0800 Received: from sequent.kiae.su (sequent.kiae.su [144.206.136.6]) by freefall.cdrom.com (8.6.9/8.6.6) with SMTP id DAA11193 for ; Mon, 20 Feb 1995 03:29:59 -0800 Received: by sequent.kiae.su id AA14105 (5.65.kiae-2 ); Mon, 20 Feb 1995 14:20:16 +0300 Received: by sequent.KIAE.su (UUMAIL/2.0); Mon, 20 Feb 95 14:20:12 +0300 Received: (from ache@localhost) by astral.msk.su (8.6.8/8.6.6) id OAA00772; Mon, 20 Feb 1995 14:21:36 +0300 To: Nate Williams , "Rodney W. Grimes" Cc: current@freefall.cdrom.com References: <199502200534.WAA01333@trout.sri.MT.net> In-Reply-To: <199502200534.WAA01333@trout.sri.MT.net>; from Nate Williams at Sun, 19 Feb 1995 22:34:04 -0700 Message-Id: Organization: Olahm Ha-Yetzirah Date: Mon, 20 Feb 1995 14:21:36 +0300 X-Mailer: Mail/@ [v2.32 FreeBSD] From: "Andrey A. Chernov, Black Mage" X-Class: Fast Subject: Re: libcompat and shlib conflict Lines: 43 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 2017 Sender: current-owner@FreeBSD.org Precedence: bulk In message <199502200534.WAA01333@trout.sri.MT.net> Nate Williams writes: >[ Multiple definitions of regerror() in libcompat ] >> > However, the newest ld is giving me errors trying to build >> > libcompat (correctly so) with multiple definitions of the function >> > regerror(), which is defined in both libcompat/4.3/regex.c and >> > libcompat/regexp/regerror.c. >Does anyone know what should be done here? NetBSD just ignores the >problem by not making a shared library. The problem still exists though >since at link time I'm not sure which version of regerror() will get >used, and a quick perusal of the code makes it obvious that they can't >be combined into one function. I'm sure the function that is first >found would be the first function linked in, but that could change >depending on the other functions in the library and tsort. >We either need to completely remove one of the functions, or ignore the >problem and only build a static library which avoids the error at the >cost of later problems in code. (But, I suppose folks shouldn't be >using the compat libraries anyway, right. :( ) >What say you? There is historically two regex interfaces: regexp & regex. _Both_ have regerror(), it is right. Only _one_ interface can be picked. If you pick regex module, you pick regerror() too from same file. Be shure that your regerror() call not first call in pgm in this case. If you pick regexp module, regerror() from there must be first in library. Current tsort does just right thing placing it first. I just build libcompat without any problems. Maybe better variant will be to merge both regerror() function into one function which is ruled by setting global variables into regex & regexp. -- Andrey A. Chernov : And I rest so composedly, /Now, in my bed, ache@astral.msk.su : That any beholder /Might fancy me dead - FidoNet: 2:5020/230.3 : Might start at beholding me, /Thinking me dead. RELCOM Team,FreeBSD Team : E.A.Poe From "For Annie" 1849