View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012028 | ITK | ITK | public | 2011-03-30 13:34 | 2011-04-07 09:28 | ||||
Reporter | Martin Bergtholdt | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Visual Studio 9 2008 Win64 | OS | Windows-7 | OS Version | Windows-7 | ||||
Product Version | ITK-4-A3 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0012028: BUILD_SHARED_LIBS no longer possible using MSVC, therefore no wrappers possible | ||||||||
Description | A few weeks ago it seems that building shared libraries using msvc has become impossible. The reason is the CMake include ITKPlatformSpecificChecks.cmake which disables BUILD_SHARED_LIBS for non GNU compilers. I can therefore no longer build Python wrappers using WrapITK since in itkWrapSetup.cmake this produces an error: if(NOT BUILD_SHARED_LIBS) message(FATAL_ERROR "Wrapping requires a shared build, change BUILD_SHARED_LIBS to ON") endif(NOT BUILD_SHARED_LIBS) | ||||||||
Steps To Reproduce | Set these CMake options: BUILD_SHARED_LIBS=ON ITK_BUILD_ALL_MODULES=ON ITK_USE_REVIEW=ON USE_WRAP_ITK=ON WRAP_ITK_PYTHON=ON BUILD_SHARED_LIBS is reset to OFF once ITKPlatformSpecificChecks.cmake is included. WrapITK consequently complains that BUILD_SHARED_LIBS is OFF. This was rather hard to find out where BUILD_SHARED_LIBS was turned OFF | ||||||||
Additional Information | BUILD_SHARED_LIBS OFF should not be silently done, it is really hard to figure this out! Will it be impossible to compile wrappers for ITK 4.0 using MSVC? | ||||||||
Tags | msvc, shared, WrapITK | ||||||||
Resolution Date | |||||||||
Sprint | |||||||||
Sprint Status | backlog | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0026010) Hans Johnson (developer) 2011-04-01 10:19 |
Bill, I just assigned this to you because you seem to have been working on these issues lately. Feel free to pass the hot potato to someone else if needed. Hans |
(0026024) Brad King (manager) 2011-04-01 15:38 |
We have to force BUILD_SHARED_LIBS to OFF within most of the tree because we don't actually support shared libraries on Windows, except for ITK-Common which is set up as a special case. The reason is that the numerics library, vnl, does not have proper dllexport markup because it is very tricky to do with the library's manual instantiation approach. This has always been the case since ITK started. The problem is with when the check for wrapping is done. Prior to modularization the itkWrapSetup code was loaded before the BUILD_SHARED_LIBS changes: http://itk.org/gitweb?p=ITK.git;a=blob;f=CMakeLists.txt;hb=v4.0a06#l356 [^] Then the main Wrapping directory was added later: http://itk.org/gitweb?p=ITK.git;a=blob;f=CMakeLists.txt;hb=v4.0a06#l828 [^] Now both are included near the bottom of the file: http://itk.org/gitweb?p=ITK.git;a=blob;f=CMakeLists.txt;hb=fd4805a3#l503 [^] |
(0026025) Brad King (manager) 2011-04-01 15:40 |
I think this can be fixed simply by changing the check in wrapping setup to inspect ITK_BUILD_SHARED_LIBS instead of BUILD_SHARED_LIBS. The former is set to record the original value of the latter before forcing it OFF. |
(0026084) Brad King (manager) 2011-04-04 14:36 |
Gaetan, please confirm that checking ITK_BUILD_SHARED_LIBS is enough for Wrapping. |
(0026125) Brad King (manager) 2011-04-06 13:37 |
Martin, if you edit Wrapping/itkWrapSetup.cmake and replace BUILD_SHARED_LIBS with ITK_BUILD_SHARED_LIBS, the complaint should go away. Does the build work after that? |
(0026135) Brad King (manager) 2011-04-07 09:28 |
http://itk.org/gitweb?p=ITK.git;a=commitdiff;h=840999df [^] |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-03-30 13:34 | Martin Bergtholdt | New Issue | |
2011-03-30 13:36 | Martin Bergtholdt | Tag Attached: msvc | |
2011-03-30 13:36 | Martin Bergtholdt | Tag Attached: WrapITK | |
2011-03-30 13:36 | Martin Bergtholdt | Tag Attached: shared | |
2011-04-01 10:18 | Hans Johnson | Assigned To | => Bill Lorensen |
2011-04-01 10:18 | Hans Johnson | Status | new => assigned |
2011-04-01 10:19 | Hans Johnson | Note Added: 0026010 | |
2011-04-01 15:38 | Brad King | Note Added: 0026024 | |
2011-04-01 15:40 | Brad King | Note Added: 0026025 | |
2011-04-04 14:36 | Brad King | Assigned To | Bill Lorensen => Gaetan Lehmann |
2011-04-04 14:36 | Brad King | Note Added: 0026084 | |
2011-04-06 13:37 | Brad King | Note Added: 0026125 | |
2011-04-07 09:28 | Brad King | Assigned To | Gaetan Lehmann => Brad King |
2011-04-07 09:28 | Brad King | Note Added: 0026135 | |
2011-04-07 09:28 | Brad King | Status | assigned => closed |
2011-04-07 09:28 | Brad King | Resolution | open => fixed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |