Skip to content
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

Closed
atgeirr opened this issue Jul 19, 2012 · 13 comments
Closed

Cannot build on Mac OS X #5

atgeirr opened this issue Jul 19, 2012 · 13 comments

Comments

@atgeirr
Copy link
Member

atgeirr commented Jul 19, 2012

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

@magnesj
Copy link
Member

magnesj commented Jul 19, 2012

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,
Magne

@alfbr
Copy link
Member

alfbr commented Jul 19, 2012

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 :)

@alfbr
Copy link
Member

alfbr commented Jul 20, 2012

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.

@rolk
Copy link
Member

rolk commented Jul 20, 2012

@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?

@rolk
Copy link
Member

rolk commented Jul 20, 2012

@atgeirr Regarding OpenMP support in clang: http://permalink.gmane.org/gmane.comp.compilers.clang.devel/22023

@rolk
Copy link
Member

rolk commented Jul 20, 2012

@atgeirr
Maybe you can make it work by putting libgomp.dylib on the library list. It won't be parallelized, but I guess that is not really an issue.

@alfbr
Copy link
Member

alfbr commented Jul 20, 2012

How about simply using gcc, it is still part of xcode isn't it? Until Apple becomes entirely allergic to gpl I guess.

@magnesj
Copy link
Member

magnesj commented Jul 20, 2012

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-----
From: Roland Kaufmann [mailto:reply@reply.github.com]
Sent: 20. juli 2012 11:35
To: Magne Sjaastad
Subject: Re: [ResInsight] Cannot build on Mac OS X (#5)

@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:
#5 (comment)

@rolk
Copy link
Member

rolk commented Jul 20, 2012

@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.

@magnesj
Copy link
Member

magnesj commented Jul 20, 2012

@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.

@atgeirr
Copy link
Member Author

atgeirr commented Jul 20, 2012

@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?

@atgeirr
Copy link
Member Author

atgeirr commented Jul 20, 2012

Done! Had to manually add -lecl -lwell -lgeometry -lert_util to the link command, but ResInsight is compiled.

@atgeirr
Copy link
Member Author

atgeirr commented Jul 20, 2012

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.

@atgeirr atgeirr closed this as completed Oct 26, 2012
lukka added a commit to lukka/ResInsight that referenced this issue Apr 1, 2020
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants