Unable to build nodejs-12.16.1 package due to a compilation error. For arm target, config is following: BR2_arm=y BR2_cortex_a8=y BR2_ARM_FPU_NEON=y BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_PACKAGE_NODEJS=y And the error message is: /home/oleksandr/buildroot-git/output/nodejs-arm/host/bin/arm-buildroot-linux-gnueabihf-g++ -o /home/oleksandr/buildroot-git/output/nodejs-arm/build/nodejs-12.16.1/out/Release/obj.target/libnode/src/node_util.o ../src/node_util.cc '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DNODE_ARCH="arm"' '-DNODE_PLATFORM="linux"' '-DNODE_WANT_INTERNALS=1' '-DV8_DEPRECATION_WARNINGS=1' '-DNODE_OPENSSL_SYSTEM_CERT_PATH=""' '-DHAVE_INSPECTOR=0' '-DNODE_REPORT' '-D__POSIX__' '-DNODE_USE_V8_PLATFORM=1' '-DHAVE_OPENSSL=0' '-DHTTP_PARSER_STRICT=0' -I../src -I/home/oleksandr/buildroot-git/output/nodejs-arm/build/nodejs-12.16.1/out/Release/obj/gen -I../deps/histogram/src -I../deps/uvwasi/include -I../deps/v8/include -I../deps/http_parser -I../deps/llhttp/include -I../deps/brotli/c/include -Wall -Wextra -Wno-unused-parameter -pthread -Wall -Wextra -Wno-unused-parameter -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++1y -MMD -MF /home/oleksandr/buildroot-git/output/nodejs-arm/build/nodejs-12.16.1/out/Release/.deps//home/oleksandr/buildroot-git/output/nodejs-arm/build/nodejs-12.16.1/out/Release/obj.target/libnode/src/node_util.o.d.raw -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c ../src/node_util.cc: In function 'void node::util::Sleep(const v8::FunctionCallbackInfo<v8::Value>&)': ../src/node_util.cc:176:3: error: 'uv_sleep' was not declared in this scope uv_sleep(msec); Same happens if x86_64 target arch is set: BR2_x86_64=y BR2_x86_steamroller=y BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_PACKAGE_NODEJS=y Compilation fails with: /home/oleksandr/buildroot-git/output/nodejs-failure/host/bin/x86_64-buildroot-linux-gnu-g++ -o /home/oleksandr/buildroot-git/output/nodejs-failure/build/nodejs-12.16.1/out/Release/obj.target/libnode/src/node_util.o ../src/node_util.cc '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DNODE_ARCH="x64"' '-DNODE_PLATFORM="linux"' '-DNODE_WANT_INTERNALS=1' '-DV8_DEPRECATION_WARNINGS=1' '-DNODE_OPENSSL_SYSTEM_CERT_PATH=""' '-DHAVE_INSPECTOR=0' '-DNODE_REPORT' '-D__POSIX__' '-DNODE_USE_V8_PLATFORM=1' '-DHAVE_OPENSSL=0' '-DHTTP_PARSER_STRICT=0' -I/home/oleksandr/buildroot-git/output/nodejs-failure/host/x86_64-buildroot-linux-gnu/sysroot/home/oleksandr/buildroot-git/output/nodejs-failure/host/include -I../src -I/home/oleksandr/buildroot-git/output/nodejs-failure/build/nodejs-12.16.1/out/Release/obj/gen -I../deps/histogram/src -I../deps/uvwasi/include -I../deps/v8/include -I../deps/http_parser -I../deps/llhttp/include -I../deps/brotli/c/include -Wall -Wextra -Wno-unused-parameter -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++1y -MMD -MF /home/oleksandr/buildroot-git/output/nodejs-failure/build/nodejs-12.16.1/out/Release/.deps//home/oleksandr/buildroot-git/output/nodejs-failure/build/nodejs-12.16.1/out/Release/obj.target/libnode/src/node_util.o.d.raw -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c ../src/node_util.cc: In function 'void node::util::Sleep(const v8::FunctionCallbackInfo<v8::Value>&)': ../src/node_util.cc:176:3: error: 'uv_sleep' was not declared in this scope uv_sleep(msec);
Thanks for the bug report. Is this with Buildroot master? Are you after commit 7d9ed0a19d8e88b56b389187c38b44563e33e5ab ? If so, could you revert 7d9ed0a19d8e88b56b389187c38b44563e33e5ab and try again ? Thanks!
Reverting the 7d9ed0a19d8e88b56b389187c38b44563e33e5ab does help to fix the issue so that nodejs 12.16.1 builds
Thanks for testing! I have reported the issue back to the develop who contributed the libuv update that broke nodejs. Hopefully we will have a solution soon.
So, commit 7d9ed0a19d8e88b56b389187c38b44563e33e5ab is not the culprit, I'm not sure how it can have fixed the problem for you. Are you sure this issue happens from a clean build ?
Add references to the libuv/uvw version bump (commit7d9ed0a19d8e88b56b389187c38b44563e33e5ab) mailing list discussion: [1] http://lists.busybox.net/pipermail/buildroot/2020-April/281597.html [2] http://lists.busybox.net/pipermail/buildroot/2020-May/281746.html
I am sorry, but neither Peter Seiderer nor myself have been able to reproduce the issue on 2020.02.1. I tested exactly the first defconfig you posted, and it builds fine. The libuv version 2020.02.1 does implement uv_sleep(), both the libuv package and the libuv shipped with nodejs, so I don't see how your build failure could happen. Are you sure you did a full rebuild with 2020.02.1 ?