facebookincubator / katran

A high performance layer 4 load balancer
GNU General Public License v2.0
4.75k stars 504 forks source link

Build Error #211

Closed victorstewart closed 8 months ago

victorstewart commented 11 months ago

building on Clear Linux (6.6) with GCC 13.2.1 with this command python3 ./build/fbcode_builder/getdeps.py --allow-system-packages build katran and got this error:

/tmp/fbcode_builder_getdeps-ZrootZkatranZbuildZfbcode_builder-root/repos/github.com-facebookincubator-katran.git/katran/lib/BpfLoader.cpp: In function ‘std::string katran::{anonymous}::libBpfErrMsg(int)’: /tmp/fbcode_builder_getdeps-ZrootZkatranZbuildZfbcode_builder-root/repos/github.com-facebookincubator-katran.git/katran/lib/BpfLoader.cpp:46:25: error: variable ‘std::array<char, 128> buf’ has initializer but incomplete type 46 | std::array<char, 128> buf{}; | ^~~ [17/80] Building CXX object katran/lib/CMakeFiles/katranlb.dir/KatranLb.cpp.o

so i just manually edited BpfLoader.cpp to add #include <array> at the top, then it built successfully.

7anya commented 11 months ago

The above solution did not work for me, when i used ./build.sh but it works with the python script, so something is off.

std::array<char, 128> buf’ has initializer but incomplete type 46 | std::array<char, 128> buf{}; | ^~~ [25/80] Building CXX object katran/lib/CMakeFiles/katranlb.dir/KatranLb.cpp.o ninja: build stopped: subcommand failed.

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. If you'd still having this issue please make a comment, make sure you've addressed any follow ups!

github-actions[bot] commented 8 months ago

This issue has been closed because it has not had recent activity. If you are still having this issue please feel free to create a new one.