apache / trafficserver

Apache Traffic Server™ is a fast, scalable and extensible HTTP/1.1 and HTTP/2 compliant caching proxy server.
https://trafficserver.apache.org/
Apache License 2.0
1.74k stars 781 forks source link

ATS will not build with VERIFY_JTEST_DATA defined #11455

Open JosiahWI opened 1 week ago

JosiahWI commented 1 week ago
b5faf95ecc11:/trafficserver # cmake --build build --target inkcache
[0/2] Re-checking globbed directories...
[302/306] Building CXX object src/iocore/cache/CMakeFiles/inkcache.dir/Stripe.cc.o
FAILED: src/iocore/cache/CMakeFiles/inkcache.dir/Stripe.cc.o 
/usr/bin/c++ -DDEBUG -DOPENSSL_API_COMPAT=10002 -DOPENSSL_IS_OPENSSL3 -DPACKAGE_NAME="\"Apache Traffic Server\"" -DPACKAGE_VERSION=\"10.1.0\" -D_DEBUG -Dlinux -I/trafficserver/include -I/trafficserver/build/include -I/trafficserver/lib -I/trafficserver/lib/swoc/include -I/trafficserver/lib/yamlcpp/include -isystem /trafficserver/lib/systemtap -DVERIFY_JTEST_DATA=1 -pthread -g -std=c++20 -Wno-invalid-offsetof -pipe -Wall -Wextra -Wno-unused-parameter -Wno-noexcept-type -Wsuggest-override -Wno-vla-extension -fno-strict-aliasing -Wno-format-truncation -MD -MT src/iocore/cache/CMakeFiles/inkcache.dir/Stripe.cc.o -MF src/iocore/cache/CMakeFiles/inkcache.dir/Stripe.cc.o.d -o src/iocore/cache/CMakeFiles/inkcache.dir/Stripe.cc.o -c /trafficserver/src/iocore/cache/Stripe.cc
/trafficserver/src/iocore/cache/Stripe.cc: In member function 'int Stripe::_copy_writer_to_aggregation(CacheVC*)':
/trafficserver/src/iocore/cache/Stripe.cc:1147:9: error: 'f' was not declared in this scope; did you mean 'fd'?
 1147 |     if (f.use_first_key && header_len) {
      |         ^
      |         fd
/trafficserver/src/iocore/cache/Stripe.cc:1147:28: error: 'header_len' was not declared in this scope; did you mean 'headerlen'?
 1147 |     if (f.use_first_key && header_len) {
      |                            ^~~~~~~~~~
      |                            headerlen
/trafficserver/src/iocore/cache/Stripe.cc:1150:7: error: 'new_info' was not declared in this scope; did you mean 'vec_info'?
 1150 |       new_info.request_get().url_get().print(xx, 500, &ib, &xd);
      |       ^~~~~~~~
      |       vec_info
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-vla-extension' may have been intended to silence earlier diagnostics
[304/306] Building CXX object src/iocore/cache/CMakeFiles/inkcache.dir/CacheTest.cc.o
ninja: build stopped: subcommand failed.

It appears this has been broken like this since the initial commit (a1651345d).

It's unclear what was intended here. Should this part of the code be removed?