-
-
Notifications
You must be signed in to change notification settings - Fork 831
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
Mac OS compilation issue... #444
Comments
What compiler version are you using? |
I have XCode 9.4 installed. clang and gcc report the following: Unrelated question: will AliceVision / Meshroom be useful on a Mac that does not have an NVidia card? thanks. |
CUDA is required for depth map computation. @simogasp Do you know the compiler versions required for C++11 on macos? |
@patniemeyer can u please post the log of the messages, including the command line you use to do cmake? |
Sure - I'm just following the build instructions for Mac in INSTALL.md. `pat@desk:~/Desktop/alicevision/build $ cmake -DCMAKE_BUILD_TYPE=Release -G "Xcode" ../AliceVision -- ALICEVISION_BUILD_DEPENDENCIES: OFF CMake version: 3.11 -- Configuring incomplete, errors occurred! |
can you start from scratch, ie remove the build directory and redo the whole thing. There are some missing lines at the beginning, probably because you already launched once.
(but with your version of Apple clang) |
Sure, here is a clean attempt:
and here are the compiler versions:
|
That's really strange, I thought there was some kind of configuration error but it is not. can you share the result of
(from your build directory) |
also in an unrelated issue, I don't think you'll be able to compile the cuda part (MVS), as CUDA 9.2 supports xcode 9.2 (https://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html#system-requirements) and according to your clang version you have xcode 9.4 (https://gist.github.com/yamaya/2924292#file-xcode-clang-vers-L244). (and I assuming that you have cuda 9.2, otherwise it will be even worst :-( ). |
The output is pretty lengthy so I have copied the cmake log here: |
The default gcc on apple is outdated. In order to enable C++11 support you would need to install gcc manually via homebrew and enable explicit C++11 in the CMakeLists file.
then modify the CMakeLists and add the following lines below the
This will enable C++11 support. |
uhm it's stange because its gcc is a link to the apple compiler. |
Also on another note, you might still have compilation issues since certain libraries don't auto-resolve. You need to install the following libraries:
After that you need to install opengv:
Wait until that is completed and then run the AliceVision build command. |
@simogasp yes that worked as well. However now the |
cool! |
Nvm. it failed on Installing it via: http://alice.loria.fr/software/geogram/doc/html/geogram_compiling.html |
what is the problem? |
It's not installed or available on my system. |
ok Or, this takes longer, you can build all the needed dependencies with alicevision with https://github.com/alicevision/AliceVision/blob/develop/INSTALL.md#building-the-project-with-embedded-dependencies |
Ok let me try this. EDIT: It seems to be building however I had to install NASM |
Well I am stuck again on
|
did libpng build correctly? If you
does it build? |
Yep but for some reason it does not create the libpng.so .. |
Maybe created in a different folder on macos, like lib64 instead of lib or something like that. |
because it's a OSX and it must create a libpng.dylib. Is it there in |
Nope. this is really strange because I see where it finalizes the compilation but than does not write the libpng.so .. neither the dylib .. |
this is my (on OSX)
did you install automake and libtool ( |
at worst you can install libpng with brew ( |
but it puzzles me why it does not work |
I am running it again right now. |
So I got all the way to this: -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) |
Oh ok .. I see the error .. brewing https://stackoverflow.com/questions/38566367/installing-cuda-via-brew-and-dmg |
Good news: I got through the first step of configuring with the following result: ** AliceVision version: 0.9.5 -- EIGEN: 3.3.4 -- Could NOT find ILOG (missing: ILOG_CPLEX_LIBRARY ILOG_CPLEX_INCLUDE_DIR) |
However it fails now at
|
yes because the AppleClang does not support openmp. |
No. It is not supposed to add openmp flags if it is not detected: |
But openmp is enabled in your configuration:
|
Is there no way to get openmp support on osx? The performance will suffer a lot by disabling openmp. |
it;'s not officially supported on AppleClang, there are some workarounds Otherwise, you need to install clang with homebrew as I do and use that one to build. On the other hand, that it is likely to fail building the cuda part as it is not supported on OSX. |
Well u won't believe it but I just got the line So what I did was disabling OpenMP (and actually removing the sections from the dependency CMake files) and also turning CUDA off. |
Ok so now that I have both meshroom and the library working, I am getting stuck on is there some sample image I can test the library + meshroom before I run my own images? |
You can try one of these datasets (maybe |
Well - it went through till it had to calculate the depth map ..
It looks like it was never compiled. I probably bet that is the one that needs CUDA, right? |
Yes, without cuda you cannot use the second part of the pipeline for dense reconstruction and meshing (MVS) |
Only the depthmap computation requires cuda but the other MVS steps rely on the depthmap output. |
So I been trying to use XCODE 9.2.0 which contains the 9.0.0 LLVM and still no luck. Now half of the math.c library is missing .. argh! So how did you guys actually got it compiled under High Sierra? (10.13)? |
Here is the full log: https://pastebin.com/X32KhQYQ |
That's strange. Maybe related to a problem with the cuda runtime installation. How did you install cuda on this machine? |
@flyandi what lines did you change to get rid of the OpenMP error? I'm stuck at that point right now |
I did not - I installed OpenMP from source. |
Thanks partially to the advice and help in this thread, I've just finished writing up a blog post and associated Homebrew tap for installing AliceVision on Mac OS X. |
I was able to compile without any issues using clang 6.0.0 (which includes OpenMP support) and all dependent libraries through macports. The only trick is that you have to be careful to tell CMake to use that compiler instead of the default AppleClang compiler by setting CMAKE_CXX_COMPILER and CMAKE_C_COMPILER to /opt/local/bin/clang++ and /opt/local/bin/clang, respectively. |
So build is now possible thanks to @ryanfb. |
which nvcc's are supported? i finally got ~80% through the build but it failed with: |
it depends on your cuda version. For example the latest cuda 10 (https://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html) supports apple LLVM 9.0.0, which corresponds to the one shipped with XCode 9.0-9.2 (see here https://gist.github.com/yamaya/2924292) If your xcode version is too newer the only thing to do i'm afraid is to downgrade xcode installing an older version. |
Attempting to build on Mac OS 10.13 I get:
CMake Error at src/CMakeLists.txt:186 (message): The compiler does not support the CXX11 standard.
The text was updated successfully, but these errors were encountered: