facebook/fbthrift

thrift1: undefined symbol: _ZN6apache6thrift8compiler14parsing_driverC1ERNS1_14source_managerERNS1_18diagnostic_contextENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS1_14parsing_paramsE

donsbot opened this issue · 2 comments

Building with clang-11 / Debian 11 fails at:

[1/253] Generating api files. Output: /tmp/fbcode_builder_getdeps-ZhomeZdonsZGleanZhsthriftZbuildZfbcode_builder/build/fbthrift/thrift/annotation
FAILED: thrift/annotation/gen-cpp2/api_constants.h thrift/annotation/gen-cpp2/api_data.h thrift/annotation/gen-cpp2/api_metadata.h thrift/annotation/gen-cpp2/api_types.h thrift/annotation/gen-cpp2/api_types.tcc thrift/annotation/gen-cpp2/api_constants.cpp thrift/annotation/gen-cpp2/api_data.cpp thrift/annotation/gen-cpp2/api_types.cpp

with:

$ cd /tmp/fbcode_builder_getdeps-ZhomeZdonsZGleanZhsthriftZbuildZfbcode_builder/build/fbthrift/thrift/annotation && /tmp/fbcode_builder_getdeps-ZhomeZdonsZGleanZhsthriftZbuildZfbcode_builder/build/fbthrift/bin/thrift1 --gen mstch_cpp2:templates,no_metadata,include_prefix=thrift/annotation -o /tmp/fbcode_builder_getdeps-ZhomeZdonsZGleanZhsthriftZbuildZfbcode_builder/build/fbthrift/thrift/annotation -I /tmp/fbcode_builder_getdeps-ZhomeZdonsZGleanZhsthriftZbuildZfbcode_builder/repos/github.com-facebook-fbthrift.git /tmp/fbcode_builder_getdeps-ZhomeZdonsZGleanZhsthriftZbuildZfbcode_builder/repos/github.com-facebook-fbthrift.git/thrift/annotation/api.thrift
/tmp/fbcode_builder_getdeps-ZhomeZdonsZGleanZhsthriftZbuildZfbcode_builder/build/fbthrift/bin/thrift1: symbol lookup error: /tmp/fbcode_builder_getdeps-ZhomeZdonsZGleanZhsthriftZbuildZfbcode_builder/build/fbthrift/bin/thrift1: undefined symbol: _ZN6apache6thrift8compiler14parsing_driverC1ERNS1_14source_managerERNS1_18diagnostic_contextENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS1_14parsing_paramsE

any thoughts?

thrift1: undefined symbol: _ZN6apache6thrift8compiler14parsing_driverC1ERNS1_14source_managerERNS1_18diagnostic_contextENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS1_14parsing_paramsE

Looks like you are building parts of thrift compiler as shared libraries and they are not in the path. You should either build them as static libraries (the default) or set LD_LIBRARY_PATH.

Ah yep that's it. Partial build artifacts from prior shared lib builds floating around. Nuke the env and rebuild, its green.