NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Help compiling Wine



On Thu, Jan 15, 2009 at 4:02 PM, Austin English 
<austinenglish%gmail.com@localhost> wrote:
> Howdy,
>
> I'm working on compiling Wine on NetBSD. I've taken a look at the
> port, and used a few of those patches for the compile, as well as
> submitted a couple bugs upstream. I'm trying to fix the compile in
> dlls/iphlpapi/ipstats.c (Wine bug 16931 -
> http://bugs.winehq.org/show_bug.cgi?id=16931).
>
> Currently, there are two problems:
> A) configure isn't picking up HAVE_NETINST_*
> B) RTF_MULTICAST isn't available on NetBSD
>
> The ports patch
> (ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/emulators/wine-devel/patches/patch-ad)
> tries to work around this by disabling a lot of it's functionality.
> There is a similar patch for OpenBSD that actually works
> (http://bugs.winehq.org/attachment.cgi?id=18289), but again, it's a
> hack.
>
> Back on topic, I'd like to fix this properly in Wine. I've taken a
> stab at, seems that /usr/include/netinst/'s layout is quite different
> on NetBSD than Linux. Wine's configure script isn't picking up a lot
> of these:
> checking for netinet/ip.h... no
> checking for net/if.h... yes
> checking for net/if_arp.h... yes
> checking for net/if_dl.h... yes
> checking for net/if_types.h... yes
> checking for net/route.h... yes
> checking for netinet/if_ether.h... no
> checking for netinet/in_pcb.h... no
> checking for netinet/ip_icmp.h... no
> checking for netinet/ip_var.h... yes
> checking for netinet/udp.h... yes
> checking for netipx/ipx.h... no
> checking for netinet/tcp_var.h... no
> checking for netinet/udp_var.h... yes
> checking for netinet/icmp_var.h... no
> checking for netinet/tcp_timer.h... yes
>
> I've hacked away on it, getting configure to recognize them, but then
> building wine just has more cryptic errors, mostly about undefined
> structs, etc. Adjusting the includes in that file to match configure
> helps on a couple of them, but not most (I don't have those results
> handy, I'll send them when I get a chance).
>
> On to the more relevant question. Does anyone have a project utilizing
> these headers that builds properly? I could use that to probably get a
> more accurate build script going.
>
> Thanks!
> --
> -Austin
>
> P.S., Please CC me on any replies, I'm not subscribe to netbsd-users.
>


I've got most of the includes working now, but one:
"checking for net/if_ether.h... no"

Looking at config.log:
configure:8255: checking for net/if_ether.h
configure:8306: ccache gcc -c -O2 -I/usr/pkg/include -I/usr/include
-I/usr/pkg/include/freetype2 -I/usr/X11R6/include -I/usr/pkg/include
-I/usr/include -I/usr/pkg/include/freetype2 -I/usr/X11R6/include conf$
In file included from conftest.c:130:
/usr/include/net/if_ether.h:149: error: field 'ec_if' has incomplete type
configure:8313: $? = 1

looking at if_ether.h:
148: struct  ethercom {
149:        struct  ifnet ec_if;                    /* network-visible
interface */

grep'ing for that in /usr/include:
/usr/include/netinet/ip_compat.h:#  define      ifnet           net_device

The relevant code from configure.ac:
AC_CHECK_HEADERS([net/if_ether.h],,,
    [#include <sys/types.h>
     #ifdef HAVE_SYS_SOCKET_H
     # include <sys/socket.h>
     #endif
     #ifdef HAVE_SYS_SOCKETVAR_H
     # include <sys/socketvar.h>
     #endif
     #ifdef HAVE_NETINET_IF_H
     # include <netinet/if.h>
     #endif
     #ifdef HAVE_NETINET_IN_H
     # include <netinet/in.h>
     #endif
     #ifdef HAVE_NETINET_IN_SYSTM_H
     # include <netinet/in_systm.h>
     #endif
     #ifdef HAVE_NETINET_IP_H
     # include <netinet/ip.h>
     #endif
     #ifdef HAVE_NETINET_IP_COMPAT_H
     # include <netinet/ip_compat.h>
     #endif
     #ifdef HAVE_NETINET_IF_ARP_H
     # include <netinet/if_arp.h>
     #endif
     #ifdef HAVE_NETINET_IF_INARP_H
     # include <netinet/if_inarp.h>
     #endif])

All the other includes are working, just need this last one...

-- 
-Austin


Home | Main Index | Thread Index | Old Index