Bitcoin Unlimited MAC effort

Phraust

New Member
Update #8:

Figured out how to force homebrew to rebuild, add the following to ~/.bash_profile (which totally doesn't exist in 10.11?) and startup a new term:

export HOMEBREW_BUILD_FROM_SOURCE=1

Then I found this comment on the homebrew git, tried the script out. Looks like it's rebuilding everything, I'll just have to export in the recommended CFLAGS and try it again I guess? Will try it after it's finished.
 

solex

Moderator
Staff member
Aug 22, 2015
1,558
4,693
@Phraust
Your mac-fu efforts are looking good!

The dmg installs fine although the splash screen still has "Bitcoin Core" and the Bitcoin Unlimited icon has a white no symbol (white circle + diagonal).
Installed OK, "bitcoin-qt.app" is the executable. But, won't open as it wants 10.10.11 not my 10.10.3

Not sure if an install for public use should support all 10.10.x, or maybe I should just upgrade to try.

Anyway, this is progress. Your effort is really appreciated as the BU node count is over 110 and there must be a number of mac users waiting for the dmg to be available.
 
  • Like
Reactions: 79b79aa8

Phraust

New Member
@solex

Everything is still rebuilding through homebrew (taking forever, haha), but I think if I can get everything rebuilt again (after this is done, so maybe tomorrow morning?) using the appropriate CFLAGS, it'll have a decent chance at working. Then I'll try to mess around with the macdeploy tool to get everything labelled & named correctly.

It's funny, Ive been meaning for years to figure all this out, not just with bitcoin but for the alts I messed with in the past. It'll be nice to finally cross it off my list. ;)
 

Phraust

New Member
Update #9:

Looks like there is some kinda trouble with compiling qt5 from scratch, so it failed. Looks like I can goof around with pyqt and sip versions and it's supposed to fix it. I'm trying that now, but it's literally been recompiling everything all day, and qt5 looked like a doozy. I'll be setting it up to compile overnight with the new flags, so I can hopefully try again tomorrow.
 

Phraust

New Member
Update #10:

Ended up getting too late for me to start compiling dependancies again last night, so I started first thing this morning (about 9 am), it's about 2:30p now, still going. Figured I'd set it up on the mac mini running 10.10.5, and it failed when rebuilding qt saying I needed the complete Xcode installation and not just command line tools. So that's downloading & installing now as well. I'm really surprised at the lack of documentation out there for bitcoin/OSX in general, maybe I just dunno the lingo.
 

solex

Moderator
Staff member
Aug 22, 2015
1,558
4,693
Jeez, you don't give up easily. Sounds like the learning curve for climbing the north face of the Matterhorn.
 

Phraust

New Member
Haha, yeah, kinda stubborn like that. So I just ran into the same compilation error with QT5 (something something pyqt or something something zilla, the details are fuzzy), saying something about not being able to built it in a non CLT environment or something like that. Everything else recompiled though, so I think that's a big step forward. I'll try to debug QT5 tomorrow some time.
 

Phraust

New Member
Here is the error I got:

These open issues may also help:

qscintilla2 fails to build on 10.11: sip files generating qt5 API, but only qt4 installed https://github.com/Homebrew/homebrew/issues/41464

Cannot build software that depends on Qt5 on CLT-only systems https://github.com/Homebrew/homebrew/issues/32431

I was kinda busy yesterday, didn't get any time to work on this. I'm giving it another go today.

I dunno if having my flags set as an env variable work for the back-compbatability, and from what I'm reading I might have to adjust each formula individually in brew (there isn't a way to set it across the board like macports). so I'll try rebuilding just the dependancies with the new flags, I guess.
 

Phraust

New Member
Update #11:

Looks like I somehow borked my build process, cause now it doesn't get further than:

CXX libbitcoin_server_a-pow.o

without an error:

net.cpp:438:103: error: use of undeclared identifier 'CLIENT_VERSION_XT_SUBVER'

...FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector<string>(), CLI...

^

net.cpp:1060:15: error: no matching function for call to 'upnpDiscover'

devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);

^~~~~~~~~~~~

/usr/local/include/miniupnpc/miniupnpc.h:62:1: note: candidate function not

viable: requires 7 arguments, but 6 were provided

No idea where I goofed up. made clean, retried ./autogen.sh and ./configure --with-gui=qt5, same error. More research.
 

solex

Moderator
Staff member
Aug 22, 2015
1,558
4,693
Looks like lots of developers for Mac get the types of problems you are seeing.
 

Phraust

New Member
Ugh, uninstalled everything, reinstalled it, same error. dunno what happened.

Looks related to a problem that cropped up before, something with autogen.sh according to bitcoinxt. Someone else had a similar issue on r/Bitcoin_Unlimited as well, though no fix there. It's occurring at
net.cpp:438 : use of undeclared identifier 'CLIENT_VERSION_XT_SUBVER'

Dunno what changed exactly, since it built fine before. Maybe I'll try setting "CLIENT_VERSION_XT_SUBVER" somewhere and seeing if it continues the build. Looks related to the XT fork, since I don't think that identifier was used in bitcoin core.

Looking at net.cpp:1060 upnpDiscover(), it's saying that it's expecting 7 inputs, but only getting 6 (and only 6 are defined). *shrug*
 
Last edited:

Phraust

New Member
Update #12:

Fuckin shite, I'm an idiot and it looks like I shoulda read the readme:

Bitcoin Unlimited

This is not the source for bitcoin unlimited from http://www.bitcoinunlimited.info (yet). That repository resides at https://github.com/gandrewstone/BitcoinUnlimited

Been cloning from the wrong source.... Just wiped it out and started over, building fine now. were my rebuilt dependancies good then? were my compilation flags and my env variables right? we may never know.

*shakes fists at an uncaring sky*
 
Last edited:
  • Like
Reactions: 79b79aa8 and solex

Phraust

New Member
So I've gone through and rebuilt all the listed dependancies from source using home brew:

autoconf automake berkeley-db4 libtool boost miniupnpc openssl pkg-config protobuf qt5

and I set this in my .bash_profile:

export CFLAGS='-mmacosx-version-min=10.7 -arch x86_64 -isysroot /Users/phraust/Build/MacOSX10.7.sdk'

Run into the same issue with qt5 not compiling on CLT only system (though I've got a full install of Xcode, so it's not just Command Line Tools installed).

I've installed qt5 / qt creator from qt.io and I'm trying to figure out how to build that, then I'll see if that works. My main concern is whether my CFLAGs set in the .bash_profile stuck for all the dependancies, or if they were overridden by home brew at build time. If this doesn't work, I'll probably have to go back and modify each formula in home-brew to add the appropriate CFLAGS.
 

Phraust

New Member
Update 13:

Okay, it was compiling Qt for most of the day, only to run out of drive space (I have about 15 gb free on my macbook air). Maybe I'll fire up my other mac mini and dust the cobwebs off, see if I can set that up since it's OS X 10.11.

Oh, if I delete my local copy of the blockchain that frees up about 65GB, I'll try recompiling it again.
 
Last edited: