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
Question [NEED HELP] After a successful build & compile (0.8.5): This script is not properly set up yet. John 1 1,116 01-27-2024, 12:07 AM
Last Post: John
  [NEED HELP] Can't hear the announcer voice anymore gianmarco 4 1,268 01-16-2024, 12:26 PM
Last Post: gianmarco
  [INVALID] Resolution can't be changed Majki 17 14,582 08-14-2022, 02:41 AM
Last Post: FAF
  [NEED HELP] Can't set 2k resolution noteven 4 3,583 05-07-2021, 02:33 PM
Last Post: noteven
  [NEED HELP] Can't join anymore fenjrill 5 3,591 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 4,782 03-26-2020, 05:55 AM
Last Post: FAF
  [SOLVED] how can i get defrag entities in netradiant? bananovenc 5 4,513 01-03-2020, 11:31 AM
Last Post: SpiKe
Question [NEED HELP] can't build netradiant (SOLVED) bananovenc 7 5,862 12-25-2019, 03:34 PM
Last Post: illwieckz
  [NEED HELP] NetRadiant doesn't compile on Mac nokko 3 3,241 03-29-2019, 11:19 AM
Last Post: Freddy
  [SOLVED] Can't click on my name in XonStats TheChrississin 4 3,020 03-09-2019, 10:24 AM
Last Post: falco

Forum Jump:


Users browsing this thread:
1 Guest(s)

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