Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contrib doesnt build on Linux gcc (ICU) #31807

Closed
phlax opened this issue Jan 12, 2024 · 41 comments · Fixed by #37131
Closed

Contrib doesnt build on Linux gcc (ICU) #31807

phlax opened this issue Jan 12, 2024 · 41 comments · Fixed by #37131
Assignees
Labels
area/build area/gcc bug no stalebot Disables stalebot from closing an issue

Comments

@phlax
Copy link
Member

phlax commented Jan 12, 2024

When attempting to build contrib with gcc it throws ICU related errors:

/usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -std=c++0x -fno-canonical-system-headers -Wno-builtin-macro-redefined -D__DATE__=redacted -D__TIMESTAMP__=redacted -D__TIME__=redacted -DABSL_MIN_LOG_LEVEL=4 -fdebug-types-section -fPIC -Wno-deprecated-declarations -std=c++17 -fPIC -DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=0 -DUCONFIG_ONLY_HTML_CONVERSION=1 -DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_BREAK_ITERATION=1 -DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long   -fuse-ld=lld -Wl,-no-as-needed -Wl,-z,relro,-z,now -B/usr/bin -pass-exit-codes -lm -fuse-ld=gold -l:libstdc++.a -Wl,--gc-sections   -o ../../bin/makeconv gencnvex.o genmbcs.o makeconv.o ucnvstat.o -L../../lib -licutu -L../../lib -licui18n -L../../lib -licuuc -L../../stubdata -licudata -lpthread -lm
                                                                            makeconv.o:makeconv.cpp:DW.ref.__gxx_personality_v0: error: undefined reference to '__gxx_personality_v0'                                                                         ../../lib/libicuuc.a(umutex.ao):umutex.cpp:function std::mutex::lock(): error: undefined reference to 'std::__throw_system_error(int)'                                            ../../lib/libicuuc.a(umutex.ao):umutex.cpp:function std::once_flag::_Prepare_execution::~_Prepare_execution(): error: undefined reference to 'std::__once_callable'               ../../lib/libicuuc.a(umutex.ao):umutex.cpp:function std::once_flag::_Prepare_execution::~_Prepare_execution(): error: undefined reference to 'std::__once_call'                   ../../lib/libicuuc.a(umutex.ao):umutex.cpp:function umtx_cleanup: error: undefined reference to 'std::condition_variable::~condition_variable()'                                  ../../lib/libicuuc.a(umutex.ao):umutex.cpp:function umtx_init::{lambda()#2}::operator()() const: error: undefined reference to 'std::condition_variable::condition_variable()'    ../../lib/libicuuc.a(umutex.ao):umutex.cpp:function icu_72::umtx_initImplPreInit(icu_72::UInitOnce&): error: undefined reference to 'std::condition_variable::wait(std::unique_lock<std::mutex>&)'                                                                                                                                                                  ../../lib/libicuuc.a(umutex.ao):umutex.cpp:function icu_72::umtx_initImplPostInit(icu_72::UInitOnce&): error: undefined reference to 'std::condition_variable::notify_all()'      ../../lib/libicuuc.a(umutex.ao):umutex.cpp:function void std::call_once<void (&)()>(std::once_flag&, void (&)()): error: undefined reference to '__once_proxy'                    ../../lib/libicuuc.a(umutex.ao):umutex.cpp:function void std::call_once<void (&)()>(std::once_flag&, void (&)()): error: undefined reference to 'std::__throw_system_error(int)'  ../../lib/libicuuc.a(umutex.ao):umutex.cpp:function std::once_flag::_Prepare_execution::_Prepare_execution<std::call_once<void (&)()>(std::once_flag&, void (&)())::{lambda()#1}>(void (&)())::{lambda()#1}::operator()() const: error: undefined reference to 'std::__once_callable'                                                                               ../../lib/libicuuc.a(umutex.ao):umutex.cpp:function std::once_flag::_Prepare_execution::_Prepare_execution<std::call_once<void (&)()>(std::once_flag&, void (&)())::{lambda()#1}>(
void (&)()): error: undefined reference to 'std::__once_callable'                                                                                                                 
../../lib/libicuuc.a(umutex.ao):umutex.cpp:function std::once_flag::_Prepare_execution::_Prepare_execution<std::call_once<void (&)()>(std::once_flag&, void (&)())::{lambda()#1}>(
void (&)()): error: undefined reference to 'std::__once_call'                                                                                                                     
../../lib/libicuuc.a(umutex.ao):umutex.cpp:function std::unique_lock<std::mutex>::lock(): error: undefined reference to 'std::__throw_system_error(int)'                          
../../lib/libicuuc.a(umutex.ao):umutex.cpp:function std::unique_lock<std::mutex>::lock(): error: undefined reference to 'std::__throw_system_error(int)'                          
collect2: error: ld returned 1 exit status                                                                                                                                        
make[2]: *** [Makefile:81: ../../bin/makeconv] Error 1                                                                                                                            make[2]: Leaving directory '/b/f/w/bazel-out/k8-fastbuild/bin/bazel/foreign_cc/unicode_icu_build.build_tmpdir/tools/makeconv'                                                     
make[1]: *** [Makefile:47: all-recursive] Error 2                                                                                                                                 
make[1]: Leaving directory '/b/f/w/bazel-out/k8-fastbuild/bin/bazel/foreign_cc/unicode_icu_build.build_tmpdir/tools'                                                              
make: *** [Makefile:153: all-recursive] Error 2  
@phlax phlax added bug triage Issue requires triage labels Jan 12, 2024
@phlax
Copy link
Member Author

phlax commented Jan 12, 2024

related/testing PR #31806

@ravenblackx
Copy link
Contributor

I think this is fixed by #31814

@phlax phlax reopened this Jan 16, 2024
@phlax
Copy link
Member Author

phlax commented Jan 16, 2024

unfortunately not - its still broken on ICU build

@ravenblackx ravenblackx added area/build area/gcc and removed triage Issue requires triage labels Jan 16, 2024
@lukidzi

This comment was marked as off-topic.

@phlax phlax changed the title Contrib doesnt build on gcc Contrib doesnt build on =gcc Jan 18, 2024
@phlax phlax changed the title Contrib doesnt build on =gcc Contrib doesnt build on Linux gcc (ICU) Jan 18, 2024
@phlax
Copy link
Member Author

phlax commented Jan 18, 2024

@lukidzi to clarify this ticket has nothing to do with macos or CEL

there are various other reports elsewhere - and as i have suggested there you should open a ticket relevant to your issue

i dont use or have any access to macos so its not something im likely to follow up on

@phlax
Copy link
Member Author

phlax commented Jan 18, 2024

seems its failing on all release branches - altho not sure if different error - this is 1.26

   gcc	 ...  /b/f/w/external/com_github_unicode_org_icu/icu4c/source/tools/makeconv/ucnvstat.c
/usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -std=c++0x -fno-canonical-system-headers -Wno-builtin-macro-redefined -D__DATE__=redacted -D__TIMESTAMP__=redacted -D__TIME__=redacted -DABSL_MIN_LOG_LEVEL=4 -fPIC -Wno-deprecated-declarations -std=c++17 -fPIC -DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=0 -DUCONFIG_ONLY_HTML_CONVERSION=1 -DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_BREAK_ITERATION=1 -DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long   -fuse-ld=lld -Wl,-no-as-needed -Wl,-z,relro,-z,now -B/usr/bin -pass-exit-codes -lm -fuse-ld=gold -l:libstdc++.a -Wl,--gc-sections   -o ../../bin/makeconv gencnvex.o genmbcs.o makeconv.o ucnvstat.o -L../../lib -licutu -L../../lib -licui18n -L../../lib -licuuc -L../../stubdata -licudata -lpthread -lm  
makeconv.o:makeconv.cpp:DW.ref.__gxx_personality_v0: error: undefined reference to '__gxx_personality_v0'
../../lib/libicuuc.a(umutex.ao):umutex.cpp:function std::mutex::lock(): error: undefined reference to 'std::__throw_system_error(int)'
../../lib/libicuuc.a(umutex.ao):umutex.cpp:function umtx_cleanup: error: undefined reference to 'std::condition_variable::~condition_variable()'
../../lib/libicuuc.a(umutex.ao):umutex.cpp:function umtx_init::{lambda()#2}::operator()() const: error: undefined reference to 'std::condition_variable::condition_variable()'
../../lib/libicuuc.a(umutex.ao):umutex.cpp:function icu_72::umtx_initImplPreInit(icu_72::UInitOnce&): error: undefined reference to 'std::condition_variable::wait(std::unique_lock<std::mutex>&)'
../../lib/libicuuc.a(umutex.ao):umutex.cpp:function icu_72::umtx_initImplPostInit(icu_72::UInitOnce&): error: undefined reference to 'std::condition_variable::notify_all()'
../../lib/libicuuc.a(umutex.ao):umutex.cpp:function std::call_once<void (&)()>(std::once_flag&, void (&)())::{lambda()#2}::operator()() const: error: undefined reference to 'std::__once_callable'
../../lib/libicuuc.a(umutex.ao):umutex.cpp:function void std::call_once<void (&)()>(std::once_flag&, void (&)()): error: undefined reference to 'std::__once_callable'
../../lib/libicuuc.a(umutex.ao):umutex.cpp:function void std::call_once<void (&)()>(std::once_flag&, void (&)()): error: undefined reference to 'std::__once_call'
../../lib/libicuuc.a(umutex.ao):umutex.cpp:function void std::call_once<void (&)()>(std::once_flag&, void (&)()): error: undefined reference to '__once_proxy'
../../lib/libicuuc.a(umutex.ao):umutex.cpp:function void std::call_once<void (&)()>(std::once_flag&, void (&)()): error: undefined reference to 'std::__throw_system_error(int)'
../../lib/libicuuc.a(umutex.ao):umutex.cpp:function std::unique_lock<std::mutex>::lock(): error: undefined reference to 'std::__throw_system_error(int)'
../../lib/libicuuc.a(umutex.ao):umutex.cpp:function std::unique_lock<std::mutex>::lock(): error: undefined reference to 'std::__throw_system_error(int)'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:81: ../../bin/makeconv] Error 1
make[2]: Leaving directory '/b/f/w/bazel-out/k8-fastbuild/bin/bazel/foreign_cc/unicode_icu_build.build_tmpdir/tools/makeconv'
make[1]: *** [Makefile:47: all-recursive] Error 2
make[1]: Leaving directory '/b/f/w/bazel-out/k8-fastbuild/bin/bazel/foreign_cc/unicode_icu_build.build_tmpdir/tools'
make: *** [Makefile:153: all-recursive] Error 2
make: Leaving directory '/b/f/w/bazel-out/k8-fastbuild/bin/bazel/foreign_cc/unicode_icu_build.build_tmpdir'
_____ END BUILD LOGS _____
rules_foreign_cc: Build wrapper script location: bazel-out/k8-fastbuild/bin/bazel/foreign_cc/unicode_icu_build_foreign_cc/wrapper_build_script.sh
rules_foreign_cc: Build script location: bazel-out/k8-fastbuild/bin/bazel/foreign_cc/unicode_icu_build_foreign_cc/build_script.sh
rules_foreign_cc: Build log location: bazel-out/k8-fastbuild/bin/bazel/foreign_cc/unicode_icu_build_foreign_cc/Configure.log

@phlax
Copy link
Member Author

phlax commented Jan 18, 2024

cc @realtimetodie

Copy link

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Feb 17, 2024
Copy link

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 24, 2024
@phlax phlax reopened this Mar 21, 2024
@phlax phlax added no stalebot Disables stalebot from closing an issue and removed stale stalebot believes this issue/PR has not been touched recently labels Mar 21, 2024
@krinkinmu
Copy link
Contributor

@phlax I think I know what the issue here is. I was able to reproduce the issue with --config=docker-gcc and was able to move past this error (though to dicover another issue) when I added -host_action_env=CC=gcc and --host_action_env=CXX=g++. It looks like configure_make rule used to build ICU relies on the host environment configuration and if we don't provide CXX flag, it basically falls back to gcc as a linker in ICU which ultimately results in the error you see above.

At least --config=docker-gcc is fixable by changing .bazelrc, I'm not entirely sure how to fix it for builds witout explicit config provided (e.g. when toolchain is automatically detected and only g++/gcc is available), but I may try to look into it, if you're ok with assigning the issue to me?

For the context, I waas made aware of this issue when some folks internally in Microsoft hit it, so that's why I'm looking at this.

@krinkinmu
Copy link
Contributor

/assign @krinkinmu

@krinkinmu
Copy link
Contributor

I think I was correct that /usr/bin/gcc is ultimately used as CXX in the configure script, but I was not correct that providing host_action_env fixes the issue. It was a silly mistake on my part - the build order in Bazel is not deterministic, so when I discovered a new issue with GCC build I incorrectly assumed that the previous issue is addressed, alas it wasn't.

That being said, after digging through the Bazel support for CC tolchains and how can we separate CC and CXX, I realized that the failure in ICU build happens when we build tools (e.g. binaries that come together with ICU distribution). I don't think that we actually need those binary tools - we only need a libraries (and those tools aren't used in the build itself). In the end, I could fix the issue by just not building ICU tools.

After fixing ICU build, I hit another minor issue in the postgres plugin - easy to fix. And the last issue that I hit was with the cel library is overloaded-virtual warning (the same as #31814, but it was re-introduced after the fix) - I now testing a fix for that issue. If cel fix works, I will try to create a PR for the cel repo and once it's merged, I prepare a PR for Envoy fix (which will involve bumping cel library version, to avoid mainting a patch on the Envoy side).

@krinkinmu
Copy link
Contributor

Created google/cel-cpp#1048 in cel-cpp, to fix that part of the gcc build.

@krinkinmu
Copy link
Contributor

Another small update. I was not able to figure out the linker issue and building even on a very large machine results in OOM when using gcc (I tried versions 11 and 12). On the bright side, I now know that the issue is triggered by a single contrib extension - VPP VCL. When I disable VPP VCL extension, everything builds fine (modulo gcc converting some warnings to errors here and there).

I don't know what exactly in the VPP VCL extension trips gcc yet, but regardless of that, I would think that the gcc behavior in this case is more likely to be a gcc bug rather than VPP VCL bug. At the moment I'm looking for potential build configuration option changes in the extension to see if we can help gcc to build it without issues as a potential work around and will see if I can come up with a reproducer and send a bug report to the gcc folks.

@phlax
Copy link
Member Author

phlax commented Nov 6, 2024

cc @florincoras

@florincoras
Copy link
Member

@krinkinmu do you happen to have some logs? Also what gcc version are you using? VCL (part of fd.io VPP) currently runs a CI job that builds VPP with gcc 9.4

@krinkinmu
Copy link
Contributor

krinkinmu commented Nov 6, 2024

@florincoras sorry, I don't have any meangiful logs since the failure I've seen is that linker runs for a long time continiously accumulating residential memory and eventually gets killed by OOM reaper. So it's not like compilation or linking failed with an error, the problem is that linking is so resource hungry that even 256GiB of RAM is not enough.

As for the compiler versions, I tried two:

  1. gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
  2. gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0

Both experience the same failure mode. The version 11 is what the docker-gcc is currently using, so that's why I was experiemnting with it. And I tried version 12 just to see if maybe it's a known bug that got fixed in a later release of gcc and didn't get backported.

I would like to also point out that it's an LTO build. I'm not entirely sure where the LTO is configured (I don't seem to see any explicit options enabling LTO), but the OOM happens during one of the LTO passes in the linker. And building without LTO is broken, because even when I give bazel options to disable LTO, for unclear reason, some of the dependencies., including VPP VCL, are still built with LTO enabled.

And just to avoid some silly issues withing my environment, I cleaned up bazel cache (with --expunge) and tried from scratch multiple times with no difference.

@florincoras
Copy link
Member

No worries, at least that gave me something to look at. My envoy build machine doesn't have gcc-11 but I just ran an independent vpp build with gcc-11 and everything seems to be working fine.

Regarding LTO, it is applied to only one component, i.e., vppinfra, that vcl depends on. Could you add a patch at the end of vpp_vcl.patch wherein you comment out this line?

@krinkinmu
Copy link
Contributor

@florincoras Your suggestion helped to move past this linking issue. I now getting other errors that, I think, indicate a different issue (see below). These errors suggest that some symbols missing in the VPP extension, but I saw similar issues with other Envoy modules when compiled with gcc. In other cases they manifested when I used -c opt, while other configurations work fine. So I think it's not really a VPP specific issue anymore as much as some issue when compiling optimized binaries with gcc.
I think it manifests for VPP because it by default builds optimized binaries, regardless of the bazel configuration AFAIU.

SUBCOMMAND: # //contrib/exe:envoy-static [action 'Linking contrib/exe/envoy-static', configuration: efdfc2f379a3cae84691392e64ad2267e6fe30be4337824d25da362874352e1b, execution platform: @local_config_platform//:
host]                                                                                                                                                                                                              
(cd /mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/execroot/envoy && \                                                                                                                        
  exec env - \                                                                                                                                                                                                     
    BAZEL_COMPILER=gcc \                                                                                                                                                                                           
    BAZEL_LINKLIBS=-l%:libstdc++.a \                                                                                                                                                                               
    BAZEL_LINKOPTS=-lm \                                                                                                                                                                                           
    CC=gcc \                                                                                                                                                                                                       
    CXX=g++ \                                                                                                                                                                                                      
    PATH=/bin:/usr/bin:/usr/local/bin \                                                                                                                                                                            
    PWD=/proc/self/cwd \                                                                                                                                                                                           
  /usr/bin/gcc @bazel-out/k8-fastbuild/bin/contrib/exe/envoy-static-2.params)                                                                                                                                      
# Configuration: efdfc2f379a3cae84691392e64ad2267e6fe30be4337824d25da362874352e1b                                                                                                                                  
# Execution platform: @local_config_platform//:host                                                                                                                                                                
ERROR: /mount/data/ws/envoy/envoy/contrib/exe/BUILD:31:16: Linking contrib/exe/envoy-static failed: (Exit 1): gcc failed: error executing command (from target //contrib/exe:envoy-static) /usr/bin/gcc @bazel-out/
k8-fastbuild/bin/contrib/exe/envoy-static-2.params                                                                                                                                                                                                                                                                                                                                                                                    
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging                                                                                                       /mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:594: error: undefined referen
ce to 'svm_msg_q_lock_and_alloc_msg_w_ring'                                                                                                                                                                        /mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:597: error: undefined referen
ce to 'svm_msg_q_msg_data'                                                                                                                                                                                         /mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:605: error: undefined referen
ce to 'svm_msg_q_add_and_unlock'                                                                                                                                                                                   /mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:594: error: undefined referen
ce to 'svm_msg_q_lock_and_alloc_msg_w_ring'                                                                                                                                                                        /mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:597: error: undefined referen
ce to 'svm_msg_q_msg_data'                                                                                                                                                                                         /mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:605: error: undefined referen
ce to 'svm_msg_q_add_and_unlock'                                                                                                                                                                                   /mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:594: error: undefined referen
ce to 'svm_msg_q_lock_and_alloc_msg_w_ring'                                                                                                                                                                        /mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:597: error: undefined referen
ce to 'svm_msg_q_msg_data'                                                                                                                                                                                         /mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:605: error: undefined referen
ce to 'svm_msg_q_add_and_unlock'                                                                                                                                                                                   /mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:649: error: undefined referen
ce to 'svm_msg_q_alloc_msg_w_ring'                                                                                                                                                                                 /mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:650: error: undefined referen
ce to 'svm_msg_q_msg_data'                                                                                                                                                                                         /mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:653: error: undefined referen
ce to 'svm_msg_q_add_and_unlock'                                                                                                                                                                                   /mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:648: error: undefined referen
ce to 'svm_msg_q_or_ring_wait_prod'                                                                                                                                                                                /mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:594: error: undefined referen
ce to 'svm_msg_q_lock_and_alloc_msg_w_ring'                                                                                                                                                                        /mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:1171: error: undefined reference to 'svm_msg_q_sub'  
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:1178: error: undefined reference to 'svm_msg_q_free_msg'                                                                                                                                                                                                                
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:34: error: undefined reference to 'svm_msg_q_sub_raw_batch'                                                                                                                                                                                                             
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:2567: error: undefined reference to 'svm_msg_q_free_msg'                                                                                                                                                                                                                
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:34: error: undefined reference to 'svm_msg_q_sub_raw_batch'                                                                                                                                                                                                             
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:1227: error: undefined reference to 'svm_msg_q_free_msg'                                                                                                                                                                                                                
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:789: error: undefined reference to 'svm_fifo_dequeue'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:2075: error: undefined reference to 'svm_ms[135/2198]
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:754: error: undefined referen
ce to 'svm_fifo_peek'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:762: error: undefined referen
ce to 'svm_fifo_peek'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:764: error: undefined referen
ce to 'svm_fifo_peek'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:769: error: undefined referen
ce to 'svm_fifo_dequeue_drop'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:2075: error: undefined reference to 'svm_msg_q_wait'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:649: error: undefined referen
ce to 'svm_msg_q_alloc_msg_w_ring'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:648: error: undefined referen
ce to 'svm_msg_q_or_ring_wait_prod'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:787: error: undefined referen
ce to 'svm_fifo_peek'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:1407: error: undefined reference to 'fifo_segment_mai
n_init'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:1803: error: undefined reference to 'svm_msg_q_wait'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:2192: error: undefined reference to 'svm_fifo_segment
s'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:2187: error: undefined reference to 'svm_msg_q_wait'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:2229: error: undefined reference to 'svm_fifo_dequeue
_drop'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:683: error: undefined referen
ce to 'svm_fifo_enqueue_segments'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:710: error: undefined referen
ce to 'svm_fifo_enqueue'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:649: error: undefined referen
ce to 'svm_msg_q_alloc_msg_w_ring'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:648: error: undefined referen
ce to 'svm_msg_q_or_ring_wait_prod'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:683: error: undefined referen
ce to 'svm_fifo_enqueue_segments'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:710: error: undefined referen
ce to 'svm_fifo_enqueue'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:649: error: undefined referen
ce to 'svm_msg_q_alloc_msg_w_ring'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:648: error: undefined referen
ce to 'svm_msg_q_or_ring_wait_prod'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:710: error: undefined referen
ce to 'svm_fifo_enqueue'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vnet/session/application_interface.h:683: error: undefined referen
ce to 'svm_fifo_enqueue_segments'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:4392: error: undefined reference to 'svm_msg_q_sub'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:4396: error: undefined reference to 'svm_msg_q_free_m
sg'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:34: error: undefined reference to 'svm_msg_q_sub_raw_
batch'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:34: error: undefined reference to 'svm_msg_q_sub_raw_
batch'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:3325: error: undefined reference to 'svm_msg_q_timedw
ait'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vppcom.c:2555: error: undefined reference to 'svm_msg_q_timedw
ait'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:404: error: undefined reference to 'vl_msg_api_allo
c'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:415: error: undefined reference to 'vl_msg_api_send
_shmem'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/bazel-out/k8-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build.build_tmpdir/CMakeFiles/vnet/session/sessio
n.api.h:968: error: undefined reference to 'vl_api_string_len'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/bazel-out/k8-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build.build_tmpdir/CMakeFiles/vnet/sessi[74/2198]
n.api.h:332: error: undefined reference to 'vl_api_string_len'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/bazel-out/k8-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build.build_tmpdir/CMakeFiles/vnet/session/sessio
n.api.h:333: error: undefined reference to 'vl_api_format_string'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/bazel-out/k8-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build.build_tmpdir/CMakeFiles/vnet/session/sessio
n.api.h:920: error: undefined reference to 'vl_api_string_len'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/bazel-out/k8-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build.build_tmpdir/CMakeFiles/vnet/session/sessio
n.api.h:229: error: undefined reference to 'vl_api_string_len'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/bazel-out/k8-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build.build_tmpdir/CMakeFiles/vnet/session/sessio
n.api.h:230: error: undefined reference to 'vl_api_format_string'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/bazel-out/k8-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build.build_tmpdir/CMakeFiles/vnet/session/sessio
n.api_fromjson.h:295: error: undefined reference to 'vl_api_c_string_to_api_string'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/bazel-out/k8-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build.build_tmpdir/CMakeFiles/vnet/session/sessio
n.api_fromjson.h:112: error: undefined reference to 'vl_api_c_string_to_api_string'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:297: error: undefined reference to 'vl_client_get_f
irst_plugin_msg_id'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:317: error: undefined reference to 'vl_msg_api_conf
ig'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:317: error: undefined reference to 'vl_msg_api_conf
ig'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:317: error: undefined reference to 'vl_msg_api_conf
ig'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:317: error: undefined reference to 'vl_msg_api_conf
ig'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vlibapi/api_common.h:398: error: undefined reference to 'my_api_ma
in'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:503: error: undefined reference to 'socket_client_m
ain'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:505: error: undefined reference to 'vl_client_api_u
nmap'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vlibmemory/memory_client.h:77: error: undefined reference to 'my_m
emory_client_main'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:532: error: undefined reference to 'vl_socket_clien
t_connect2'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:542: error: undefined reference to 'vl_socket_clien
t_init_shm2'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:126: error: undefined reference to 'vl_api_from_api
_to_new_c_string'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:84: error: undefined reference to 'vl_socket_client
_recv_fd_msg2'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:96: error: undefined reference to 'vl_api_from_api_
to_new_c_string'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:110: error: undefined reference to 'svm_msg_q_set_e
ventfd'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:220: error: undefined reference to 'vl_api_from_api
_to_new_c_string'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:185: error: undefined reference to 'vl_socket_clien
t_recv_fd_msg2'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:197: error: undefined reference to 'vl_api_from_api
_to_new_c_string'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:211: error: undefined reference to 'svm_msg_q_set_e
ventfd'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:351: error: undefined reference to 'vl_msg_api_allo
c'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:381: error: undefined reference to 'vl_msg_api_send
_shmem'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:378: error: undefined reference to 'vl_api_vec_to_a
pi_string'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:389: error: undefined reference to 'vl_msg_api_allo
c'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:395: error: undefined reference to 'vl_msg_api_send
_shmem'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:570: error: undefined reference to 'vl_soc[12/2198]
t_disconnect2'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:572: error: undefined reference to 'vl_client_disco
nnect_from_vlib'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:329: error: undefined reference to 'vl_msg_api_allo
c'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:336: error: undefined reference to 'vl_msg_api_send
_shmem'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:720: error: undefined reference to 'vl_client_send_
disconnect'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_bapi.c:728: error: undefined reference to 'vl_socket_clien
t_recv_fd_msg2'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_cfg.c:298: error: undefined reference to 'vl_set_memory_ui
d'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_cfg.c:303: error: undefined reference to 'vl_set_memory_gi
d'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:436: error: undefined reference to 'fifo_segment
_attach'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:477: error: undefined reference to 'fifo_segment
_get_segment'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:478: error: undefined reference to 'fifo_segment
_delete'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:543: error: undefined reference to 'fifo_segment
_get_segment'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:544: error: undefined reference to 'fifo_segment
_alloc_fifo_w_offset'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:545: error: undefined reference to 'fifo_segment
_alloc_fifo_w_offset'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:551: error: undefined reference to 'fifo_segment
_get_segment'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:552: error: undefined reference to 'fifo_segment
_msg_q_attach'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:585: error: undefined reference to 'fifo_segment
_get_segment_if_valid'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:590: error: undefined reference to 'fifo_segment
_free_client_fifo'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:591: error: undefined reference to 'fifo_segment
_free_client_fifo'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:594: error: undefined reference to 'fifo_segment
_get_segment_if_valid'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:599: error: undefined reference to 'fifo_segment
_free_client_fifo'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:600: error: undefined reference to 'fifo_segment
_free_client_fifo'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:623: error: undefined reference to 'fifo_segment
_get_segment'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:624: error: undefined reference to 'fifo_segment
_msg_q_attach'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:647: error: undefined reference to 'fifo_segment
_msg_qs_discover'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:672: error: undefined reference to 'fifo_segment
_alloc_chunk_w_slice'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:673: error: undefined reference to 'fifo_segment
_chunk_offset'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:689: error: undefined reference to 'fifo_segment
_duplicate_fifo'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:690: error: undefined reference to 'fifo_segment
_duplicate_fifo'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:694: error: undefined reference to 'svm_fifo_add
_subscriber'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_private.c:695: error: undefined reference to 'svm_fifo_add
_subscriber'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_sapi.c:93: error: undefined reference to 'svm_msg_q_set_ev
entfd'
/mount/data/bazel/cache/_bazel_kmu/ca4c8634fe188ae2080ff00715ba1313/sandbox/linux-sandbox/35/execroot/envoy/external/com_github_fdio_vpp_vcl/src/vcl/vcl_sapi.c:246: error: undefined reference to 'svm_msg_q_set_e
ventfd'
collect2: error: ld returned 1 exit status                                                               
Target //contrib/exe:envoy-static failed to build                                                        
Use --verbose_failures to see the command lines of failed build steps.                                                                                                                                             
INFO: Elapsed time: 3429.496s, Critical Path: 1579.28s                                                   
INFO: 12412 processes: 3157 internal, 9253 linux-sandbox, 1 local, 1 worker.                                                                                                                                       
FAILED: Build did NOT complete successfully

@krinkinmu
Copy link
Contributor

I would like to change the mode of operation on this bug a little bit. Given that there were a bunch of issues with gcc build that are unrelated to each other, I would like to prepare a few small PRs for issues that I know how to fix and then return to the linking issues with optimized gcc builds to close this bug.

@phlax
Copy link
Member Author

phlax commented Nov 7, 2024

@krinkinmu sounds like a great idea

@florincoras
Copy link
Member

Regarding the missing symbols, if you want to try out debug vcl binaries, try changing this to Debug

krinkinmu added a commit to krinkinmu/envoy that referenced this issue Nov 7, 2024
Clang and gcc are subtly different and it seems to be the cause
of contrib build failures reported in
envoyproxy#31807 (e.g., when using
gcc to link the final binary it results in a bunch of essential
for gcc C++ symbols like __gxx_personality_v0).

This issue could be addressed (i.e., Envoy can be built using gcc).
However, given that it only happens when we build ICU binary tools
and those tools aren't used by Envoy directly or the build system,
we can just not build them and address the issue this way.

Signed-off-by: Mikhail Krinkin <[email protected]>
krinkinmu added a commit to krinkinmu/envoy that referenced this issue Nov 8, 2024
Clang and gcc are subtly different and it seems to be the cause
of contrib build failures reported in
envoyproxy#31807 (e.g., when using
gcc to link the final binary it results in a bunch of essential
for gcc C++ symbols like __gxx_personality_v0).

The issue appear to be the order of the libraries when linking.
gcc, when building statically linked binaries basically needs
libstdc++ to be the last library or alsmot the last library in
the command line. And clang does not appear to care about it
much.

This change provides libstdc++ library in LIBS environment variabe
which will put it in the right position when building the ICU
library. This works well for both clang and gcc.

Signed-off-by: Mikhail Krinkin <[email protected]>
krinkinmu added a commit to krinkinmu/envoy that referenced this issue Nov 8, 2024
…when linking ICU tools

Clang and gcc are subtly different and it seems to be the cause
of contrib build failures reported in
envoyproxy#31807 (e.g., when using
gcc to link the final binary it results in a bunch of essential
for gcc C++ symbols like __gxx_personality_v0).

The issue appear to be the order of the libraries when linking.
gcc, when building statically linked binaries basically needs
libstdc++ to be the last library or alsmot the last library in
the command line. And clang does not appear to care about it
much.

This change provides libstdc++ library in LIBS environment variabe
which will put it in the right position when building the ICU
library. This works well for both clang and gcc.

Signed-off-by: Mikhail Krinkin <[email protected]>
phlax pushed a commit that referenced this issue Nov 8, 2024
…when linking ICU tools (#37060)

Commit Message:

Clang and gcc are subtly different and it seems to be the cause of
contrib build failures reported in
#31807 (e.g., when using gcc
to link the final binary it results in a bunch of essential for gcc C++
symbols like __gxx_personality_v0).

The issue appear to be the order of the libraries when linking. gcc,
when building statically linked binaries basically needs libstdc++ to be
the last library or alsmot the last library in the command line. And
clang does not appear to care about it much.

This change provides libstdc++ library in LIBS environment variabe which
will put it in the right position when building the ICU library. This
works well for both clang and gcc.

Additional Description:

It address the issue reported in
#31807, though by itseld this
change is not enough to make gcc builds work - a few more changes are
needed.

Risk Level: Low
Testing: built with `--config=gcc` and `--config=docker-gcc` and checked
that //contrib/language/filters/http/test:language_config_test pass
after the change.
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Mikhail Krinkin <[email protected]>
phlax pushed a commit that referenced this issue Nov 8, 2024
…37038)

Angle brackets are not required after constructor and, maybe, aren't
even correct, though I'm not 100% sure on what the standard says on the
matter.

It seems like clang is fine with this syntax, but when you try to build
Envoy with gcc it complains:

```
./contrib/postgres_proxy/filters/network/source/postgres_message.h: At global scope:
./contrib/postgres_proxy/filters/network/source/postgres_message.h:397:14: error: expected unqualified-id before ')' token
  397 |   Sequence<>() = default;
      |              ^
Target //contrib/exe:envoy-static failed to build
```

Given that it's at least unusual to have angle brackets after
constructor in a class template specialization let's remove them and
satisfy both gcc and clang.

It's one of the issue that prevent contrib build with gcc. It's not the
original issue reported in
#31807, but that issue is what
started the investigation.



Signed-off-by: Mikhail Krinkin <[email protected]>
phlax pushed a commit that referenced this issue Nov 11, 2024
Commit Message:

There were a few issues with building Envoy with VCL. The fist issue is
that vppinfra library is built with LTO enabled. While there is nothing
wrong with enabling LTO, it apparently triggers some bug in GCC - during
linking one of the LTO passes just consumes all the memory in the system
and eventually crashes without finishing ( I tried to build Envoy on a
system with 256GiB of memory and it wasn't enough, so it's way past what
is reasonable).

To workaround the issue I updated vpp_vcl.patch to conditionally disable
LTO when building using GCC.

Once LTO was disabled I hit another issue - the order of libraries in
linker command line does matter, at least in the world of Unix-like
systems.

Normally, Bazel can figure out the right order, but with VPP static
libraries that are built by CMake Bazel has no information to figure out
what is the proper order of those libraries. And that ultimately
resulted in linking failures.

I considered a few options to address the issue:

1. Use alwayslink = True - while it should be the simplest and the least
surprising solution to the problem, apparently, alwayslink does not do
anything for static libraries, so this option does not work
2. Maintain the right order of libraries in the BUILD file
- that works, but it's unusual when order of targets in Bazel srcs and
deps matters, so to avoid surprising behaviour I didn't go for that
option
3. Use genrule and combine different static libraries into a single
static library - it should work in theory, but I couldn't refer to the
`ar` tool from genrule and abandoned this option
4. Use --start-group and --end-group linker options to tell to the
linker that all VPP static libraries should be considered together as a
single unit - this is the option I implemented in the end.

Additional Description:

This is part of the work done to fix gcc builds of Envoy tracked in
#31807. This change by itself
does not address the issue completely yet, but it moves us a bit closer.


Signed-off-by: Mikhail Krinkin <[email protected]>
@krinkinmu
Copy link
Contributor

The summary of the current state:

  1. I can build with GCC (using both --config=gcc and --config=docker-gcc) after disabling a few warnings that are normally turned into errors
  2. When using -c opt builds fail at the linking stage with missing symbols

Warnings don't seem like a big deal - we can always make those non-fatal at least. The linking issue is more intersting and I will try to resolve that one first.

@krinkinmu
Copy link
Contributor

I took one of the functions referenced in the linker error and tried to see where it's coming from and where it should defined to get some anchors in the code to start from:

bazel-out/k8-opt/bin/external/v8/_objs/v8_libshared_noicu/macro-assembler-shared-ia32-x64.o(.debug_addr+0x180): error: undefined reference to 'v8::internal::Assembler::vpsllw(v8::internal::XMMRegister, v8::inter
nal::XMMRegister, v8::internal::XMMRegister)'

I could actually find a reference to this function in the code: https://github.com/v8/v8/blob/bb6560830541d9d937e0ae2e2164d8708362fcae/src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.cc#L473.

What I could not find though is where the function is implemented. I know that the version of instruction with 3 registers exists in Intel specs and I could find in V8 code the version of this instruction with 2 registers and an immediate. However, I could not find any place that defines a version with 3 registers.

It's not super easy to search through V8 code generation code because it's somewhat macro heavy, so to double check I did the following:

cat bazel-out/k8-opt/bin/contrib/exe/envoy-static-2.params | grep 'bazel-out/k8-opt/.*[.]o' | xargs nm -C 2>/dev/null | grep -B10 -A10 'vpsllw'

that also didn't yield the right symbol in any of the object files that were referenced in the linker command (it did find a version of vpsllw with 2 registers and an immediate, but not the version with 3 registers - the same thing I had after looking through the V8 code).

So unless I made a mistake somewhere, the linking error might actually be legit in the sense that this function is referenced and does not exist. Because the issue only manifests when building with -c opt it looks like one of the following has to be true:

  1. Non-optimized build somehow does define the right version of vpsllw
  2. Non-optimized build does not actually need a version of vpsllw - somehow fastbuild manages to optimzie the thing away, while the optimized build does not
  3. Bazel just does not include all the files that are needed in the final linker command line

I'm going to repeat the same thing I did above for fastbuild to check if somehow maybe options 1 or 2 are true with nm tool next. And if it turns out that the right version of vpsllw acturally exists in the non-optimized code, then I will at least know where it's defined and can check if the object file exists in optimized builds.

@krinkinmu
Copy link
Contributor

In unoptimized build there is indeed no reference to vpsllw with 3 registers in any of the object files (and I checked that the object file that refers to it in optimized builds is also there in unoptimized builds, so the refernce should be there if it wasn't cut off somehow).

If it was just a single undefined reference in v8 I would consider it a typo or a bug that just went unnoticed for a while. However, the number of undefined references coming from the v8 code is rather significant, so it's hard to believe that it's just a one off typo or mistake.

@krinkinmu
Copy link
Contributor

Oh, I just spotted a thing that I think is important. Just like error in #31807 (comment) all other errors are also referring to the debug_addr section.

This is important because this section does not contain an actually used code. debug_addr section contains debugging information that requires linker resolution (e.g. when we need linker to fill in an address of a function or something after linking).
So I think that what we have here is a failure to handle debugging information in the optimize binary and not an actual missing function definition (e.g., I still think that in V8 case the right version of vpsllw is not defined, but it does not matter if it's not actually used in the final binary).

@krinkinmu
Copy link
Contributor

Compiling v8 without debugging information with -c opt does remove the undefined references in v8 code, so this confirms that the problem is limited to debuggin info (or at least to inconsistency between the debugging info and the actual emitted code).

The problem also looks very similar to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81993 that was reported and fixed in gcc quite a while ago (long before the gcc 11 or gcc 12, that I'm using now, were released).

And after some more searching I found https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110885. And from that report it looks like the following things are of interest:

  1. The issue is triggered by a combination of -gsplit-dwarf (this is for debug fission) and -fdebug-types-section (this is to facilitate removing duplicate debug info entries by linker, so it's an optimization of a sort)
  2. It seems like it could be mitigated by one of the following:
    a. disabling fission completely on gdb (I don't like it, since it diverges clang and gcc even more)
    b. dropping fdebug-types-section and losing this optimization on gcc
    c. using -gdwarf-3 - I don't know exactly how it mitigates the issue, but maybe it just renders fdebug-types-section mute by restricting gcc to use version of dwarf that does not actually benefit from fdebug-types-section?
  3. It looks like fission support and fdebug-types-section are not maintained in gcc, which raises a question whether we should keep using those with gcc going forward.

For now I'm leaning towards just finding a way to disable fdebug-types-section. It would preserve fission with a potential negative effect on the size of debugging information, which I assume, is the most tolerable of downsides we can have.

@phlax
Copy link
Member Author

phlax commented Nov 12, 2024

It looks like fission support and fdebug-types-section are not maintained in gcc, which raises a question whether we should keep using those with gcc going forward.

hmm - yeah, i was wondering similar after reading the tickets you posted

... leaning towards just finding a way to disable fdebug-types-section. It would preserve fission with a potential negative effect on the size of debugging information, which I assume, is the most tolerable of downsides we can have.

yeah - i think that is probably ok - we only publish the clang-built debug binary - so it wouldnt affect us directly, and would be better than the current situation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build area/gcc bug no stalebot Disables stalebot from closing an issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants