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
Error with Superbuild #146
Comments
Thank you for reporting this issue. What version of CMake are you using? There is a CMake option to disable the explicit library. That can be used as a work around until the condition to produce this error are established and then a resolution found. |
I'm using 3.7.2. I will try to debug this today. |
Looking at this closer this morning I am confused by the error message.
The "site-build/ITK-prefix" is the ITK Superbuild install directory not a source directory. I could see this error message occurring if the ITK_DIR was set to the ITK build directory, and not the install directory. Can you share your configuration file you used? |
I'm annoyed now because I can't reproduce this anymore. I played a little bit around, and it went away when I built from a tag instead of master. I may have had a stale build dir somewhere. This may explain it; the error happened during the build with homebrew, but not when I was building manually outside of the homebrew context. It is still not really clear what happened but it seems to be building. As soon as the new release is on sourceforge, I'll update the homebrew formula. |
Thank you for trying out SimpleITK, and maintaining Homebrew recipes, and showing me a CMake error I have never seen before too. |
Spoke too fast ... the error pops up when simpleitk is being built. I thought it happened earlier in the process, so I did not see it at first. Here is a full build log: https://gist.github.com/iMichka/4ba263d73e0c03c99f98e0f43623bd8e And two CMakeCache files: |
From my quick look at this I am suspicious of this option: 'CMAKE_INSTALL_PREFIX'. I'll investigate tomorrow. |
If you set the option: This is just a work around for 1.0.0, you're build should still work. |
I also rebuilt |
I have not been able to reproduce this error. On a Linux RH7 system I updated cmake to 3.7.2 and did the following configuration: I did find an issue with the SimpleITKExamples super build, but not this issue. |
I have also installed CMake 3.7.2 on OS X with Xcode 8.2.1 to try to reproduce the problem. Using the same configuration line: |
I just received this error message with an anaconda build. The build directory was a sub-directory of the source tree. For the home-brew configuration is the "build" directory inside the "source" dir? |
Yes it is. Did not think about that point. I'll have to retest this week, I was away for a few days. |
I have posted a pull request which may address the issue, but there is a logical problem with your build configuration. SimpleITK depends on ITK libraries ( and ITK CMake configuration files ). Your build is specifying "-DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/simpleitk/HEAD-2eac932" for the installation path. The SimpleITK Superbuild's "install" only installs SimpleITK and does not install ITK ( or compiled build tools such as lua and SWIG ). So your CMake configuration indicates that you will install SimpleITK with its required dependency being in the temporary "build" directory. The resulting installation will not work. What are you trying to do by installing SimpleITK libraries? The other question is what should SimpleITK do with it's ITK dependency in the Superbuild? Should the SimpleITK Explicit library include interface be made public, or kept private in the build? |
Hi. Thanks for the pull request. I can confirm that the patch fixes the problem for the homebrew build. The install path is in fact The ITK build (and the whole build folder) is removed at the end of the build. We deliver ITK as a standalone installation in a different formula, so unrelated to simpleitk. After that installation step, we use: But maybe this is overkill. I guess that for Python, almost only SimpleITK.so is interesting. The installation is around 800Mb big right now. I am not sure we need to deliver all these files. FYI you can find the homebrew formula here: https://github.com/Homebrew/homebrew-science/blob/master/simpleitk.rb |
The installed C++ SimpleITK libraries are not usable with out installed ITK libraries. That is really what this error message is saying. Your immediate options are:
Related to this is extending the SimpleITK to support other languages with shared SimpleITK libraries. I know we tried creating a separate SimpleITK-core/libSimpleITK package this with SimpleITK 0.10.0 and ran into some trouble. Things may be in a better state now? |
As this error only occurs when the build of SimpleITK is configured such that the install will not be functional. I am going to abandon the pull request. There have been a number of suggestions to configure SimpleITK to avoid this error message and produce a valid installation. |
Thanks for having looked into this. I was able to successfully build simpleitk with I am still annoyed by the fact that the .a and .h files get installed: Also, for the question about splitting the core - wrapping packages, I was able to get this to run with 0.10.0, but finally stopped my effort here. Homebrew does not use that kind of concept: there is in general only one formula for each library, which has a bunch of options. So splitting this in multiple formulas is not in the philosophy of Homebrew (in contrast to debian for example where you would have more easily that kind of sub-packages). |
With the current source code when the Superbuild is used the SimpleITK subproject is always installed because of the way the ExternalProject is configured. By default ( when Thank you for working on this recipe. |
Okay it worked, I looked carefully; when CMAKE_INSTALL_PREFIX="", then the files get installed in the build tree, and not copied to the final homebrew location. Really nice, our bottles just got smaller for simpleitk. Thanks for all. |
Glad that that you go it working! This is actually the default behavior when CMAKE_INSTALL_PREFIX is not set. |
Hi. I just wanted to test last simpleITK, because the new release is coming soon. Had no time to look into this earlier, so sorry if I am a little bit late.
When building master with homebrew, I get the following error
This seems to be OK outside of homebrew. Maybe the error will give a hint of the problem.
The text was updated successfully, but these errors were encountered: