Date: Fri, 13 Mar 2015 13:48:42 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 198350] [www/node] segfault when installing npm on 8.4, 9.3 on i386 Message-ID: <bug-198350-13-t7mZWJW2jH@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-198350-13@https.bugs.freebsd.org/bugzilla/> References: <bug-198350-13@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D198350 --- Comment #4 from Marcin Cie=C5=9Blak <saper@saper.info> --- Here is a quick workaround to get www/npm to build on amd64 host running i3= 86 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=3D npm PORTVERSION=3D 2.7.0 +PORTREVISION=3D 1 CATEGORIES=3D www MASTER_SITES=3D 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} =3D=3D "i386" +# Workaround for kernel bug 178881 +EXTRA_PATCHES+=3D ${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 @@ + } +=20 + function getLocalAddresses() { +- Object.keys(os.networkInterfaces()).map(function (nic) { +- return os.networkInterfaces()[nic].filter(function (addr) { +- return addr.family =3D=3D=3D "IPv4" +- }) +- .map(function (addr) { +- return addr.address +- }) +- }).reduce(function (curr, next) { +- return curr.concat(next) +- }, []).concat(undefined) ++ return [ '127.0.0.1', undefined ] + } +=20 + exports.shorthands =3D 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. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-198350-13-t7mZWJW2jH>