Skip to content

Conversation

@podsvirov
Copy link
Collaborator

No description provided.

@podsvirov
Copy link
Collaborator Author

All good with clang64, but error for ucrt64:

  [153/280] Building CXX object src/parser/CMakeFiles/parser.dir/wast-parser.cpp.obj
  FAILED: src/parser/CMakeFiles/parser.dir/wast-parser.cpp.obj 
  D:\M\msys64\ucrt64\bin\g++.exe  -IC:/_/B/src/binaryen/src -IC:/_/B/src/binaryen/third_party/llvm-project/include -IC:/_/B/src/build-UCRT64-binaryen -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -DBUILD_LLVM_DWARF -Wall -Werror -Wextra -Wno-unused-parameter -Wno-dangling-pointer -fno-omit-frame-pointer -fno-rtti -Wno-implicit-int-float-conversion -Wno-unknown-warning-option -Wswitch -Wimplicit-fallthrough -Wnon-virtual-dtor -D_GNU_SOURCE -D__STDC_FORMAT_MACROS -O3 -DNDEBUG -UNDEBUG -std=c++17 -MD -MT src/parser/CMakeFiles/parser.dir/wast-parser.cpp.obj -MF src\parser\CMakeFiles\parser.dir\wast-parser.cpp.obj.d -o src/parser/CMakeFiles/parser.dir/wast-parser.cpp.obj -c C:/_/B/src/binaryen/src/parser/wast-parser.cpp
  In file included from C:/_/B/src/binaryen/src/parser/wast-parser.cpp:19:
  C:/_/B/src/binaryen/src/parser/wat-parser.h: In function 'wasm::Result<std::vector<wasm::WATParser::ScriptEntry> > wasm::WATParser::{anonymous}::wast(wasm::WATParser::Lexer&)':
  C:/_/B/src/binaryen/src/parser/wat-parser.h:37:8: error: '*(wasm::WATParser::InvokeAction*)((char*)&<unnamed> + offsetof(wasm::WATParser::value_type, wasm::WATParser::ScriptEntry::cmd.std::variant<std::variant<wasm::WATParser::QuotedModule, std::shared_ptr<wasm::Module> >, wasm::WATParser::Register, std::variant<wasm::WATParser::InvokeAction, wasm::WATParser::GetAction>, std::variant<wasm::WATParser::AssertReturn, wasm::WATParser::AssertAction, wasm::WATParser::AssertModule> >::<unnamed>.std::__detail::__variant::_Variant_base<std::variant<wasm::WATParser::QuotedModule, std::shared_ptr<wasm::Module> >, wasm::WATParser::Register, std::variant<wasm::WATParser::InvokeAction, wasm::WATParser::GetAction>, std::variant<wasm::WATParser::AssertReturn, wasm::WATParser::AssertAction, wasm::WATParser::AssertModule> >::<unnamed>.std::__detail::__variant::_Move_assign_base<false, std::variant<wasm::WATParser::QuotedModule, std::shared_ptr<wasm::Module> >, wasm::WATParser::Register, std::variant<wasm::WATParser::InvokeAction, wasm::WATParser::GetAction>, std::variant<wasm::WATParser::AssertReturn, wasm::WATParser::AssertAction, wasm::WATParser::AssertModule> >::<unnamed>.std::__detail::__variant::_Copy_assign_base<false, std::variant<wasm::WATParser::QuotedModule, std::shared_ptr<wasm::Module> >, wasm::WATParser::Register, std::variant<wasm::WATParser::InvokeAction, wasm::WATParser::GetAction>, std::variant<wasm::WATParser::AssertReturn, wasm::WATParser::AssertAction, wasm::WATParser::AssertModule> >::<unnamed>.std::__detail::__variant::_Move_ctor_base<false, std::variant<wasm::WATParser::QuotedModule, std::shared_ptr<wasm::Module> >, wasm::WATParser::Register, std::variant<wasm::WATParser::InvokeAction, wasm::WATParser::GetAction>, std::variant<wasm::WATParser::AssertReturn, wasm::WATParser::AssertAction, wasm::WATParser::AssertModule> >::<unnamed>.std::__detail::__variant::_Copy_ctor_base<false, std::variant<wasm::WATParser::QuotedModule, std::shared_ptr<wasm::Module> >, wasm::WATParser::Register, std::variant<wasm::WATParser::InvokeAction, wasm::WATParser::GetAction>, std::variant<wasm::WATParser::AssertReturn, wasm::WATParser::AssertAction, wasm::WATParser::AssertModule> >::<unnamed>.std::__detail::__variant::_Variant_storage<false, std::variant<wasm::WATParser::QuotedModule, std::shared_ptr<wasm::Module> >, wasm::WATParser::Register, std::variant<wasm::WATParser::InvokeAction, wasm::WATParser::GetAction>, std::variant<wasm::WATParser::AssertReturn, wasm::WATParser::AssertAction, wasm::WATParser::AssertModule> >::_M_u)).wasm::WATParser::InvokeAction::name' may be used uninitialized [-Werror=maybe-uninitialized]
     37 | struct InvokeAction {
        |        ^~~~~~~~~~~~
  C:/_/B/src/binaryen/src/parser/wast-parser.cpp:405:21: note: '<anonymous>' declared here
    405 |       cmds.push_back({WASTModule{std::move(wasm)}, line});
        |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  At global scope:
  cc1plus.exe: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
  cc1plus.exe: note: unrecognized command-line option '-Wno-implicit-int-float-conversion' may have been intended to silence earlier diagnostics
  cc1plus.exe: all warnings being treated as errors
  [154/280] Building CXX object src/support/CMakeFiles/support.dir/file.cpp.obj
  [155/280] Building CXX object src/support/CMakeFiles/support.dir/dfa_minimization.cpp.obj
  [156/280] Building CXX object src/support/CMakeFiles/support.dir/istring.cpp.obj
  [157/280] Building CXX object src/support/CMakeFiles/support.dir/json.cpp.obj
  [158/280] Building CXX object src/parser/CMakeFiles/parser.dir/wat-parser.cpp.obj
  ninja: build stopped: subcommand failed.
  ==> ERROR: A failure occurred in build().
      Aborting...

@sbc100, can you look, please?

@podsvirov podsvirov marked this pull request as draft May 23, 2024 20:31
@sbc100
Copy link

sbc100 commented May 23, 2024

It looks like that part of wast-parser is wrapped in #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" .. so I'm not sure why that warning/error is manifesting:

https://github.com/WebAssembly/binaryen/blob/06cbe01f2774955ed3f23994b3ea1db58e43a4d8/src/parser/wast-parser.cpp#L392-L414

Perhaps you don't have the version of binareyen that includes that pragma. Seems it was added in WebAssembly/binaryen#6601

@sbc100
Copy link

sbc100 commented May 23, 2024

It looks like that part of wast-parser is wrapped in #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" .. so I'm not sure why that warning/error is manifesting:

https://github.com/WebAssembly/binaryen/blob/06cbe01f2774955ed3f23994b3ea1db58e43a4d8/src/parser/wast-parser.cpp#L392-L414

Perhaps you don't have the version of binareyen that includes that pragma. Seems it was added in binaryen/#6601

Actually you must have the pragmas because they were added at the same time as the line that is failing in your error. @tlively?

@tlively
Copy link

tlively commented May 23, 2024

Yes, that pragma was added in the same PR as the code that requires it.

@Biswa96
Copy link
Member

Biswa96 commented May 24, 2024

Would it be possible to add -DENABLE_WERROR=OFF option with cmake command in binaryen?

@sbc100
Copy link

sbc100 commented May 24, 2024

Would it be possible to add -DENABLE_WERROR=OFF option with cmake command in binaryen?

That would probably work, but it might be worth figuring out why the pragma is being ignored?

@podsvirov podsvirov force-pushed the emscripten-update branch from 9931e20 to f08dc78 Compare June 4, 2024 21:20
@podsvirov podsvirov changed the title emscripten: update to 3.1.60 emscripten: update to 3.1.61 Jun 4, 2024
@podsvirov podsvirov force-pushed the emscripten-update branch from f08dc78 to 98b2fdd Compare June 5, 2024 18:48
@podsvirov podsvirov marked this pull request as ready for review June 5, 2024 20:49
@podsvirov
Copy link
Collaborator Author

@MehdiChinoune, what do you think if we just delete ucrt64?

@podsvirov podsvirov requested a review from MehdiChinoune June 8, 2024 20:23
@MehdiChinoune
Copy link
Collaborator

Why disabling ucrt64, if there is a possiblility to fix it by disabling some warnings?

@MehdiChinoune MehdiChinoune force-pushed the emscripten-update branch 3 times, most recently from 0d3095e to f3f5608 Compare June 9, 2024 05:04
@podsvirov
Copy link
Collaborator Author

Why disabling ucrt64, if there is a possiblility to fix it by disabling some warnings?

We also have unresolved bug #19908.

@MehdiChinoune
Copy link
Collaborator

MehdiChinoune commented Jun 9, 2024

I don't think It's a sufficient reason to disable ot.

@MehdiChinoune MehdiChinoune merged commit d9fad44 into msys2:master Jun 9, 2024
@podsvirov podsvirov deleted the emscripten-update branch June 10, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants