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
Hi!
I'm compiling the library (tag: 26.01) on my Ubuntu 24 system with gcc of version 14.2.0.
Getting some errors due -Wall in command line makes any warning into error.
So far I've reached tests and collected following warnings: format-truncation, stringop-overflow, sign-compare.
Supplying these flags to meson setup helps: -Dc_args="-Wno-format-truncation -Wno-stringop-overflow -Wno-sign-compare" \
However, when compiling tests the system seems to ignore these flags from command line. Thus, this question appeared.
While I'm working on solving this I'd like to know how others compile the library. I haven't made any changes to build system so I have some reasons to believe flag -Wall is configured internally (I might be wrong for sure but I don't remember myself doing this flag globally or anything like that). Part of failing compilation process output looks like this:
[29/51] Compiling C++ object KahawaiTest.p/integration_tests_st30_test.cpp.o
FAILED: KahawaiTest.p/integration_tests_st30_test.cpp.o
c++ -IKahawaiTest.p -I. -I../../tests -Iintegration_tests -I../../tests/integration_tests -Iintegration_tests/noctx -I../../tests/integration_tests/noctx -Iintegration_tests/st20 -I../../tests/integration_tests/st20 -I/home/akanashin/WORK/mtl/bin/include -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -DGTEST_HAS_PTHREAD=1 -DMTL_GTEST_AFTER_1_9_0 -Werror -Wall -Wvla -MD -MQ KahawaiTest.p/integration_tests_st30_test.cpp.o -MF KahawaiTest.p/integration_tests_st30_test.cpp.o.d -o KahawaiTest.p/integration_tests_st30_test.cpp.o -c ../../tests/integration_tests/st30_test.cpp
In file included from ../../tests/integration_tests/tests.hpp:7,
from ../../tests/integration_tests/st30_test.cpp:8:
/home/akanashin/WORK/mtl/bin/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperGE(const char*, const char*, const T1&, const T2&) [with T1 = unsigned int; T2 = int]’:
../../tests/integration_tests/st30_test.cpp:486:5: required from here
134 | GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), on_failure)
/home/akanashin/WORK/mtl/bin/include/gtest/gtest.h:1478:28: error: comparison of integer expressions of different signedness: ‘const unsigned int’ and ‘const int’ [-Werror=sign-compare]
1478 | GTEST_IMPL_CMP_HELPER_(GE, >=)
| ^
/home/akanashin/WORK/mtl/bin/include/gtest/gtest.h:1462:14: note: in definition of macro ‘GTEST_IMPL_CMP_HELPER_’
1462 | if (val1 op val2) {
| ^~
cc1plus: all warnings being treated as errors
Upd:
when compiling with "./build.sh debug" I'm getting another error:
[1/2] Compiling C object udp/libmtl_udp_preload.so.p/udp_preload.c.o
FAILED: udp/libmtl_udp_preload.so.p/udp_preload.c.o
cc -Iudp/libmtl_udp_preload.so.p -Iudp -I../../ld_preload/udp -I/home/akanashin/WORK/mtl/bin/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O0 -g -DALLOW_EXPERIMENTAL_API -Wno-format-truncation -Wno-stringop-overflow -fPIC -Wall -Wunused-parameter -msse4.2 -fsanitize=address -MD -MQ udp/libmtl_udp_preload.so.p/udp_preload.c.o -MF udp/libmtl_udp_preload.so.p/udp_preload.c.o.d -o udp/libmtl_udp_preload.so.p/udp_preload.c.o -c ../../ld_preload/udp/udp_preload.c
../../ld_preload/udp/udp_preload.c:964:5: error: conflicting types for ‘ioctl’; have ‘int(int, long unsigned int, __va_list_tag *)’
964 | int ioctl(int sockfd, unsigned long cmd, va_list args) {
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/epoll.h:22,
from ../../ld_preload/udp/udp_preload.h:11,
from ../../ld_preload/udp/udp_preload.c:5:
/usr/include/x86_64-linux-gnu/sys/ioctl.h:42:12: note: previous declaration of ‘ioctl’ with type ‘int(int, long unsigned int, ...)’
42 | extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
| ^~~~~
ninja: build stopped: subcommand failed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I'm compiling the library (tag: 26.01) on my Ubuntu 24 system with gcc of version 14.2.0.
Getting some errors due -Wall in command line makes any warning into error.
So far I've reached tests and collected following warnings: format-truncation, stringop-overflow, sign-compare.
Supplying these flags to meson setup helps:
-Dc_args="-Wno-format-truncation -Wno-stringop-overflow -Wno-sign-compare" \However, when compiling tests the system seems to ignore these flags from command line. Thus, this question appeared.
While I'm working on solving this I'd like to know how others compile the library. I haven't made any changes to build system so I have some reasons to believe flag -Wall is configured internally (I might be wrong for sure but I don't remember myself doing this flag globally or anything like that). Part of failing compilation process output looks like this:
Upd:
when compiling with "./build.sh debug" I'm getting another error:
Thanks
Beta Was this translation helpful? Give feedback.
All reactions