Member Site › Forums › Rosetta++ › Rosetta++ – General › Compiling Rosetta on Intel Macs running Leopard (OS X 10.5) › Reply To: Compiling Rosetta on Intel Macs running Leopard (OS X 10.5)
Thank you for your responses. Your questions and suggestions led me to the right path. It turns out that I was referencing version 4.4.0 for gcc. I pointed the makefile to the a copy of gcc 4.0.1 from Apple Developer tools (/Developer/usr/bin/gcc-4.0 and /Developer/usr/bin/g++-4.0 ). To make the change I edited the portions of the make file to read:
for the gcc compiler definition:
#GCC Variables
GCC = /Developer/usr/bin/gcc-4.0
GXX = /Developer/usr/bin/g++-4.0
and in the mactel build section:
ifeq ($(MAKECMDGOALS),mactel)
BUILD_TYPE := mactel
BUILD_MODE := release
CC = $(GCC)
CXX = $(GXX)
WARNFLAGS = $(GCC_WARNFLAGS) -Wno-long-double
DEPFLAGS = $(GCC_DEPFLAGS)
DEBUGFLAGS :=
OPTFLAGS := -pipe -ffor-scope -fno-exceptions
OPTFLAGS += -ffast-math -funroll-loops
OPTFLAGS += -finline-functions -finline-limit=20000
OPTFLAGS += -DNDEBUG -O3 -s
COPTFLAGS := -std=c99
CXXOPTFLAGS := -std=c++98
# XXX: Fill out platform path for macttel
INCLUDE_DIRS += -Isrc/platform/macos/
LDFLAGS := -Llib
# Set stack size to max 64M at link time
LDFLAGS += -isysroot /Developer/SDKs/MacOSX10.5.sdk -Wl,-stack_size,4000000,-stack_addr,0xc0000000
LIB_OBJ += lib/mactel/libz.a
LDLIBS = $(GCC_LDLIBS)
STRIP = strip
endif
ALSO, PLEASE NOTE THE FOLLOWING SPECIFIC CHANGES:
1. a change in LIB_OBJ += was necessary to look for the correct version of libz.a. the line now reads: LIB_OBJ += lib/mactel/libz.a
2. LDFLAgs had been set to look in /Developer/SDKs/MacOSX10.4.u.sdk, however this gave the build error:
lib/libz.a -o rosetta.mactel
ld: library not found for -lcrt1.10.5.o
collect2: ld returned 1 exit status
make: *** [rosetta.mactel] Error 1
Correcting the path to /Developer/SDKs/MacOSX10.5.sdk AND copying /Developer/SDKs/MacOSX10.5.sdk/usr/lib/crt1.10.5.o to /Developer/SDKs/MacOSX10.5.sdk/usr/lib/lcrt1.10.5.o allowed rosetta to successfully compile and produced the rosetta.mactel executable with no errors.
thanks again for your help, questions and suggestions!
> Hi, One of our developers has tested this on Mac.
>
> After checking out just the rosetta++ directory, he was able to compile and run rosetta fine . If you are using an Intel Mac, they should be using “make mactel” to build. You can try “make clean” and start a fresh compile with “make mactel”.
>
> Besides this, what the gcc version do you have?
>
>
> > Despite numerous attempts I have been unable to compile Rosetta on my intel-based Mac. The FAQ points a question regarding installation on intel-Macs to this post:
> > [http://www.rosettacommons.org/tiki/tiki-index.php?page=Compiling+Rosetta+on+Mac+OS+X+10.4.9]
> >
> > Unfortunately, the suggestions still don’t resolve the problem.
> >
> > I have tried the following, all fail:
> >
> > make mac
> > make mactel
> > make gcc
> > make gcc34
> >
> > I have run the installation with and without the -j 2 flag to use both processing cores, however the installation always fails
> >
> > __Here is my computer setup:__
> > iMac, 2.8GHz Intel Core 2 Duo
> > 4 GB RAM, Mac OS X 10.5.3
> >
> >
> > __Here are the warnings and errors I get:__
> >
> > pose_dna.cc: In function ‘void zf_linker_relax(pose_ns::Pose&, const std::string&)’:
> > pose_dna.cc:3710: warning: suggest parentheses around && within ||
> >
> > barcode_classes.h:261: warning: suggest parentheses around comparison in operand of &
> >
> >
> > __The installations always fail with this:__
> >
> > At global scope:
> > cc1plus: error: unrecognized command line option “-Wno-long-double”
> > make: *** [[.mac.pose.o] Error 1
> >
> > At global scope:
> > cc1plus: error: unrecognized command line option “-Wno-long-double”
> > make: *** [[.mac.pose_dna.o] Error 1
> >
> >