Post
Topic
Board Wallet software
Re: [ANNOUNCE] picocoin and libccoin -- C-based bitcoin library and client
by
d_oilen
on 05/04/2014, 11:41:34 UTC
Hi,
i pulled down and tried to compile picocoin on my system.
Linux XXXXXXXXXXX 2.6.32-431.5.1.el6.i686 #1 SMP Tue Feb 11 21:56:33 UTC 2014 i686 i686 i386 GNU/Linux ( centos 6.5 final)
now with the latest and greatest i found the following small mistakes:

1. in brd.c you need to include socket.h and netinet/in.h in order to successfuly compile.
2. in blkscan.c and most probably in many other places you create a dependency on glib 2.28 to 2.30. if i might suggest:
 in blkscan.c "print_txout(bool show_from, unsigned int i, struct bp_txout *txout)" you can do the following:
 
Code:
                #if GLIB_CHECK_VERSION (2, 28, 0)
   g_list_free_full(addrs.pub, g_buffer_free);
   g_list_free_full(addrs.pubhash, g_buffer_free);
#else
  //addrs.pub cleanup
  g_list_foreach (addrs.pub, (GFunc) g_buffer_free, NULL);
  g_list_free (addrs.pub);
  //addrs.pubhash cleanup
  g_list_foreach (addrs.pubhash, (GFunc) g_buffer_free, NULL);
  g_list_free (addrs.pubhash);
#endif

3. similar as above in txmod.c "mutate_outputs(void)" you can:

Code:
if (!tx.vout){
#if GLIB_CHECK_VERSION (2, 30, 0)
tx.vout = g_ptr_array_new_full(8, g_bp_txout_free);
#else
tx.vout = g_ptr_array_sized_new (8);
g_ptr_array_set_free_func (tx.vout, (GDestroyNotify)g_bp_txout_free);
#endif
}


as a side note, be aware that on centos systems the stock libevent is not working ( it is at version is 1.4)  and you have to install libevent 2.x from source

regards,
JD