Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Can't compile under OS X Yosemite

#1
I've been using Arch Linux to compile the code and everything work. Today I tried to compile on OS X Yosemite and failed. OS X isn't my primary dev platform so I'm likely to have something basic missing. Can somebody test this as well?

I tried two setups and neither works for me. I ran
Code:
$ ./all compile

1. In the Apple dev environment (XCode + Command Line Tools), I got this error:

Code:
clang: error: optimization flag '-fno-reorder-blocks' is not supported

2. With home brew's gcc, I got this error:

Code:
In file included from hash.c:23:0:
gmqcc.h:130:66: error: operator '==' has no right operand
#       elif defined (BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN)


Any ideas?
Reply

#2
I managed to get home brew gcc to compile it. I had to do two things:

1. Remove the empty variable LITTLE_ENDIAN in gmqcc/gmqcc.h that caused the problem.

Code:
$ cd gmqcc
$ git diff gmqcc.h
diff --git a/gmqcc.h b/gmqcc.h
index 43153e9..4130307 100644
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -127,8 +127,6 @@ GMQCC_IND_STRING(GMQCC_VERSION_PATCH) \
#           define PLATFORM_BYTE_ORDER GMQCC_BYTE_ORDER_LITTLE
#       elif !defined (LITTLE_ENDIAN) && defined (BIG_ENDIAN)
#           define PLATFORM_BYTE_ORDER GMQCC_BYTE_ORDER_BIG
-#       elif defined (BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN)
-#           define PLATFORM_BYTE_ORDER GMQCC_BYTE_ORDER_LITTLE
#       elif defined (BYTE_ORDER) && (BYTE_ORDER == BIG_ENDIAN)
#           define PLATFORM_BYTE_ORDER GMQCC_BYTE_ORDER_BIG
#       endif /*! defined (LITTLE_ENDIAN) && !defined(BIG_ENDIAN) */

2. Fix the dispatch library header (/usr/include/dispatch/object.h) to work with CLANG, according to this solution:

Code:
$ diff /usr/include/dispatch/object.h object.h.original
143d142
< #ifdef __clang__
145,147d143
< #else
< typedef void* dispatch_block_t;
< #endif
Reply



Possibly Related Threads...
Thread Author Replies Views Last Post
  [NEED HELP] NetRadiant doesn't compile on Mac nokko 3 839 03-29-2019, 11:19 AM
Last Post: Freddy
  [SOLVED] linux compile/link error BuddyFriendGuy 3 1,749 11-27-2017, 08:55 PM
Last Post: Lyberta
  [BUG] xonotic-maps ebuild does not compile ZyX 0 1,122 05-01-2017, 10:10 PM
Last Post: ZyX
  [SOLVED] Ubuntu 16.0.4 Compile RedScale12 8 3,208 09-06-2016, 08:40 PM
Last Post: RedScale12
  [SOLVED] cannot compile git code dingus 5 2,647 07-27-2016, 05:13 PM
Last Post: sev
  [SOLVED] Version 8.0 won't start on OSX Yosemite oger 12 9,598 07-04-2015, 12:28 PM
Last Post: BuddyFriendGuy
  [SOLVED] Can't compile my map machine! 1 1,864 05-09-2015, 08:47 AM
Last Post: Mirio
  [NEEDS INFO] NetRadiant fails to compile with latest nvidia driver Maddin 6 3,979 03-25-2015, 06:02 AM
Last Post: Maddin
  [SOLVED] Map don't compile machine! 2 2,803 10-21-2013, 08:37 AM
Last Post: machine!
  [NEEDS INFO] Map doesn't compile machine! 12 7,249 06-27-2013, 08:49 AM
Last Post: machine!

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-