Ok, I'll try that... although it will be a bit more difficult than thatzullil wrote:DoubleCheck-2.6 compiled and seems to run normally for me. It must use some sse-4 instruction, since it wouldn't link on my old Core 2 Duo MacBook (the only machine I have with Lion installed.) On my Mac Pro running Snow Leopard it compiled fine with both:
Code: Select all
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)I removed -flto from CFLAGS and made LDFLAGS empty. So the makefile becameCode: Select all
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build)
You should have the old non-llvm based gcc on your Lion system; it's called gcc-4.2 not gcc.Code: Select all
CC=llvm-gcc CFLAGS=-O3 -std=c99 -DPOSIX -DNDEBUG -Wall LDFLAGS= SOURCES=bitboard.c board.c eval.c magic.c main.c move.c movegen.c movesort.c psq.c search.c tt.c uci.c uci_option.c util.c zobrist.c OBJECTS=$(SOURCES:.c=.o) EXECUTABLE=DC all: $(SOURCES) $(EXECUTABLE) $(EXECUTABLE): $(OBJECTS) $(CC) $(LDFLAGS) $(OBJECTS) -o $@ .c.o: $(CC) $(CFLAGS) $< -o $@
on my new macbook pro with osx lion and XCode 4.1 I have some problems with gcc.
In /usr/bin I cannot find gcc-4.2
I only have the following versions:
i686-apple-darwin11-llvm-gcc-4.2
llvm-gcc
llvm-gcc-4.2
As a result when I try to select gcc42 by means of port select --set gcc gcc42 it returns me the following error: Selecting 'gcc42' for 'gcc' failed: could not create new link "/opt/local/bin/gcc": target "/usr/bin/gcc-4.2" doesn't exist
However port select gcc returns me the following versions:
apple-gcc42
gcc42
llvm-gcc42 (active)
mp-gcc44
How can I fix this problem?
Thanks!
Source: http://stackoverflow.com/questions/8007 ... on-missingThere should be a /usr/bin/gcc-4.2 with Xcode 4.1 installed. However, with the recent Xcode 4.2 update, Apple has finally removed their modified standard gcc-4.2. What remains is either llvm-gcc42 (also symlinked to gcc) and clang, the newer non-gcc C compiler. Apple is making the transition to clang; the first step is using the hybrid llvm-gcc42. There have been some reported problems using either of the new compilers. You should be using this time to figure out if you have problems with them and, if so, fix your code and report bugs to Apple. In the meantime, if you absolutely have to have the old gcc-4.2, it is possible to build one similar to the previous Apple-modified one via MacPorts:
port install apple-gcc42
but you'll be swimming against the tide.
Let's see if I can install gcc-4.2 easily through MacPorts now...
