[Bug 198350] [www/node] segfault when installing npm on 8.4, 9.3 on i386
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Mar 13 13:48:42 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198350
--- Comment #4 from Marcin Cieślak <saper at saper.info> ---
Here is a quick workaround to get www/npm to build on amd64 host running i386
jail:
diff -ruN /usr/ports/www/npm/Makefile npm/Makefile
--- /usr/ports/www/npm/Makefile 2015-03-11 16:10:57.000000000 +0000
+++ npm/Makefile 2015-03-13 12:50:19.000000000 +0000
@@ -3,6 +3,7 @@
PORTNAME= npm
PORTVERSION= 2.7.0
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= LOCAL/sunpoet
@@ -79,4 +80,11 @@
@sudo ${INSTALL} -m 644 ${MS_WRKSRC}/${PORTNAME}-${MS_VERSION}.tar.xz
${DISTDIR}/
@cd ${.CURDIR}/ && ${MAKE_CMD} makesum
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "i386"
+# Workaround for kernel bug 178881
+EXTRA_PATCHES+= ${PATCHDIR}/bug178881-workaround
+.endif
+
+.include <bsd.port.post.mk>
diff -ruN /usr/ports/www/npm/files/bug178881-workaround
npm/files/bug178881-workaround
--- /usr/ports/www/npm/files/bug178881-workaround 1970-01-01
00:00:00.000000000 +0000
+++ npm/files/bug178881-workaround 2015-03-13 11:13:41.000000000 +0000
@@ -0,0 +1,20 @@
+--- lib/config/defaults.js.orig 2015-02-20 16:48:40.000000000 +0000
++++ lib/config/defaults.js 2015-03-13 11:11:16.000000000 +0000
+@@ -325,16 +325,7 @@
+ }
+
+ function getLocalAddresses() {
+- Object.keys(os.networkInterfaces()).map(function (nic) {
+- return os.networkInterfaces()[nic].filter(function (addr) {
+- return addr.family === "IPv4"
+- })
+- .map(function (addr) {
+- return addr.address
+- })
+- }).reduce(function (curr, next) {
+- return curr.concat(next)
+- }, []).concat(undefined)
++ return [ '127.0.0.1', undefined ]
+ }
+
+ exports.shorthands =
it just cheats npm to think it only has 127.0.0.1 IPv4 address.
of course the "i386" test is wrong, because we have a problem
probably only on amd64 host/i386 guest combination.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list