If building on/for 32 bit then use this in the shell.
export CFLAGS="-arch i386"
export LDFLAGS="-arch i386"
For 64 bit.
export CFLAGS="-arch x86_64"
export LDFLAGS="-arch x86_64"
Or it may even be as simple as removing the arch you do not need from the makefile.osx then build again.
First I tried editing makefile.osx thus:
# i386 for 32-bit; x86_64 for 64 bit:
# CFLAGS=-mmacosx-version-min=10.5 -arch i386 -O3 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
CFLAGS=-mmacosx-version-min=10.5 -arch x86_64 -O3 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
Got the same error. Then, without reverting makefile.osx,
src $ export CFLAGS="-arch x86_64"
src $ export LDFLAGS="-arch x86_64"
src $ make -f makefile.osx
llvm-g++ -mmacosx-version-min=10.5 -arch x86_64 -O3 -Wno-invalid-offsetof -Wformat -g -DMAC_OSX -DMSG_NOSIGNAL=0 -DUSE_SSL -DUSE_UPNP=1 -I"/opt/local/include" -I"/opt/local/include/db48" -o bitcoind -L"/opt/local/lib" -L"/opt/local/lib/db48" obj/nogui/checkpoints.o obj/nogui/crypter.o obj/nogui/db.o obj/nogui/init.o obj/nogui/irc.o obj/nogui/keystore.o obj/nogui/main.o obj/nogui/net.o obj/nogui/protocol.o obj/nogui/bitcoinrpc.o obj/nogui/script.o obj/nogui/util.o obj/nogui/wallet.o -dead_strip -ldb_cxx-4.8 -lboost_system-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_thread-mt -lssl -lcrypto -lminiupnpc
ld: warning: ignoring file obj/nogui/checkpoints.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file obj/nogui/crypter.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file obj/nogui/db.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file obj/nogui/init.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file obj/nogui/irc.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file obj/nogui/keystore.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file obj/nogui/main.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file obj/nogui/net.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file obj/nogui/protocol.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file obj/nogui/bitcoinrpc.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file obj/nogui/script.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file obj/nogui/util.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file obj/nogui/wallet.o, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.5.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [bitcoind] Error 1