-
Notifications
You must be signed in to change notification settings - Fork 92
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
Cannot build on Mac OS X #5
Comments
Unfortunately, we do not currently support the Mac platform. Supported platform now is RedHat 5, and we have some test code running on Windows. Regards, |
Atgeirr, I suggest you try with a real compiler ;) Clang did not support openmp last time I checked. As Magne says there are no plans to support OSX, and no funds to support it. Still patches are of course welcome :) |
I can add that we are deploying Resinsight also on RH6 these days, just as with RH5 it is compiled against cmake 2.8 and Qt 2.7.3 or newer. Moreover, I have tested it on ubuntu 12.04 where it compiles and works beautifully out-the-box with the dependencies listed in the README. Roland recently slacked the dependencies in the cmake files som that it also compiles and runs on ubuntu 10.04, and hence should also work nicely with all releases of Debian. |
@atgeirr It seems to me that there should be a clause However, another question is whether clang can compile OpenMP; it is my understanding that it cannot, at least not yet. Are you able to manually compile VisualizationModules/LibRender/cvfDrawableGeo.cpp for instance? |
@atgeirr Regarding OpenMP support in clang: http://permalink.gmane.org/gmane.comp.compilers.clang.devel/22023 |
@atgeirr |
How about simply using gcc, it is still part of xcode isn't it? Until Apple becomes entirely allergic to gpl I guess. |
Hi, Roland, you are correct regarding the missing test in CMakeLists.txt. An easy test is to not define openmp compiler directive on Mac, the code is intended to work without OpenMP. Magne -----Original Message----- @atgeirr It seems to me that there should be a clause ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") at CMakeLists.txt:26, which then contains the appropriate flags for clang. The ELSE clause seems to be Windows-specific (it should probably be guarded with a test for Windows and then having a generic else throwing an error). However, another question is whether clang can compile OpenMP; it is my understanding that it cannot, at least not yet. Are you able to manually compile VisualizationModules/LibRender/cvfDrawableGeo.cpp for instance? Reply to this email directly or view it on GitHub: |
@magnesj Hm. It seems that cafProjectDataModel/cafOmpMutex.h is the only file that actually depends on the OpenMP runtime, but this is never included anywhere... @atgeirr If you pull the changes from the 'mac' branch in my fork of ResInsight, it may compile on MacOS X (I don't have a Mac at work (yet! :-))) so it is untested. |
@rolk This is correct, but this file will be included when we need it in ResInsight. This mutex class is part of an application framework that is also used in other projects. |
@rolk Tried your branch, and it seems to work better. Only a few link errors now. Had to fix a few compiler errors, though. Perhaps I should have used a non-bleeding-edge version of the ERT-libraries? |
Done! Had to manually add -lecl -lwell -lgeometry -lert_util to the link command, but ResInsight is compiled. |
The changes I needed to make to the code are available in my fork. I have not made a pull request, since I do not know if this breaks ResInsight with older versions of ERT. |
# This is the 1st commit message: use run-vcpkg@v1 and run-cmake@v1 # This is the commit message OPM#2: enable cmake tracing and dump of cmakecache.txt # This is the commit message OPM#3: print python version and environment # This is the commit message OPM#4: pwsh vs cmd environment? # This is the commit message OPM#5: cmd vs pwsh? # This is the commit message OPM#6: cmakecache after build # This is the commit message OPM#7: pwsh vs cmd # This is the commit message OPM#8: pwsh vs cmd # This is the commit message OPM#9: use run-cmake with fix for vxcproj's PATH management
Using Mac OS X 10.7 (Lion), with Qt SDK 1.2.1 (Qt 4.8.1), cmake is successful,
but make fails:
[ 0%] Building CXX object VisualizationModules/LibCore/CMakeFiles/LibCore.dir/cvfAssert.cpp.o
clang: error: no such file or directory: '/openmp'
make[2]: *** [VisualizationModules/LibCore/CMakeFiles/LibCore.dir/cvfAssert.cpp.o] Error 1
make[1]: *** [VisualizationModules/LibCore/CMakeFiles/LibCore.dir/all] Error 2
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: