View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014934 | VTK | (No Category) | public | 2014-08-14 09:53 | 2014-10-02 13:19 | ||||
Reporter | Alex Zawadzki | ||||||||
Assigned To | Marcus D. Hanwell | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0014934: Basic project build in VTK 6.2 has linker problems | ||||||||
Description | My example project failed to compile, error-ing out at linker stage. I was trying to follow the documentation here: http://www.vtk.org/Wiki/VTK/Build_System_Migration [^] My CMakeLists.txt (well, the relevant bits): ################### find_package(VTK 6.2 EXACT REQUIRED NO_MODULE) include(${VTK_USE_FILE}) find_package(GLEW REQUIRED) set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS ${VTK_DEFINITIONS}) include_directories( ${VTK_INCLUDE_DIRS} ${GLEW_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ) #################### # Make my_target #################### set(EXE my_target) set(SOURCES my_target.cpp ) add_executable(${EXE} ${SOURCES}) target_link_libraries(${EXE} ${VTK_LIBRARIES} ${GLEW_LIBRARY} ) ################### The linker errors generated: /usr/bin/ld: cannot find -lvtkWrappingTools /usr/bin/ld: cannot find -lvtkGUISupportQt /usr/bin/ld: cannot find -lvtkWrappingPythonCore /usr/bin/ld: cannot find -lvtkFiltersPython /usr/bin/ld: cannot find -lvtkGUISupportQtSQL /usr/bin/ld: cannot find -lvtkRenderingQt /usr/bin/ld: cannot find -lvtkglew /usr/bin/ld: cannot find -lvtkGUISupportQtOpenGL /usr/bin/ld: cannot find -lvtkLocalExample /usr/bin/ld: cannot find -lvtkViewsQt /usr/bin/ld: cannot find -lvtkoggtheora /usr/bin/ld: cannot find -lvtkGUISupportQtWebkit My guess as to what's going on: The default set of libraries is a bit over-zealous, and includes things that never got built. For example, I built the VTK 6.2 nightly with no python or Qt wrapping, so was surprised to see the linker looking for that sort of thing. One current work-around is to override the default by specifying exact stuff (modules/groups/libraries?). Hope that's useful! Please let me know if more details would help. | ||||||||
Tags | hackaton | ||||||||
Project | TBD | ||||||||
Type | incorrect functionality | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0033421) Marcus D. Hanwell (developer) 2014-10-02 09:30 |
I think that we need to reduce the default set of libraries, but my general advice here is that people should be specifying the things they actually want to use. The COMPONENTS is recursive, and therefore asking for vtkRenderingOpenGL will bring in a large number of dependent modules. |
(0033490) Marcus D. Hanwell (developer) 2014-10-02 13:19 |
You must have a dirty build tree, I verified that upon changing the VTK build options to only build vtkCommon VTK_LIBRARIES only has vtkCommonCore;vtksys whereas it had previously been building all libraries. This was tested on Linux (looks like your output), if you can provide details to reproduce this then please let me know, but our current build system fully supports changing the build tree. It is also possible that your build failed, as you are seeing a library added to VTK_LIBRARIES that was not exported - hence the -l which would never appear for exported targets (as VTK does). If you look at the guide, it also encourages you to specify COMPONENTS in your find_package call, but this looks like an issue with a bad build tree to me. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2014-08-14 09:53 | Alex Zawadzki | New Issue | |
2014-10-01 20:25 | Berk Geveci | Tag Attached: hackaton | |
2014-10-01 20:25 | Berk Geveci | Assigned To | => Marcus D. Hanwell |
2014-10-02 09:30 | Marcus D. Hanwell | Note Added: 0033421 | |
2014-10-02 13:19 | Marcus D. Hanwell | Note Added: 0033490 | |
2014-10-02 13:19 | Marcus D. Hanwell | Status | backlog => closed |
2014-10-02 13:19 | Marcus D. Hanwell | Resolution | open => fixed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |