You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
macOS 11.2.3
Darwin MacBook-Pro.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: x86_64-apple-darwin20.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Subsystem
No response
What steps will reproduce the bug?
I try to compile and build nodejs 22.13.0 from source. Below is the command I use to compile.
No operator = matches these operands
deps/v8/src/wasm/wasm-engine.cc line 157 col 19
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior? Why is that the expected behavior?
Build passed.
What do you see instead?
The error output
No operator = matches these operands
deps/v8/src/wasm/wasm-engine.cc line 157 col 19
Additional information
The error comes from source_url_ = String::cast(script->name())->ToCString(); which locates in the line157 of deps/v8/src/wasm/wasm-engine.cc.
I do believe that it is because the code is try to construct a std::shared_ptr instance from a std::unique_ptr instance using = copy assignment.
I tried the following modification, and the build succeed.
// source_url_ = String::cast(script->name())->ToCString();auto unique_pointer = String::cast(script->name())->ToCString();
auto raw_pointer = unique_pointer.get();
auto shared_pointer = std::shared_ptr<constchar[]>(raw_pointer);
source_url_ = shared_pointer;
However, I cannot make sure whether the modification is correct since I don't know whether the std::shared_ptr object shall take the ownership of the data or it shall create a copy while leave the ownership to the std::unique_ptr.
Please check that.
The text was updated successfully, but these errors were encountered:
Version
22.13.0
Platform
Subsystem
No response
What steps will reproduce the bug?
I try to compile and build nodejs 22.13.0 from source. Below is the command I use to compile.
And I got the error output
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior? Why is that the expected behavior?
Build passed.
What do you see instead?
The error output
Additional information
The error comes from
source_url_ = String::cast(script->name())->ToCString();
which locates in the line157 ofdeps/v8/src/wasm/wasm-engine.cc
.I do believe that it is because the code is try to construct a
std::shared_ptr
instance from astd::unique_ptr
instance using=
copy assignment.I tried the following modification, and the build succeed.
However, I cannot make sure whether the modification is correct since I don't know whether the
std::shared_ptr
object shall take the ownership of the data or it shall create a copy while leave the ownership to thestd::unique_ptr
.Please check that.
The text was updated successfully, but these errors were encountered: