Trying to build quarkcoin headless daemon in OS X
OS X 10.9.4
xcode 5.1.1
build dependencies installed via MacPorts
It appears there are some issues resulting from OS X native build tools being more pedantic than GNU build tools.
I’m not a c++ guy but a lot of the style actually doesn’t look that different from php. But anyway… I need some help.
I already figured out the following fix:
--- blake.c.orig 2014-07-18 15:06:24.000000000 -0700
+++ blake.c 2014-07-18 17:26:55.000000000 -0700
@@ -883,7 +883,7 @@
sph_enc32be_aligned(u.buf + 60, tl);
blake32(sc, u.buf, 64);
}
- out = dst;
+ out = (unsigned char *)dst;
for (k = 0; k < out_size_w32; k ++)
sph_enc32be(out + (k << 2), sc->H[k]);
}
@@ -988,7 +988,7 @@
sph_enc64be_aligned(u.buf + 120, tl);
blake64(sc, u.buf, 128);
}
- out = dst;
+ out = (unsigned char *)dst;
for (k = 0; k < out_size_w64; k ++)
sph_enc64be(out + (k << 3), sc->H[k]);
}
However I am still getting a different type of build error I need help with.
blake.c:1002:2: error: no matching function for call to 'blake32_init'
blake32_init(cc, IV224, salt_zero_small);
^~~~~~~~~~~~
blake.c:791:1: note: candidate function not viable: cannot convert argument of incomplete type 'void *' to 'sph_blake_small_context *'
blake32_init(sph_blake_small_context *sc,
That type of error is repeated a dozen times but with different functions.
Here is what blake32_init looks like - which happened to be where line 791 is, I suspect that’s the real error:
static void
blake32_init(sph_blake_small_context *sc,
const sph_u32 *iv, const sph_u32 *salt)
{
memcpy(sc->H, iv, 8 * sizeof(sph_u32));
memcpy(sc->S, salt, 4 * sizeof(sph_u32));
sc->T0 = sc->T1 = 0;
sc->ptr = 0;
}
Can anyone suggest how I need to fix that? I suspect it is something similar to first patch where the code just isn’t explicit for OS X but…
Thanks