View topic - CMake Yields "unknown compiler"



All times are UTC + 1 hour


Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: 09 Jul 2012, 17:31 

Joined: 25 Jun 2012, 18:18
Trying to build on OS X Lion and I get an "unknown compiler" message when I run cmake. Any ideas? (I'm also curious about all the OpenMP failures, but perhaps that is related.) Thanks.

Code:
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is Clang 3.1.0
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Boost version: 1.49.0
-- Found the following Boost libraries:
--   thread
--   regex
--   program_options
--   system
--   signals
-- Found SDL: /opt/local/lib/libSDLmain.a;/opt/local/lib/libSDL.dylib;-framework Cocoa 
-- Found DevIL: /usr/local/include/IL/il.h 
-- Found DevIL-ILU: /usr/local/lib/libILU.dylib - /usr/local/include/IL/ilu.h
-- Found DevIL-ILUT: /usr/local/lib/libILUT.dylib - /usr/local/include/IL/ilut.h
-- Checking to see if CXX compiler accepts flag -fvisibility-inlines-hidden
-- Checking to see if CXX compiler accepts flag -fvisibility-inlines-hidden - yes
-- Checking to see if CXX compiler accepts flag -msse -mfpmath=sse
-- Checking to see if CXX compiler accepts flag -msse -mfpmath=sse - yes
-- Checking to see if CXX compiler accepts flag -mno-sse2
-- Checking to see if CXX compiler accepts flag -mno-sse2 - yes
-- Checking to see if CXX compiler accepts flag -mno-sse3
-- Checking to see if CXX compiler accepts flag -mno-sse3 - yes
-- Checking to see if CXX compiler accepts flag -mno-ssse3
-- Checking to see if CXX compiler accepts flag -mno-ssse3 - yes
-- Checking to see if CXX compiler accepts flag -mno-sse4.1
-- Checking to see if CXX compiler accepts flag -mno-sse4.1 - yes
-- Checking to see if CXX compiler accepts flag -mno-sse4.2
-- Checking to see if CXX compiler accepts flag -mno-sse4.2 - yes
-- Checking to see if CXX compiler accepts flag -mno-sse4
-- Checking to see if CXX compiler accepts flag -mno-sse4 - yes
-- Checking to see if CXX compiler accepts flag -mno-sse4a
-- Checking to see if CXX compiler accepts flag -mno-sse4a - yes
-- Checking to see if CXX compiler accepts flag -mno-avx
-- Checking to see if CXX compiler accepts flag -mno-avx - yes
-- Checking to see if CXX compiler accepts flag -mno-fma
-- Checking to see if CXX compiler accepts flag -mno-fma - yes
-- Checking to see if CXX compiler accepts flag -mno-fma4
-- Checking to see if CXX compiler accepts flag -mno-fma4 - yes
-- Checking to see if CXX compiler accepts flag -mno-xop
-- Checking to see if CXX compiler accepts flag -mno-xop - yes
-- Checking to see if CXX compiler accepts flag -mno-lwp
-- Checking to see if CXX compiler accepts flag -mno-lwp - yes
-- Checking to see if CXX compiler accepts flag -mno-avx2
-- Checking to see if CXX compiler accepts flag -mno-avx2 - yes
-- Checking to see if CXX compiler accepts flag -mieee-fp
-- Checking to see if CXX compiler accepts flag -mieee-fp - yes
-- Checking to see if CXX compiler accepts flag -march=i686
-- Checking to see if CXX compiler accepts flag -march=i686 - no
-- Checking to see if CXX compiler accepts flag -march=x86_64
-- Checking to see if CXX compiler accepts flag -march=x86_64 - no
-- Building Spring for 64bit environment
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Could NOT find OpenMP (missing:  OpenMP_CXX_FLAGS)
CMake Error at CMakeLists.txt:304 (Message):
  unknown compiler


Top
 Offline Profile  
 
PostPosted: 09 Jul 2012, 18:24 
Spring Developer
User avatar

Joined: 28 Jun 2007, 06:30
Clang/LLVM builds aren't tested. They will likely not compile and never work in online gaming.
I don't have any experience with xcode, but you need to switch its CXX compiler to GCC.


Top
 Offline Profile  
 
PostPosted: 09 Jul 2012, 20:41 

Joined: 25 Jun 2012, 18:18
Thanks. I installed GCC using Kenneth Reitz's tool, and now cmake tells me that the CXX compiler is GNU 4.2.1. All is well with cmake. Unfortunately, "make spring" is resulting in a segmentation fault very early on, on rts/System/Sound/CMakeFiles/sound.dir/EFX.cpp.o. It seems like this is going to get very finicky, so I'm just going to stick with Ubuntu until someone smarter and more familiar with developing on a Mac has time to work on this.


Top
 Offline Profile  
 
PostPosted: 09 Jul 2012, 21:06 
Spring Developer
User avatar

Joined: 28 Jun 2007, 06:30
I don't know what you are up to, we have a binary osx build.


Top
 Offline Profile  
 
PostPosted: 09 Jul 2012, 21:42 

Joined: 25 Jun 2012, 18:18
I'm a university student, not an expert dev or expert Mac user, so I'm only going off of the the wiki article Building Spring on MacOSX. (Why am I trying to build Spring myself if I'm not an expert? We need LuaSocket support, which is currently only available by building the development branch.) I noticed that your binary was built on Snow Leopard, so perhaps there are differences between that and Lion that are causing problems. Or I messed it up on my own in some other way.

My research into Mac-dom was purely for convenience, since we have several Macs in our lab. Taking too much more time to troubleshoot my problems wouldn't be worth it though, since we've got everything working on Ubuntu.

As a side note, is there a release date planned for Spring 89? We're very eager to be able to deploy our mod without having to build a binary from source.


Top
 Offline Profile  
 
PostPosted: 09 Jul 2012, 22:10 
Moderator

Joined: 05 Aug 2009, 19:42
1) If you're a computer science/software engineer student, you should learn how to compile stuff. You should know it anyhow if you plan to develop games for spring - it makes testing new spring engine release candidates with your game easier.
2) If you run into problems with compilation you can try to post it here, someone may be able to help you. I don't think (m)any engine devs use or even own a mac, so don't assume it will get fixed by itself magically.


Top
 Offline Profile  
 
PostPosted: 09 Jul 2012, 22:50 
User avatar

Joined: 30 May 2010, 10:56
Location: France
I (and many others) believe that Lion was not a revolution tech-wise, this is why I haven't upgraded any of my machines (including the server on which Spring for Mac is built). This is why the binary is currently SL-compatible, although Lion users have been able to run the binary.

I might consider switching directly to Mountain Lion though, more forced to than willing, just not to be left too far behind as Apple is known to drop legacy hardware and software quite fast.

Bottom line in the meantime, no troubleshooting on Lion yet (unless a charitable/knowledgeable reader passes by).


Top
 Offline Profile  
 
PostPosted: 10 Jul 2012, 22:34 
Spring Developer

Joined: 31 May 2009, 23:08
Quote:
As a side note, is there a release date planned for Spring 89? We're very eager to be able to deploy our mod without having to build a binary from source.


soon:
http://springrts.com/dl/buildbot/defaul ... eopard.zip


Top
 Offline Profile  
 
PostPosted: 12 Jul 2012, 15:24 

Joined: 25 Jun 2012, 18:18
Thanks all for the input. abma, thanks for the link. Unfortunately, I'm told that Spring_89.0 can't be opened and to check with the developer that it works with this version of Mac OS X...


Top
 Offline Profile  
 
PostPosted: 16 Oct 2012, 01:16 
Spring Developer

Joined: 31 May 2009, 23:08
sorry for not replying such a long time, was quiet busy for myself. hopefully do you have any success to report?

about the error message... i can't help, as i'm not familar with osx. i would guess it was because of some version difference / arch problem (like springs binary is 64 bit and osx is 32 bit...)


Top
 Offline Profile  
 
PostPosted: 16 Oct 2012, 01:26 

Joined: 25 Jun 2012, 18:18
No worries. We didn't really make much progress, but we weren't trying too hard. Running on OSX was just a very small item on a wish list for my team. We're running smoothly on Windows and Ubuntu these days.


Top
 Offline Profile  
 
PostPosted: 16 Oct 2012, 02:07 
Spring Developer

Joined: 31 May 2009, 23:08
ok, nice to hear. Sadly spring on osx is still experimental, as we have no dev running macosx.


Top
 Offline Profile  
 
PostPosted: 21 Nov 2012, 01:24 

Joined: 21 Nov 2012, 01:23
use
Code:
-D CMAKE_CXX_COMPILER=/usr/bin/g++
when running cmake.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.