Bitcoin Forum

Other => Beginners & Help => Topic started by: rgm on August 09, 2011, 06:58:07 PM



Title: Compiling cgminer 1.5.3 on Mac OS X 64-bit: failure in ASM
Post by: rgm on August 09, 2011, 06:58:07 PM
I've tried both compiling from the git repo source and using the 1.5.3 tarball but am unable to get it going due to this failure:

Code:
gcc -DHAS_YASM -g -O2 -pthread  -o cgminer cgminer-main.o cgminer-util.o cgminer-ocl.o cgminer-findnonce.o cgminer-sha256_generic.o cgminer-sha256_4way.o cgminer-sha256_via.o cgminer-sha256_cryptopp.o cgminer-sha256_sse2_amd64.o cgminer-sha256_sse4_amd64.o -L/opt/local/lib -lcurl   compat/jansson/libjansson.a -lpthread -framework OpenCL -lncurses  lib/libgnu.a ccan/libccan.a x86_64/libx8664.a 
ld: warning: in x86_64/libx8664.a, file was built for unsupported file format which is not the architecture being linked (x86_64)
Undefined symbols:
  "_CalcSha256_x64_sse4", referenced from:
      _scanhash_sse4_64 in cgminer-sha256_sse4_amd64.o
      _scanhash_sse4_64 in cgminer-sha256_sse4_amd64.o
  "_CalcSha256_x64", referenced from:
      _scanhash_sse2_64 in cgminer-sha256_sse2_amd64.o
      _scanhash_sse2_64 in cgminer-sha256_sse2_amd64.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [cgminer] Error 1

This is a Mac running Snow Leopard booted in 64-bit mode.  I found someone seems to have worked around it by using yasm -f macho64 and a patched assembly sha256 implementation from here:
https://github.com/jgarzik/cpuminer/issues/31

But I couldn't get this to work for me.  Has anyone been able to compile cgminer on 64-bit Mac OS X systems?  If you have a 2009 mac with relatively up-to-date software, you can enable 64-bit mode by typing:
Code:
sudo systemsetup -setkernelbootarchitecture x86_64
then rebooting.