Last active
October 18, 2025 09:30
-
-
Save geohot/d0d7104afbf5ae488c025d3faa1d7f67 to your computer and use it in GitHub Desktop.
Xilinx XRT build fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Maybe this helps someone when they Google this. | |
| [ 48%] Building CXX object runtime_src/core/tools/xbtracer/CMakeFiles/xrt_trace.dir/src/wrapper/tracer.cpp.o | |
| /usr/bin/ld: libxbtracer_protobuf.a(func.pb.cc.o): undefined reference to symbol '_ZN4absl12lts_2025081412log_internal21CheckOpMessageBuilder7ForVar2Ev' | |
| /usr/bin/ld: /usr/lib/libabsl_log_internal_check_op.so.2508.0.0: error adding symbols: DSO missing from command line | |
| collect2: error: ld returned 1 exit status | |
| XRT master ❯ git diff | |
| diff --git a/src/runtime_src/core/tools/xbtracer/CMakeLists.txt b/src/runtime_src/core/tools/xbtracer/CMakeLists.txt | |
| index 2276159fb..02631afe9 100644 | |
| --- a/src/runtime_src/core/tools/xbtracer/CMakeLists.txt | |
| +++ b/src/runtime_src/core/tools/xbtracer/CMakeLists.txt | |
| @@ -22,6 +22,8 @@ if (Protobuf_VERSION VERSION_LESS 3.0) | |
| return() | |
| endif (Protobuf_VERSION VERSION_LESS 3.0) | |
| +find_package(absl REQUIRED CONFIG) # gives absl::log and friends | |
| + | |
| include_directories ( | |
| ${Protobuf_INCLUDE_DIR} | |
| ${CMAKE_CURRENT_BINARY_DIR} | |
| @@ -63,7 +65,7 @@ add_library(xrt_trace SHARED ${XBTRACER_WRAPPER_SRC_FILES} ${ProtoHeaders}) | |
| set_target_properties(xrt_trace PROPERTIES VERSION ${XRT_VERSION_STRING} SOVERSION ${XRT_SOVERSION}) | |
| target_compile_definitions(xrt_trace PRIVATE XRT_ABI_VERSION=${XRT_VERSION_MAJOR}) | |
| -target_link_libraries(xrt_trace PRIVATE xbtracer_common xbtracer_protobuf ${Protobuf_LIBRARIES} xrt_coreutil) | |
| +target_link_libraries(xrt_trace PRIVATE xbtracer_common xbtracer_protobuf ${Protobuf_LIBRARIES} xrt_coreutil absl::log) | |
| add_dependencies(xrt_trace xbtracer_common xbtracer_protobuf xrt_coreutil) | |
| file(GLOB XBTRACER_CAPTURE_SRC_FILES | |
| @@ -78,7 +80,7 @@ file(GLOB XBREPLAY_SRC_FILES | |
| "${CMAKE_CURRENT_SOURCE_DIR}/src/replay/*.cpp" | |
| ) | |
| add_executable(xrt-replay ${XBREPLAY_SRC_FILES}) | |
| -target_link_libraries(xrt-replay PRIVATE xbtracer_common xbtracer_protobuf ${Protobuf_LIBRARIES} xrt_coreutil) | |
| +target_link_libraries(xrt-replay PRIVATE xbtracer_common xbtracer_protobuf ${Protobuf_LIBRARIES} xrt_coreutil absl::log_internal_check_op) | |
| if (NOT WIN32) | |
| target_link_libraries(xrt-replay PRIVATE pthread) | |
| endif (NOT WIN32) | |
| XRT master ❯ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment