pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/55530: lang/nodejs build error with uint32_t on NetBSD/amd64 8.1



>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:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 01 17:55:02 +0000 2020
>Originator:     Nagae Hidetake
>Release:        NetBSD 8.1_STABLE
>Organization:
	
>Environment:
	
	
System: NetBSD x270.eagan.jp 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
>Description:
	
Building lang/nodejs stops with the following message:

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

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.
>How-To-Repeat:
	
>Fix:
	
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)
+BASIC_TYPE_(uint8_t, uint8_t)
 #define UVWASI_SERDES_SIZE_uint16_t sizeof(uint16_t)
-BASIC_TYPE(uint16_t)
+BASIC_TYPE_(uint16_t, uint16_t)
 #define UVWASI_SERDES_SIZE_uint32_t sizeof(uint32_t)
-BASIC_TYPE(uint32_t)
+BASIC_TYPE_(uint32_t, uint32_t)
 #define UVWASI_SERDES_SIZE_uint64_t sizeof(uint64_t)
-BASIC_TYPE(uint64_t)
+BASIC_TYPE_(uint64_t, uint64_t)
 
 #define UVWASI_SERDES_SIZE_advice_t sizeof(uvwasi_advice_t)
 BASIC_TYPE_UVWASI(advice_t)

>Unformatted:
 	
 	


Home | Main Index | Thread Index | Old Index