pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/51970: Ethernet (libpcap) support not compiled in
The following reply was made to PR pkg/51970; it has been noted by GNATS.
From: Rin Okuyama <rokuyama%rk.phys.keio.ac.jp@localhost>
To: Hans Rosenfeld <hans%NetBSD.org@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, coypu%SDF.ORG@localhost
Subject: Re: pkg/51970: Ethernet (libpcap) support not compiled in
Date: Thu, 23 Feb 2017 03:26:33 +0900
On 2017/02/23 1:09, Hans Rosenfeld wrote:
> Can you please add the output of the "show ethernet" command in simh?
sim> show ethernet
ETH devices:
eth0 wm0 (No description available)
eth1 tap0 (No description available)
eth2 tap1 (No description available)
eth3 tap:tapN (Integrated Tun/Tap support)
eth4 nat:{optional-nat-parameters} (Integrated NAT (SLiRP) support)
eth5 udp:sourceport:remotehost:remoteport (Integrated UDP bridge support)
libpcap version 1.6.2
> Apart from that it's interesting that the simh makefile detects all the
> other stuff on NetBSD. Perhaps we should patch the makefile to simplify
> this for all platforms. I'm not sure I have time for that now, so
> perhaps you could make those variables conditional on the operating
> system instead of ripping them out?
I examined logic in makefile related to INCLUDES and LIBRARIES, and
found that they do not search /usr/include (/usr/lib) when (1)
INCLUDES (LIBRARIES) is specified and (2) /usr/include (/usr/lib) is
not explicitly included in it.
For NetBSD with Makefile r1.44 and r1.45, /usr/include is excluded
from INCLUDES. Therefore, simh cannot find pthread.h, dlfcn.h, and
mman.h. This is why ethernet support does not work (libpcap cannot
be loaded dynamically).
With the attached patch, it works fine on NetBSD. Can you please
test it on OmniOS? If there's no problem, I will commit it!
Thanks,
rin
====
Index: Makefile
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/emulators/simh/Makefile,v
retrieving revision 1.45
diff -u -r1.45 Makefile
--- Makefile 15 Feb 2017 01:27:00 -0000 1.45
+++ Makefile 22 Feb 2017 17:39:19 -0000
@@ -2,7 +2,7 @@
DISTNAME= simh-4.0.0
PKGNAME= simh-4.0.0.20161218
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_GITHUB:=simh/}
GITHUB_PROJECT= simh
@@ -33,18 +33,17 @@
CFLAGS.SunOS+= -DBSD_COMP
LDFLAGS.SunOS+= -lm
-CFLAGS+= -DUSE_NETWORK
-LDFLAGS+= -lpcap
-
INSTALLATION_DIRS= bin share/simh share/doc/simh
MAKE_FILE= makefile
-INCLUDES= ${PREFIX:Q}/include:\
+INCLUDES= /usr/include:\
+ ${PREFIX:Q}/include:\
${BUILDLINK_PREFIX.SDL_ttf:Q}/include/SDL:\
${BUILDLINK_PREFIX.libpcap:Q}/include/pcap:\
${BUILDLINK_PREFIX.pcre:Q}/include/pcre:\
${BUILDLINK_PREFIX.png:Q}/include
-LIBRARIES= ${PREFIX:Q}/lib:\
+LIBRARIES= /usr/lib:\
+ ${PREFIX:Q}/lib:\
${BUILDLINK_PREFIX.SDL_ttf:Q}/lib${LIBABISUFFIX}:\
${BUILDLINK_PREFIX.libpcap:Q}/lib${LIBABISUFFIX}:\
${BUILDLINK_PREFIX.pcre:Q}/lib${LIBABISUFFIX}:\
Home |
Main Index |
Thread Index |
Old Index