I don't know enough about npm specifically or node in general to have been able to figure these (minor-looking) issues out, but I thought I'd leave these notes in case someone else wants to pick it up.
Starting from a bare, fresh FreeBSD 11.0 environment:
# uname -a
FreeBSD sbot.hopcount.ca 11.0-RELEASE-p8 FreeBSD 11.0-RELEASE-p8 #0: Wed Feb 22 06:12:04 UTC 2017 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
# pkg info
pkg-1.10.1 Package manager
#
Install the various prerequisite packages using pkg:
The problem building utp-native seems to be that FreeBSD's native (clang) C++ compiler is less tolerant of syntax violations than G++ is. A couple of spaces inserted into lines 54 and 76 of .../deps/libutp/utp_internal.cpp to separate the string literals and the I64u identifier in each case would fix it, but I haven't taken the time to figure out where the working directory is and how I can apply an edit in place without it being overwritten at the next build.
The two errors reported by make(1) in easy-ssb-pub/node_modules/sodium-prebuilt/Makefile are less than ideally trivial to identify since npm apparently removes .../mode_modules/sodium-prebuilt following the failure so I can't look in it. There's a FreeBSD package libsodium-1.0.12 I could install, but it's not obvious how to tell npm that it's there (it doesn't seem to care).
I don't know enough about npm specifically or node in general to have been able to figure these (minor-looking) issues out, but I thought I'd leave these notes in case someone else wants to pick it up.
Starting from a bare, fresh FreeBSD 11.0 environment:
Install the various prerequisite packages using
pkg
:Clone the easy-ssb-pub repo as an unprivileged user:
Use npm to install
easy-ssb-pub
-- output included this time, since this is where the fun starts. Long paste; skip to the end for weak commentry.The problem building
utp-native
seems to be that FreeBSD's native (clang) C++ compiler is less tolerant of syntax violations than G++ is. A couple of spaces inserted into lines 54 and 76 of.../deps/libutp/utp_internal.cpp
to separate the string literals and the I64u identifier in each case would fix it, but I haven't taken the time to figure out where the working directory is and how I can apply an edit in place without it being overwritten at the next build.The two errors reported by make(1) in
easy-ssb-pub/node_modules/sodium-prebuilt/Makefile
are less than ideally trivial to identify since npm apparently removes.../mode_modules/sodium-prebuilt
following the failure so I can't look in it. There's a FreeBSD packagelibsodium-1.0.12
I could install, but it's not obvious how to tell npm that it's there (it doesn't seem to care).