Skip to content

Commit

Permalink
Fix OSS build issue for "undefined reference"
Browse files Browse the repository at this point in the history
Summary:
OSS builds for `fboss_hw_agent-sai_impl` currently fail due to the following error: P1539852319

```
HwTestAclUtilsThriftHandler.cpp:(.text+0x2414): undefined reference to `facebook::fboss::utility::getAclEntryByName(std::shared_ptr<facebook::fboss::SwitchState>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: HwTestAclUtilsThriftHandler.cpp:(.text+0x2453): undefined reference to `facebook::fboss::utility::getAclTrafficCounter(std::shared_ptr<facebook::fboss::SwitchState>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
[2345/2349] Building CXX object CMakeFiles/agent_hw_test_src.dir/fboss/agent/test/agent_hw_tests/AgentTrunkLoadBalancerTests.cpp.o
ninja: build stopped: subcommand failed.
Command '['/usr/bin/cmake', '--build', '/var/FBOSS/tmp_bld_dir/build/fboss', '--target', 'install', '--config', 'RelWithDebInfo', '-j', '32']' returned non-zero exit status 1.
!! Failed
```

`getAclTrafficCounter` is defined in https://fburl.com/code/3afvs9ag `AclTestUtils.cpp`, which gets built under https://fburl.com/code/r046ryop `acl_test_utils`

Reviewed By: srikrishnagopu

Differential Revision: D61631422

fbshipit-source-id: 983ef1da075fabaf805bbacc1f5009010fe5f6a0
  • Loading branch information
paulcruz74 authored and facebook-github-bot committed Aug 22, 2024
1 parent 46f97a3 commit 6425054
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmake/AgentHwSaiHwTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ add_library(agent_hw_test_thrift_handler

target_link_libraries(agent_hw_test_thrift_handler
sai_switch # //fboss/agent/hw/sai/switch:sai_switch
acl_test_utils
agent_hw_test_ctrl_cpp2
)

Expand Down

0 comments on commit 6425054

Please sign in to comment.