wabt icon indicating copy to clipboard operation
wabt copied to clipboard

wabt fails to build with GCC 15

Open sergiodj opened this issue 6 months ago • 2 comments

Hi,

I'm currently building wabt from source and get the following build failure with GCC 15:

2025/05/31 00:58:25 INFO In file included from /home/build/third_party/gtest/googletest/src/gtest-all.cc:42:
2025/05/31 00:58:25 INFO /home/build/third_party/gtest/googletest/src/gtest-death-test.cc: In function 'pid_t testing::internal::ExecDeathTestSpawnChild(char* const*, int)':
2025/05/31 00:58:25 INFO /home/build/third_party/gtest/googletest/src/gtest-death-test.cc:1385:26: error: 'uintptr_t' does not name a type
2025/05/31 00:58:25 INFO  1385 |         reinterpret_cast<uintptr_t>(stack_top) % kMaxStackAlignment == 0);
2025/05/31 00:58:25 INFO       |                          ^~~~~~~~~
2025/05/31 00:58:25 INFO /home/build/third_party/gtest/googletest/src/gtest-death-test.cc:308:38: note: in definition of macro 'GTEST_DEATH_TEST_CHECK_'
2025/05/31 00:58:25 INFO   308 |     if (!::testing::internal::IsTrue(expression)) { \
2025/05/31 00:58:25 INFO       |                                      ^~~~~~~~~~
2025/05/31 00:58:25 INFO /home/build/third_party/gtest/googletest/src/gtest-death-test.cc:49:1: note: 'uintptr_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
2025/05/31 00:58:25 INFO    48 | # include <limits.h>
2025/05/31 00:58:25 INFO   +++ |+#include <cstdint>
2025/05/31 00:58:25 INFO    49 | 
2025/05/31 00:58:25 WARN ninja: job failed: /usr/local/bin/c++ -D__STDC_FORMAT_MACROS=1 -D__STDC_LIMIT_MACROS=1 -I/home/build/third_party/picosha2 -I/home/build/third_party/gtest/googletest -I/home/build/third_party/gtest/googletest/include -Wold-style-cast -fno-exceptions -O3 -DNDEBUG -std=c++17   -Wall -Wextra -Wno-unused-parameter -Wpointer-arith -Wuninitialized -Wimplicit-fallthrough -Wno-clobbered -Wno-maybe-uninitialized -MD -MT CMakeFiles/gtest.dir/third_party/gtest/googletest/src/gtest-all.cc.o -MF CMakeFiles/gtest.dir/third_party/gtest/googletest/src/gtest-all.cc.o.d -o CMakeFiles/gtest.dir/third_party/gtest/googletest/src/gtest-all.cc.o -c /home/build/third_party/gtest/googletest/src/gtest-all.cc
2025/05/31 00:58:30 INFO /home/build/src/tools/spectest-interp.cc: In member function 'spectest::ActionResult spectest::CommandRunner::RunAction(int, const spectest::Action*, RunVerbosity)':
2025/05/31 00:58:30 INFO /home/build/src/tools/spectest-interp.cc:1422:12: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
2025/05/31 00:58:30 INFO  1422 |       auto ok = func->Call(store_, action->args, result.values, &result.trap,
2025/05/31 00:58:30 INFO       |            ^~
2025/05/31 00:58:35 WARN ninja: subcommand failed
2025/05/31 00:58:35 INFO
2025/05/31 00:58:36 ERRO failed to build package: unable to run package wabt pipeline: unable to run pipeline: unable to run pipeline: exit status 1
make[1]: *** [Makefile:157: packages/x86_64/wabt-1.0.37-r2.apk] Error 1
make[1]: Leaving directory '/home/sergio_durigan_chainguard_dev/os'
make: *** [Makefile:151: package/wabt] Error 2

The failure comes from the gtest third party module, but it's affecting wabt so I'm filing the bug here.

Thanks.

sergiodj avatar Aug 28 '25 23:08 sergiodj

Do you need to run the tests? If not then presumably -DBUILD_TESTS=OFF in your cmake command should work around it for now?

sbc100 avatar Aug 29 '25 00:08 sbc100

Do you need to run the tests? If not then presumably -DBUILD_TESTS=OFF in your cmake command should work around it for now?

Thanks for the reply. We're not currently running build time tests, so I went ahead and used the flag you suggested. The package builds fine with GCC 15 now.

It would be great to have this fixed more permanently, but I understand that this would require more effort.

Thanks.

sergiodj avatar Aug 29 '25 19:08 sergiodj