-
Notifications
You must be signed in to change notification settings - Fork 15
Conservation Tracking dependencies and fixes for building with GCC on Linux and Mac #30
base: master
Are you sure you want to change the base?
Conversation
This reverts commit 23a7069.
…o prevent later packages from using system-python
… and finds the new VIGRA library
It looks like 132db22 refers to a patchfile called pgmlink-cmake.patch, but I think that file was accidentally left out of this PR... |
In this PR, commit 190ac3f reverts a commit from the master branch. Was it necessary to do this? Backstory: Months ago, I added the |
I don't have write permissions on chaubold's branch atm, but the patch can be found here: martinsch/buildem@48d06c6 |
Oh right, good catch, this is a relict. I'll remove the reference to the patch as we updated pgmlink's CMakeLists.txt. |
Regarding 190ac3f, you added this flag right around the time when I first tried to build on Mac using GCC, and so I relied on this way to pass the I did never build Building ExternalProjects without these settings on OSX 10.9 results in a fallback to /usr/bin/gcc and g++, which are clang. What do you suggest we should do there? |
I think the issue is what CMAKE defaults to for CMAKE_C_COMPILER and CMAKE_CXX_COMPILER. We could change the CXX and CC settings to buildem-specific variables that are not initialized. So instead of this: This would let you set the compilers but if they aren't set, compilation falls through to the OS-specific default. |
I think it's strange that the go build script chooses a different default compiler than cmake chooses. I was going to propose a go-specific fix in
(The above changes simply remove the |
That works for me :) |
Additionally to the PR of @chaubold I had to do the following changes to compile on a Ubuntu 14.04 machine:
Furthermore, I had to Everything then compiles flawlessly and the tests run fine. However, I do not see all the workflows I am supposed to see: Either tracking or object classification is missing, accompanied by that kind of message:
In this case object classification is missing. |
@JensNRAD: for OpenGM the change is to set |
@chaubold: Here are my ccmake settings (which compiled fine):
On the other hand, you are probably right ... But I did not test it. |
Your settings probably work as well because there is this second PYTHON_INCLUDE_DIR. I think this is the supposed configuration:
Now the question is: what were the settings before we touched them? Was only the |
As far as I recall the |
We compiled (successfully) on OSX 10.9 merging this PR with @jakirkham's PR #31. Additionally, the following changes had to be made:
[openblas-git]
[matplotlib]
[opengm-git] |
Updated to newest stable matplotlib version
|
When merging John's branch, a new version of h5py is installed which brings new modules. |
OpenSSL is updated in master ( 3990614 ). So, that doesn't need to be included in the PR, as well. Also, the download has been added ( janelia-flyem/janelia-flyem.github.com@5421664 ) so "FORCE" should not be needed. I'm not clear on why CC and CXX are set to GNU compilers explicitly in readline.cmake. I built this using LLVM compilers without an issue. Was there a problem that you encountered? If not, I don't think we should be setting these. This is a bit nitpicky, but do we need to delete the empty line in openblas.cmake? As for vigra, does it now require C++11? Setting this flag would stop some people using older compilers from building this. Certainly, it doesn't affect me, but maybe other people care about this. Finally, matplotlib, the freetype error is a bit interesting. Though I didn't run into this problem, it does seem that you are not alone with this issue. Does this problem go away with the new matplotlib version? If not, maybe we should add BUILDEM_DIR/include/freetype2/ to the include path for matplotlib. |
Using the gcc/g++ from mac ports I ran into assembler errors. Using these flags where the only way to built readline.
No, of course not. The whole purpose was to show what I needed to change on my Mac (with ports) to build ilastik. I did not pay attention to empty lines. I actually put a
I don't recall the error (maybe @chaubold does?), but it was necessary for building vigra on both our Mac's
Probably no, but I did not test it (I left the symlink in place). So I think it is a good idea to add it to the include path. |
So, which gcc and g++ are they referring too then?
Also, you can run cmake using |
We are building everyting with GCC 4.8 (installed via Homebrew or Mac Ports), as we need the CPLEX Optimizer, which does not work with the LLVM libc++ yet. Thus, for the whole buildem tree, we set CC/CXX to gcc-4.8/g++-4.8. But apparently building
The best option here would be to build neither of them on OSX, as Apple ships the Accelerate framework that does have BLAS and LAPACK and is optimized for all CPUs used in Macs. Unfortunately scipy apparently does not fall back to Accelerate if neither OpenBLAS nor ATLAS is present. Aside from that, Jens did get OpenBLAS to build by creating the symlinks to
It requires at least
Not really, Qt has exactly the same behaviour. Creating the symlink once with |
If it works with Homebrew, could he use that instead? Personally, I didn't trust either and installed a copy of the GNU compilers separately ( http://hpc.sourceforge.net ).
Using the Accelerate framework is a bit problematic. In particular, it has issues with forking ( ContinuumIO/anaconda-issues#133 ), ( numpy/numpy#4776 ) ( https://groups.google.com/forum/#!topic/comp.lang.python/b2Ayc8bQzMQ ) meaning the multiprocessing module can't be used. The last citation includes a response from Apple saying basically don't fork with Accelerate. This is not the only issue I have seen with Accelerate.
Can't we use this flag with gcc 4.8 then as it is supported ( https://gcc.gnu.org/gcc-4.8/cxx0x_status.html )? Just out of curiosity, which vigra commit are you using? @stuarteberg is gcc 4.4 still required for some cases?
Maybe just in freetype2.cmake, it would be best if there was a symlink command in CMake, but I don't know CMake well enough to say. Though, I am starting to have doubts as to whether this is really necessary. Looking into matplotlib, it appears that it will detect freetype2. Is it possible that there are two conflicting freetypes?
I was wondering the same thing when I wrote it. Searching my computer, the only freetypes I find are in MacPorts, which I have not added to my path, and buried deep within some existing packages (i.e. Sage, Octave, etc.). None of those paths are exposed. Further, using the Ubuntu VM ( https://github.com/ilastik/ilastik-test-vm ), which only has freetype2 installed, I had no problem going through the build of matplotlib or Qt, for that matter, without including any extra steps for freetype2. So, even if it linked against the non-BuildEM freetype2, it still would have had the same issue. |
I just wanted to document what problems occurred when compiling on a Mac 10.9 with Mac ports. That's why I didn't make a PR but instead posted the changes here. Some changes might be worth including in buildem, others can be made on the fly when people run into these problems. |
Understood. Perhaps, some of these changes do need to be integrated. I just want to make sure the set to be integrated is minimal so as not to break builds on other systems. As for the Ubuntu case, I should have been more specific. Its version is 12.04 and I have added a link in my previous comment. This is a very barebones VM. |
After looking into the freetype issue with matplotlib, it does appear to be a bug in matplotlib 1.3.1 ( matplotlib/matplotlib#3029 ). It's unclear when the bug emerged (at least after 1.1.1), but it is clear that a fix has been made and applied in 1.4.0 ( matplotlib/matplotlib@66ee42d ). |
@stuarteberg, we have look into this again next week, as buildem's master branch still does not build ilastik's conservation tracking dependencies... |
8a87bd9
to
c4e506f
Compare
This pull request contains various fixes to enable compilation of ilastik and its dependencies, including those needed for conservation tracking.
Successfully builds on:
Most fixes are unrelated to Conservation Tracking and include:
BUILDEM_ENV_STRING
Important for Conservation Tracking:
-DWITH_ATLAS=0
pgmlink.cmake
In kind collaboration with @martinsch
This change is