Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-13387

Add libstdc++ to the cmake library path

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Storage Engines
    • StorEng - Defined Pipeline

      libstdc++ is needed in the IAA extension but it is not automatically discoverable in our build system. Recently, I needed to link another C++ library to WiredTiger in a POC and I was hit by this problem as the WiredTiger library needs to link with libstdc++.

      I did the following change to fix this:

      diff --git a/cmake/toolchains/mongodbtoolchain_v4_gcc.cmake b/cmake/toolchains/mongodbtoolchain_v4_gcc.cmake
      index 52374b4e2d..7b95b258dd 100644
      --- a/cmake/toolchains/mongodbtoolchain_v4_gcc.cmake
      +++ b/cmake/toolchains/mongodbtoolchain_v4_gcc.cmake
      @@ -7,3 +7,4 @@ endif()
       set(CMAKE_C_COMPILER "${TOOLCHAIN_ROOT}/bin/gcc")
       set(CMAKE_CXX_COMPILER "${TOOLCHAIN_ROOT}/bin/g++")
       set(CMAKE_ASM_COMPILER "${TOOLCHAIN_ROOT}/bin/gcc")
      +set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${TOOLCHAIN_ROOT}/lib/gcc/aarch64-mongodb-linux/11.3.0")
      

      We should add this to all our toolchain cmake files.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            chenhao.qu@mongodb.com Chenhao Qu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: