Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Aug 1998 22:08:34 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Tugrul Galatali <galatalt@stuy.edu>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: XFree86 and ELF
Message-ID:  <Pine.BSF.4.01.9808312207420.342-100000@herring.nlsystems.com>
In-Reply-To: <Pine.LNX.3.96.980831150333.26883A-100000@ernie.stuy.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <machine/endian.h>
+ #endif /* __NetBSD__ || __OpenBSD__ || __FreeBSD__ */
++#include <arpa/inet.h>
+ #include <netinet/tcp.h>
+ #endif /* !NO_TCP_H */
+ #include <sys/ioctl.h>
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 <netdb.h>
+ #include <netinet/in.h>
++#include <arpa/inet.h>
+ #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    <socket.h>
+ #endif
+ #include    <netinet/in.h>
++#include    <arpa/inet.h>
+ #else /* MINIX */
+ #include <net/hton.h>
+ #include <net/netlib.h>
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 <arpa/inet.h>
++#endif
+ #ifdef notdef
+ #include <arpa/inet.h>
+ 	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 <socket.h>
+ #endif
+ #include <netinet/in.h>
++#include <arpa/inet.h>
+ #define XOS_USE_NO_LOCKING
+ #define X_INCLUDE_NETDB_H
+ #include <X11/Xos_r.h>

--
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.01.9808312207420.342-100000>