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
  [INVALID] Resolution can't be changed Majki 17 12,417 08-14-2022, 02:41 AM
Last Post: FAF
  [NEED HELP] Can't set 2k resolution noteven 4 2,671 05-07-2021, 02:33 PM
Last Post: noteven
  [NEED HELP] Can't join anymore fenjrill 5 2,705 07-17-2020, 07:04 AM
Last Post: LegendGuard
  [NEED HELP] Sudden loss of sound in Xonotic, can not get it to return. SeveredinTwain 5 3,416 03-26-2020, 05:55 AM
Last Post: FAF
  [SOLVED] how can i get defrag entities in netradiant? bananovenc 5 3,227 01-03-2020, 11:31 AM
Last Post: SpiKe
Question [NEED HELP] can't build netradiant (SOLVED) bananovenc 7 3,985 12-25-2019, 03:34 PM
Last Post: illwieckz
  [NEED HELP] NetRadiant doesn't compile on Mac nokko 3 2,537 03-29-2019, 11:19 AM
Last Post: Freddy
  [SOLVED] Can't click on my name in XonStats TheChrississin 4 2,404 03-09-2019, 10:24 AM
Last Post: falco
  [NEED HELP] How can i swap my account on a different pc? GTFO 1 1,801 11-23-2018, 12:42 AM
Last Post: BuddyFriendGuy
  [NEED HELP] can't join any server in the list psy31 2 3,042 11-02-2018, 10:37 AM
Last Post: psy31

Forum Jump:


Users browsing this thread:
1 Guest(s)

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