Bug 224637 - www/node: Fails to build/run on FreeBSD 10.3
Summary: www/node: Fails to build/run on FreeBSD 10.3
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Walter Schwarzenfeld
Depends on:
Reported: 2017-12-28 13:20 UTC by Otacílio de Araújo Ramos Neto
Modified: 2019-02-06 11:30 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (bhughes)


Note You need to log in before you can comment on or make changes to this bug.
Description Otacílio de Araújo Ramos Neto 2017-12-28 13:20:23 UTC
Port build www/node fails on FreeBSD 10.3

  c++ '-DNODE_ARCH="x64"' '-DNODE_PLATFORM="freebsd"' '-DNODE_WANT_INTERNALS=1' '-DV8_DEPRECATION_WARNINGS=1' '-DNODE_OPENSSL_SYSTEM_CERT_PATH=""' '-DHAVE_INSPECTOR=1' '-D__POSIX__' '-DHAVE_OPENSSL=1' '-DNODE_USE_V8_PLATFORM=1' '-DNODE_HAVE_I18N_SUPPORT=1' '-DHTTP_PARSER_STRICT=0' '-DNGHTTP2_STATICLIB' -I../src -I../tools/msvs/genfiles -I/usr/ports/www/node/work/node-v9.3.0/out/Release/obj/gen -I/usr/ports/www/node/work/node-v9.3.0/out/Release/obj/gen/include -I../deps/openssl/openssl/include -I../deps/v8/include -I../deps/http_parser -I../deps/nghttp2/lib/includes  -pthread -Wall -Wextra -Wno-unused-parameter -m64 -D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF /usr/ports/www/node/work/node-v9.3.0/out/Release/.deps//usr/ports/www/node/work/node-v9.3.0/out/Release/obj.target/node/src/connect_wrap.o.d.raw -isystem /usr/local/include -O2 -pipe -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -c -o /usr/ports/www/node/work/node-v9.3.0/out/Release/obj.target/node/src/connect_wrap.o ../src/connect_wrap.cc
  c++ '-DNODE_ARCH="x64"' '-DNODE_PLATFORM="freebsd"' '-DNODE_WANT_INTERNALS=1' '-DV8_DEPRECATION_WARNINGS=1' '-DNODE_OPENSSL_SYSTEM_CERT_PATH=""' '-DHAVE_INSPECTOR=1' '-D__POSIX__' '-DHAVE_OPENSSL=1' '-DNODE_USE_V8_PLATFORM=1' '-DNODE_HAVE_I18N_SUPPORT=1' '-DHTTP_PARSER_STRICT=0' '-DNGHTTP2_STATICLIB' -I../src -I../tools/msvs/genfiles -I/usr/ports/www/node/work/node-v9.3.0/out/Release/obj/gen -I/usr/ports/www/node/work/node-v9.3.0/out/Release/obj/gen/include -I../deps/openssl/openssl/include -I../deps/v8/include -I../deps/http_parser -I../deps/nghttp2/lib/includes  -pthread -Wall -Wextra -Wno-unused-parameter -m64 -D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF /usr/ports/www/node/work/node-v9.3.0/out/Release/.deps//usr/ports/www/node/work/node-v9.3.0/out/Release/obj.target/node/src/env.o.d.raw -isystem /usr/local/include -O2 -pipe -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -c -o /usr/ports/www/node/work/node-v9.3.0/out/Release/obj.target/node/src/env.o ../src/env.cc
../src/env.cc:180:11: error: use of undeclared identifier 'uv_os_getpid'
1 error generated.
gmake[3]: *** [node.target.mk:176: /usr/ports/www/node/work/node-v9.3.0/out/Release/obj.target/node/src/env.o] Error 1
rm 9e73802ceac03f55261bd8c9820cfb4878c84ce4.intermediate
gmake[2]: *** [Makefile:87: node] Error 2
gmake[2]: Leaving directory '/usr/ports/www/node/work/node-v9.3.0'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Comment 1 Bradley T. Hughes freebsd_committer 2018-01-03 07:56:10 UTC
It looks like you need upgrade libuv as well. The uv_os_getpid() function was added in libuv 1.18.0
Comment 2 Otacílio de Araújo Ramos Neto 2018-01-03 14:10:37 UTC
Okay. But is necessary to explicitly add the request in 
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2018-02-19 07:58:13 UTC
@Bradley Can you add >=1.18.0 to the existing libuv LIB_DEPENDS line so that users  (and the build system) are informed of the minimum version requirement.

Another user recently reported (via IRC) that the node/npm packages fail at runtime with the same error.
Comment 4 Bradley T. Hughes freebsd_committer 2018-06-08 04:55:48 UTC
LIB_DEPENDS doesn't take version range like the other *_DEPENDS values. I think I may use explicit BUILD_DEPENDS and RUN_DEPENDS values with minimum versions instead.
Comment 5 Walter Schwarzenfeld freebsd_triage 2019-02-06 11:30:09 UTC
10.3 is EOL. If there are issues with newer versions, please open a new PR. Close with overcome by events.