From owner-freebsd-current Mon Aug 31 14:09:43 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA02414 for freebsd-current-outgoing; Mon, 31 Aug 1998 14:09:43 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA02400 for ; Mon, 31 Aug 1998 14:09:40 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from herring.nlsystems.com (herring.nlsystems.com [10.0.0.2]) by nlsystems.com (8.9.1/8.8.5) with SMTP id WAA01136; Mon, 31 Aug 1998 22:08:35 +0100 (BST) Date: Mon, 31 Aug 1998 22:08:34 +0100 (BST) From: Doug Rabson To: Tugrul Galatali cc: freebsd-current@FreeBSD.ORG Subject: Re: XFree86 and ELF In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 31 Aug 1998, Tugrul Galatali wrote: > Most ports are compiling just fine with ELF. The only problem I > have encountered is compiling XFree86. The libs compile just fine from > watching it scroll by now and then, but linking against the programs under > the program subdirectory results in errors such as the following > > cc -o appres -O2 -ansi -pedantic -Dasm=__asm -L../../exports/lib > appres.o -lXt -lSM -lICE -lXext -lX11 -L/usr/X11R6/lib -lxpg4 > -Wl,-R,/usr/X11R6/lib > ../../exports/lib/libICE.a(transport.o): In function > `_IceTransSockINETConnect': > transport.o(.text+0x1070): undefined reference to `inet_addr' > ../../exports/lib/libICE.a(transport.o): In function > `_IceTransGetPeerNetworkId': > transport.o(.text+0x2912): undefined reference to `inet_ntoa' > ../../exports/lib/libX11.a(ximtrans.o): In function > `_X11TransSocketINETConnect': > x11trans.o(.text+0x544): undefined reference to `inet_addr' > ../../exports/lib/libX11.a(ximtrans.o): In function > `_XimXTransSocketINETConnect': > ximtrans.o(.text+0x510): undefined reference to `inet_addr' > *** Error code 1 > > Stop. > > ... (quickly transcribed by hand ;) > > Anyone willing to post a makeshift patch to carry us along till > the port gets ELF savvy, or to test the port to be? I have a set of patches for the port. I think that we need to fix the weak definition of inet_addr in libc though. Index: patches/patch-ag =================================================================== RCS file: patch-ag diff -N patch-ag --- /dev/null Mon Aug 31 22:00:00 1998 +++ patch-ag Wed Aug 26 20:22:05 1998 @@ -0,0 +1,10 @@ +--- lib/xtrans/Xtranssock.c.dist Wed Aug 26 20:21:24 1998 ++++ lib/xtrans/Xtranssock.c Wed Aug 26 20:17:29 1998 +@@ -98,6 +98,7 @@ + #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) + #include + #endif /* __NetBSD__ || __OpenBSD__ || __FreeBSD__ */ ++#include + #include + #endif /* !NO_TCP_H */ + #include Index: patches/patch-ah =================================================================== RCS file: patch-ah diff -N patch-ah --- /dev/null Mon Aug 31 22:00:00 1998 +++ patch-ah Wed Aug 26 20:45:18 1998 @@ -0,0 +1,10 @@ +--- programs/xauth/gethost.c.dist Wed Aug 26 20:22:27 1998 ++++ programs/xauth/gethost.c Wed Aug 26 20:23:47 1998 +@@ -58,6 +58,7 @@ + #endif + #include + #include ++#include + #ifdef SYSV + #ifdef i386 + #ifndef sco Index: patches/patch-ai =================================================================== RCS file: patch-ai diff -N patch-ai --- /dev/null Mon Aug 31 22:00:00 1998 +++ patch-ai Wed Aug 26 20:26:40 1998 @@ -0,0 +1,10 @@ +--- programs/xdm/chooser.c.dist Wed Aug 26 20:25:33 1998 ++++ programs/xdm/chooser.c Wed Aug 26 20:26:02 1998 +@@ -87,6 +87,7 @@ + #include + #endif + #include ++#include + #else /* MINIX */ + #include + #include Index: patches/patch-aj =================================================================== RCS file: patch-aj diff -N patch-aj --- /dev/null Mon Aug 31 22:00:00 1998 +++ patch-aj Wed Aug 26 20:31:49 1998 @@ -0,0 +1,18 @@ +--- programs/xhost/xhost.c.dist Wed Aug 26 20:28:09 1998 ++++ programs/xhost/xhost.c Wed Aug 26 20:31:38 1998 +@@ -85,11 +85,14 @@ + #endif + #endif /* NEEDSOCKETS */ + ++#ifdef __FreeBSD__ ++#include ++#endif + #ifdef notdef + #include + bogus definition of inet_makeaddr() in BSD 4.2 and Ultrix + #else +-#if !defined(hpux) && !defined(NCR) && !defined(__EMX__) ++#if !defined(hpux) && !defined(NCR) && !defined(__EMX__) && !defined(__FreeBSD__) + extern unsigned long inet_makeaddr(); + #endif + #endif Index: patches/patch-ak =================================================================== RCS file: patch-ak diff -N patch-ak --- /dev/null Mon Aug 31 22:00:00 1998 +++ patch-ak Wed Aug 26 20:45:13 1998 @@ -0,0 +1,10 @@ +--- lib/SM/sm_genid.c.dist Wed Aug 26 20:44:27 1998 ++++ lib/SM/sm_genid.c Wed Aug 26 20:44:44 1998 +@@ -60,6 +60,7 @@ + #include + #endif + #include ++#include + #define XOS_USE_NO_LOCKING + #define X_INCLUDE_NETDB_H + #include -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 951 1891 Fax: +44 181 381 1039 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message