NetBSD Problem Report #55530

From  Sat Aug  1 17:52:30 2020
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id 7271F1A923C
	for <>; Sat,  1 Aug 2020 17:52:30 +0000 (UTC)
Message-Id: <>
Date: Sat,  1 Aug 2020 18:47:13 +0900 (JST)
Subject: lang/nodejs build error with uint32_t on NetBSD/amd64 8.1
X-Send-Pr-Version: 3.95

>Number:         55530
>Category:       pkg
>Synopsis:       lang/nodejs build error with uint32_t on NetBSD/amd64 8.1
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          feedback
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 01 17:55:02 +0000 2020
>Last-Modified:  Sun Aug 23 08:45:47 +0000 2020
>Originator:     Nagae Hidetake
>Release:        NetBSD 8.1_STABLE


System: NetBSD 8.1_STABLE NetBSD 8.1_STABLE (ThinkPadX270) #7: Sat Jul 11 14:33:06 JST 2020 nagae@:/usr/src/sys/arch/amd64/compile/ThinkPadX270 amd64
Architecture: x86_64
Machine: amd64

Building lang/nodejs stops with the following message:

../src/ In static member function 'static void node::wasi::WASI::ArgsGet(const v8::FunctionCallbackInfo<v8::Value>&)':
../src/ error: 'uvwasi_serdes_write_uint32_t' was not declared in this scope

The function uvwasi_serdes_write_uint32_t is expected
to be declared in deps/uvwasi/include/wasi_serdes.h
by the macro BASIC_TYPE_(uint32_t, uint32_t),
through the wrapper BASIC_TYPE(uint32_t).
Unfortunately uint32_t is defined as __uint32_t on NetBSD,
so the output of expansion is BASIC_TYPE_(__uint32_t, __uint32_t).
As the result, uvwasi_serdes_write___uint32_t is declared
instead of uvwasi_serdes_write_uint32_t.


call raw BASIC_TYPE_ directly without the wrapper macro BASIC_TYPE.

--- deps/uvwasi/include/wasi_serdes.h.orig	2020-07-21 07:18:45.000000000 +0900
+++ deps/uvwasi/include/wasi_serdes.h	2020-08-01 16:03:05.704701136 +0900
@@ -13,13 +13,13 @@
 #define BASIC_TYPE_UVWASI(type) BASIC_TYPE_(type, uvwasi_##type)

 #define UVWASI_SERDES_SIZE_uint8_t sizeof(uint8_t)
+BASIC_TYPE_(uint8_t, uint8_t)
 #define UVWASI_SERDES_SIZE_uint16_t sizeof(uint16_t)
+BASIC_TYPE_(uint16_t, uint16_t)
 #define UVWASI_SERDES_SIZE_uint32_t sizeof(uint32_t)
+BASIC_TYPE_(uint32_t, uint32_t)
 #define UVWASI_SERDES_SIZE_uint64_t sizeof(uint64_t)
+BASIC_TYPE_(uint64_t, uint64_t)

 #define UVWASI_SERDES_SIZE_advice_t sizeof(uvwasi_advice_t)


From: "Maya Rashish" <>
Subject: PR/55530 CVS commit: pkgsrc/lang/nodejs
Date: Fri, 7 Aug 2020 06:26:54 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Fri Aug  7 06:26:54 UTC 2020

 Modified Files:
 	pkgsrc/lang/nodejs: distinfo
 Added Files:
 	pkgsrc/lang/nodejs/patches: patch-deps_uvwasi_include_wasi__serdes.h

 Log Message:
 nodejs: build fix for netbsd<9

 netbsd's #define uint32_t still causes issues. PR pkg/55530

 To generate a diff of this commit:
 cvs rdiff -u -r1.176 -r1.177 pkgsrc/lang/nodejs/distinfo
 cvs rdiff -u -r0 -r1.1 \

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-When: Sun, 23 Aug 2020 08:45:47 +0000


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.