-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PlusLib build issues with StealthLink #957
Comments
Update: I was able to get rid of the I think here the warning message should be more helpful to how to set the flag or it should actually do it for you Similar to how this portion sets the -fPIC flag The thought process is that the I am unsure why libboost_date_time-mt.so.1.49.0
libboost_iostreams-mt.so.1.49.0
libboost_program_options-mt.so.1.49.0
libboost_serialization-mt.so.1.49.0
libboost_system-mt.so.1.49.0
libboost_filesystem-mt.so.1.49.0
libboost_locale-mt.so.1.49.0
libboost_regex-mt.so.1.49.0
libboost_signals-mt.so.1.49.0
libboost_thread-mt.so.1.49.0 |
In cmake, did you set cxx standard to 98? @lassoan can you confirm which standards are ok for stealthlink? |
CXX 98 errors with ITK5. CMake Error at CMakeLists.txt:40 (message):
CMAKE_CXX_STANDARD:STRING=98 is not supported in ITK version 5 and greater.
-- Configuring incomplete, errors occurred!
make[2]: *** [CMakeFiles/itk.dir/build.make:91: itk-prefix/src/itk-stamp/itk-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:123: CMakeFiles/itk.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs.... Setting PLUS_ITK_VERSION=4 causes: [ 0%] Built target ITKThresholding-all
In file included from /home/mkomaiha/opt/PlusBuild-bin/itk/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_iostream.h:5,
from /home/mkomaiha/opt/PlusBuild-bin/itk/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_deprecated.cxx:4:
/home/mkomaiha/opt/PlusBuild-bin/itk/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h:90:4: error: #error "Dunno about this gcc"
90 | # error "Dunno about this gcc"
| ^~~~~ |
Yes, the stealthlink build is stuck to old versions of libraries, which may not support modern compilers. You may want to find the offending line in itk and bypass the build error. |
After looking deeper into the issue I think it is also related to the following commit PlusToolkit/PlusBuild@aa04a25.
The IF should instead look like this: #PlusBuild/SuperBuild/External_PlusLib.cmake#L199
IF(PLUS_USE_STEALTHLINK)
LIST(APPEND PLUSBUILD_ADDITIONAL_SDK_ARGS
-DSTEALTHLINK_INCLUDE_DIRS:PATH=${STEALTHLINK_INCLUDE_DIRS}
-DSTEALTHLINK_STEALTHLINK_STATIC_LIBRARY:PATH=${STEALTHLINK_STEALTHLINK_STATIC_LIBRARY}
-DSTEALTHLINK_STEALTHLINK_SHARED_LIBRARY:PATH=${STEALTHLINK_STEALTHLINK_SHARED_LIBRARY}
)
IF(WIN32)
LIST(APPEND PLUSBUILD_ADDITIONAL_SDK_ARGS
-DSTEALTHLINK_STEAELTHLINKD_STATIC_LIBRARY:PATH=${STEALTHLINK_STEALTHLINKD_STATIC_LIBRARY}
-DSTEALTHLINK_STEALTHLINKD_SHARED_LIBRARY:PATH=${STEALTHLINK_STEALTHLINKD_SHARED_LIBRARY}
)
ENDIF()
ENDIF() Also, BOOST should be added as a dependency (maybe UNIX only?) and the ELSE statement should be before #PlusLib/PlusDataCollection/CMakeLists.txt#L1420
FIND_PACKAGE(Boost COMPONENTS system REQUIRED)
LIST(APPEND ${PROJECT_NAME}_LIBS
${Boost_SYSTEM_LIBRARY}
) I am now using the updated ccmake ../PlusBuild \
-DSTEALTHLINK_ROOT_DIR=/home/mkomaiha/pymodules/stealthPyModule/StealthPyCLinkLibs \
-DPLUS_USE_STEALTHLINK=ON \
-DCMAKE_C_FLAGS_INIT="-D_GLIBCXX_USE_CXX11_ABI=0" \
-DCMAKE_CXX_FLAGS_INIT="-D_GLIBCXX_USE_CXX11_ABI=0" \
-DBUILD_TESTING=OFF \
-DCMAKE_BUILD_TYPE=Release It seems like the #PlusBuild/CMakeLists.txt#L412
SET(ep_common_args -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD} -DCMAKE_CXX_STANDARD_REQUIRED:BOOL=ON -Dep_common_args:STRING=-DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=0) This doesn't seem like a great solution at least for an automated way maybe there is something better I can do here? With this setup I can get StealthLink to build on Linux. |
Thank you very much for working on this and sharing the solution. Would you mind creating a pull request with the final working version that contains all the suggested changes? |
Yes, of course! They are pretty minimal changes. However, I'm unsure how to forward the |
@mkomaiha Was a pull request ever submitted to resolve this issue? |
Hi,
I am having issues using PlusBuild. I am using the following cmake settings:
cmake ../PlusBuild \ -DSTEALTHLINK_ROOT_DIR=/StealthPyCLinkLibs \ -DPLUS_USE_STEALTHLINK=ON \ -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" \ -DBUILD_TESTING=OFF \ -DCMAKE_BUILD_TYPE=Debug
I get these errors:
I think it has to do with "-D_GLIBCXX_USE_CXX11_ABI=0" not getting passed to the PlusLib cmake file. However, when I manually add it to the CXX flags in PlusLib-bin and try to make again I get different issues:
Any help would be much appreciated!
The text was updated successfully, but these errors were encountered: