Reproducible Builds of Libcoin (Work in Progress)

Post Reply
biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Reproducible Builds of Libcoin (Work in Progress)

Post by biolizard89 »

I was able to build libcoin using Gitian last night. So far I've only built it for Linux, but this is definitely good news. The resulting binary appears to run fine on my Fedora machine. I'll be posting the descriptors soon. Thanks to indolering and sdgathman for keeping me company on the IRC while I worked on it. :)

In the meantime, here are Gitian descriptors for SQLite, which is the main dependency of libcoin which isn't part of Bitcoin: https://github.com/JeremyRand/sqlite-gitian

Anyone want to compare SQLite hashes? https://github.com/JeremyRand/sqlite-gitian/issues/1
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

jonasbits
Posts: 47
Joined: Tue Mar 04, 2014 4:47 pm
os: linux

Re: Reproducible Builds of Libcoin (Work in Progress)

Post by jonasbits »

I have started work on getting everything needed to build using Gitian for OSX. It is mostly clear what is needed, but the last piece of the puzzle is more difficult:

contrib/gitian-descriptors/libcoin-osx.yml

the first step will be: create custom sqlite-osx.yml and build using Gitian.
My Namecoin address: NC3HGHk527xuWZBgMdGJ2GxjpRSw8D4oA6

biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: Reproducible Builds of Libcoin (Work in Progress)

Post by biolizard89 »

Since I think I neglected to post in this thread, here is the Gitian descriptor for libcoin on Linux: https://github.com/JeremyRand/libcoin/t ... escriptors
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

jonasbits
Posts: 47
Joined: Tue Mar 04, 2014 4:47 pm
os: linux

Re: Reproducible Builds of Libcoin (Work in Progress)

Post by jonasbits »

You don't need OSX to download and extract the needed Apple SDK files at https://developer.apple.com/downloads/d ... 16281a.dmg

Its a little complicated, but it can be done, follow these instructions:
http://linuxforums.org.uk/linux-tips-tr ... 2/#msg5792

In short, this is how you do it:
uncompress with "dmg2img xcode.dmg"
#find offset
#hexdump -C xcode.img | grep --max-count=1 '48 2b 00 04'
#convert offset from hex to decimal
offset-1024 is 32768 (when i did this)
set offset minus 1024 "sudo losetup -o <offset-1024> /dev/loop0 xcode.img"
open image "mount -t hfsplus /dev/loop0 <directory>"

Then create the MacOSX10.7.sdk.tar.gz file as described in:
https://github.com/bitcoin/bitcoin/blob ... process.md

tar -C Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.7.sdk.tar.gz MacOSX10.7.sdk

and remember to release /dev/loop0 after you umount
losetup --detach /dev/loop0
^LOSETUP in lowercase
My Namecoin address: NC3HGHk527xuWZBgMdGJ2GxjpRSw8D4oA6

Post Reply