ezelkow1 commented on PR #11012:
URL: https://github.com/apache/trafficserver/pull/11012#issuecomment-1920034934

   This didnt seem to fix it for me (on gcc 8.5)
   `[ 52%] Building CXX object 
src/iocore/cache/CMakeFiles/Cache.dir/unit_tests/test_Cache.cc.o
   [ 52%] Linking CXX executable Cache
   libinkcache.a(Cache.cc.o): In function `persist_bad_disks()':
   Cache.cc:(.text+0x56c1): undefined reference to 
`std::filesystem::__cxx11::path::parent_path() const'
   Cache.cc:(.text+0x56d7): undefined reference to 
`std::filesystem::create_directories(std::filesystem::__cxx11::path const&, 
std::error_code&)'
   libinkcache.a(Cache.cc.o): In function 
`std::filesystem::__cxx11::path::operator/=(std::filesystem::__cxx11::path 
const&)':
   
Cache.cc:(.text._ZNSt10filesystem7__cxx114pathdVERKS1_[_ZNSt10filesystem7__cxx114pathdVERKS1_]+0x3d):
 undefined reference to `std::filesystem::__cxx11::path::has_filename() const'
   
Cache.cc:(.text._ZNSt10filesystem7__cxx114pathdVERKS1_[_ZNSt10filesystem7__cxx114pathdVERKS1_]+0x98):
 undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
   libinkcache.a(Cache.cc.o): In function 
`std::filesystem::__cxx11::path::is_absolute() const':
   
Cache.cc:(.text._ZNKSt10filesystem7__cxx114path11is_absoluteEv[_ZNKSt10filesystem7__cxx114path11is_absoluteEv]+0x14):
 undefined reference to `std::filesystem::__cxx11::path::has_root_directory() 
const'
   libinkcache.a(Cache.cc.o): In function 
`std::filesystem::__cxx11::path::path<std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >, 
std::filesystem::__cxx11::path>(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, 
std::filesystem::__cxx11::path::format)':
   
Cache.cc:(.text._ZNSt10filesystem7__cxx114pathC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES1_EERKT_NS1_6formatE[_ZNSt10filesystem7__cxx114pathC5INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES1_EERKT_NS1_6formatE]+0x64):
 undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
   libinkcache.a(Cache.cc.o): In function 
`std::filesystem::__cxx11::path::path<char const*, 
std::filesystem::__cxx11::path>(char const* const&, 
std::filesystem::__cxx11::path::format)':
   
Cache.cc:(.text._ZNSt10filesystem7__cxx114pathC2IPKcS1_EERKT_NS1_6formatE[_ZNSt10filesystem7__cxx114pathC5IPKcS1_EERKT_NS1_6formatE]+0x64):
 undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
   collect2: error: ld returned 1 exit status
   gmake[2]: *** [src/iocore/cache/CMakeFiles/Cache.dir/build.make:185: 
src/iocore/cache/Cache] Error 1
   gmake[1]: *** [CMakeFiles/Makefile2:4225: 
src/iocore/cache/CMakeFiles/Cache.dir/all] Error 2
   gmake: *** [Makefile:146: all] Error 2
   `
   
   just to double check I do see new cmake changes in my branch 
   
   `
   # Older LLVM and GCC compilers with C++17 support require explicit linking 
to their std::filesystem
   # libraries
   if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION 
VERSION_LESS 9.1)
     target_link_libraries(traffic_server PRIVATE stdc++fs)
   endif()
   
   if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION 
VERSION_LESS 9)
     target_link_libraries(traffic_server PRIVATE c++fs)
   endif()
   `


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to