From owner-freebsd-ports Tue Sep 18 11:40: 8 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5139137B411 for ; Tue, 18 Sep 2001 11:40:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8IIe1R14861; Tue, 18 Sep 2001 11:40:01 -0700 (PDT) (envelope-from gnats) Received: from saturn.bsdhome.com (unknown [24.25.2.210]) by hub.freebsd.org (Postfix) with ESMTP id ECD9837B407 for ; Tue, 18 Sep 2001 11:38:49 -0700 (PDT) Received: from neutrino.bsdhome.com (jupiter [192.168.220.13]) by saturn.bsdhome.com (8.11.4/8.11.4) with ESMTP id f8IIcmf19261 for ; Tue, 18 Sep 2001 14:38:48 -0400 (EDT) Received: (from bsd@localhost) by neutrino.bsdhome.com (8.11.6/8.11.6) id f8IIcht68645; Tue, 18 Sep 2001 14:38:43 -0400 (EDT) (envelope-from bsd) Message-Id: <200109181838.f8IIcht68645@neutrino.bsdhome.com> Date: Tue, 18 Sep 2001 14:38:43 -0400 (EDT) From: Brian Dean Reply-To: Brian Dean To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/30652: [patch] XFree86-4: can't link both libXt and libXp due to multiple definitions of _Xpw_copyPasswd Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 30652 >Category: ports >Synopsis: [patch] XFree86-4: can't link both libXt and libXp due to multiple definitions of _Xpw_copyPasswd >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 18 11:40:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Brian Dean >Release: FreeBSD 4.4-STABLE i386 >Organization: >Environment: System: FreeBSD neutrino.bsdhome.com 4.4-STABLE FreeBSD 4.4-STABLE #3: Fri Sep 14 22:51:10 EDT 2001 root@neutrino.bsdhome.com:/usr/obj/usr/src/sys/NEUTRINO i386 XFree86-4 libraries Xt, Xp, probably others. >Description: Within Xos_r.h, _Xpw_copyPasswd() is defined as an __inline__ function. It needs to be declared static, otherwise, one can end up unable to link a program that uses both libXt.a and libXp.a, depending on the functions called. >How-To-Repeat: Nonsensical test program which demostrates the problem: #include int main() { XtScreenDatabase(); XpStartJob(); } Compile this with: cc -static -pthread -o xtest xtest.c -L/usr/X11R6/lib -lXp -lXt -lX11 -lXext -lSM -lICE /usr/X11R6/lib/libXt.a(Initialize.o): In function `_Xpw_copyPasswd': Initialize.o(.text+0x0): multiple definition of `_Xpw_copyPasswd' /usr/X11R6/lib/libXp.a(XpJob.o)(.text+0x0): first defined here >Fix: Add this patch as patch-k to /usr/ports/x11/XFree86-4/files: --- include/Xos_r.h.orig Tue Sep 18 10:46:06 2001 +++ include/Xos_r.h Tue Sep 18 10:46:26 2001 @@ -249,7 +249,7 @@ */ #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) -__inline__ void _Xpw_copyPasswd(_Xgetpwparams p) +static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p) { memcpy(&(p).pws, (p).pwp, sizeof(struct passwd)); This will fix the libraries on FreeBSD, though, NetBSD and OpenBSD are also affected, so ultimiately this patch should go back to the XFree folks. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message