conda-forge / vtk-feedstock

A conda-smithy repository for vtk.
BSD 3-Clause "New" or "Revised" License
13 stars 64 forks source link

use -DVTK_CUSTOM_LIBRARY_SUFFIX="" #77

Closed looooo closed 5 years ago

looooo commented 5 years ago

Currently I have problems building a library depending on vtk for osx because FindPackage(vtk) returns a library-list (VTK_LIBRARIES) which misses the version suffix. [1] Somehow this was working for the previous toolchain, but doesn't work after updating to new compilers. Having a look at other libraries, it seems conda doesn't need to add a version-prefix to the libraries because there should never be different vtk-packages in the same environment.

By setting -DVTK_CUSTOM_LIBRARY_SUFFIX="" [2] this issue should be solved.

[1] https://github.com/conda-forge/smesh-feedstock/pull/21#issuecomment-468715992 [2] https://bugs.archlinux.org/task/43378

looooo commented 5 years ago

After some investigation it seems this doesn't solve my problem. I guess this is the real problem:

libvtkCommonCore.dylibis a smylink to libvtkCommonCore.1.dylib. target_link_libraries(vtkCommonCore) tries to link to a symlink and fails with this strange error-message:

CMake Error in CMakeLists.txt:
  No known features for CXX compiler

  "Clang"

  version 4.0.1.

target_link_libraries(vtkCommonCore) works for me.

How to proceeds depends on how conda-build was designed. I guess this is a problem introduced by conda-build with trying to avoid linking to system libs (but I am not sure, maybe someone else can give some input about it.) If this is the case, we should try to not add symlinks to the vtk-packages. Regarding [1] vtk doesn't support this. So please anyone involved in the design of conda-build, let us know if this is a bug in conda-build or if it is a feature and we have to patch vtk.

[1] http://vtk.1045678.n5.nabble.com/Compile-VTk-Linux-Libraries-without-symbolic-links-td5746649.html

looooo commented 5 years ago

closing as this problem is not really related to vtk.