Author

Topic: [dev help] OS X quarkcoin blake.c compile problem (Read 1122 times)

full member
Activity: 218
Merit: 115
Did you ever sort this out? I'm having similar issues building Offerings in daemon form, they are Quark based. Any help would be greatly appreciated!
full member
Activity: 168
Merit: 100
I figured it out and fixed the error in blake.c - looks like same error exists in bmw.c etc.

Don't have time at moment to fix that, will tonight though, so hopefully tonight I'll have a buildable quark coin daemon for OS X - then test the commands and prove it at least mines by mining a coin (could take more than a day), then I'll do a git pull request so other OS X users who don't want the gui can build the daemon.

But I'm confident at this point I have it p0wn3d.
full member
Activity: 168
Merit: 100
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:

Code:
--- 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.

Code:
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:

Code:
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
Jump to: