nlitsme / extfstools

Tools for extracting files from ext2,3,4 filesystem images
MIT License
121 stars 39 forks source link

itslib build failure #18

Closed ghost closed 1 year ago

ghost commented 1 year ago

At the moment the src fails to build despite CMake being able to locate and add the itslib submodule:

[ 77%] Completed 'itslib-populate'
[100%] Built target itslib-populate
Found boost at /usr/include
-- Configuring done
CMake Error at cmake_find/Finditslib.cmake:14 (add_library):
  Cannot find source file:

   .../extfstools/build/itslib-src/src/FileFunctions.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
  .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc
Call Stack (most recent call first):
  CMakeLists.txt:38 (find_package)

CMake Error at cmake_find/Finditslib.cmake:14 (add_library):
  No SOURCES given to target: itslib
Call Stack (most recent call first):
  CMakeLists.txt:38 (find_package)
ghost commented 1 year ago

This needs to be removed:

../cmake_find/Finditslib.cmake:12:list(APPEND ITSLIBSRC debug.cpp stringutils.cpp utfcvutils.cpp vectorutils.cpp FileFunctions.cpp)

The fix:

diff --git a/cmake_find/Finditslib.cmake b/cmake_find/Finditslib.cmake
index 7b38e9b..9b62212 100644
--- a/cmake_find/Finditslib.cmake
+++ b/cmake_find/Finditslib.cmake
@@ -9,7 +9,7 @@ else()
 endif()
 set(ITSLIB_INCLUDE_DIR ${ITSLIB_PATH}/include/itslib)

-list(APPEND ITSLIBSRC debug.cpp stringutils.cpp utfcvutils.cpp vectorutils.cpp FileFunctions.cpp)
+list(APPEND ITSLIBSRC debug.cpp stringutils.cpp utfcvutils.cpp vectorutils.cpp)
 list(TRANSFORM ITSLIBSRC PREPEND ${ITSLIB_PATH}/src/)
 add_library(itslib STATIC ${ITSLIBSRC})
 target_include_directories(itslib PUBLIC ${ITSLIB_INCLUDE_DIR})

If I can find a way to send a pull request that doesn't consume more than 10 seconds, I will put one in ;P (not your fault, just Github being millennial sh*t)

nlitsme commented 1 year ago

sorry, I was in the process of changing several repos, so some got out of sync. I added the FileFunctions.cpp file in itslib.

now it should work again.