Pages:
Author

Topic: Building Armory on OSX (Read 32312 times)

legendary
Activity: 1974
Merit: 1077
^ Will code for Bitcoins
November 27, 2013, 04:58:36 PM
Once again sorry for the off-topic, but just to report that testing branch compiled OK. Hope these changes will soon be included in master.
legendary
Activity: 1974
Merit: 1077
^ Will code for Bitcoins
November 27, 2013, 12:27:26 PM
Need some help compiling Armory on Ubuntu 13.10. It exits with:
Code:
g++: error: /usr/lib64/libpython2.7.so.1.0: No such file or directory
make[1]: *** [swig] Error 1
make[1]: Leaving directory `/home/itod/BitcoinArmory/cppForSwig'
make: *** [all] Error 2
Sorry if this was answered somewhere, but having browsed through this thread haven't found an answer. Changing two lines in Make suggested in this post
https://bitcointalksearch.org/topic/m.1463846
didn't help.

Please suggest a fix. Thanks.

Agreed this is the wrong thread, but I'll respond quickly.  Did you follow the instructions on the Building Armory from Source webpage?  I just tried it on a stock 13.10 install and it worked.

Yes, followed those instructions. Just found your advice to try the testing branch instead of master, will try latter today and let you know what happened.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
November 27, 2013, 11:59:23 AM
Need some help compiling Armory on Ubuntu 13.10. It exits with:
Code:
g++: error: /usr/lib64/libpython2.7.so.1.0: No such file or directory
make[1]: *** [swig] Error 1
make[1]: Leaving directory `/home/itod/BitcoinArmory/cppForSwig'
make: *** [all] Error 2
Sorry if this was answered somewhere, but having browsed through this thread haven't found an answer. Changing two lines in Make suggested in this post
https://bitcointalksearch.org/topic/m.1463846
didn't help.

Please suggest a fix. Thanks.

Agreed this is the wrong thread, but I'll respond quickly.  Did you follow the instructions on the Building Armory from Source webpage?  I just tried it on a stock 13.10 install and it worked.
legendary
Activity: 1974
Merit: 1077
^ Will code for Bitcoins
November 27, 2013, 09:35:27 AM
Need some help compiling Armory on Ubuntu 13.10. It exits with:

You might want to repost this in an Ubuntu thread (or create one in the Armory sub-forum).  Since this is a thread about compiling on Mac OS X the Ubuntu or Linux experts are less likely to see it.

Oh, thanks, came here by Google search and haven't noticed the title. Will do.
hero member
Activity: 547
Merit: 500
Decor in numeris
November 27, 2013, 03:27:55 AM
Need some help compiling Armory on Ubuntu 13.10. It exits with:

You might want to repost this in an Ubuntu thread (or create one in the Armory sub-forum).  Since this is a thread about compiling on Mac OS X the Ubuntu or Linux experts are less likely to see it.
legendary
Activity: 1974
Merit: 1077
^ Will code for Bitcoins
November 26, 2013, 04:40:59 PM
Need some help compiling Armory on Ubuntu 13.10. It exits with:
Code:
g++: error: /usr/lib64/libpython2.7.so.1.0: No such file or directory
make[1]: *** [swig] Error 1
make[1]: Leaving directory `/home/itod/BitcoinArmory/cppForSwig'
make: *** [all] Error 2
Sorry if this was answered somewhere, but having browsed through this thread haven't found an answer. Changing two lines in Make suggested in this post
https://bitcointalksearch.org/topic/m.1463846
didn't help.

Please suggest a fix. Thanks.
hero member
Activity: 560
Merit: 500
I am the one who knocks
April 02, 2013, 02:12:35 PM
I would say that there would be two places: /Applications and ~/Applications

However as you know there is no official bitcoind for OSX.  Red Emerald's brew recipe creates a symlink at /usr/local/bin/bitcoind

You could also search $PATH for bitcoind
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
March 20, 2013, 10:05:05 AM
The main problem is that no-one can be sure where the user installs Bitcoin-Qt.  Sure, it is most likely to go in /Applications/Bitcoin-Qt.app, but a user may choose to install it anywhere ($HOME/Applications or $HOME/Desktop would be likely candidates).  This makes placing a command-line executable inside the .app directory a bit awkward.

Bah!  This is python!  Python can do anything and everything.  It is very fast to search a variety of locations for the executable.  I just need a few of the most common ones and os.walk will take me through the directory trees looking for files that match my criteria.  I can set it to only go 2-3 levels deep and/or stop after 10k files searched, to avoid getting lost. 

And like Erebus said, if that doesn't work...



hero member
Activity: 560
Merit: 500
I am the one who knocks
March 20, 2013, 09:59:10 AM
You could also just ask the user if it is in a non standard location.  If the user has put it somewhere else then they will know where.
hero member
Activity: 547
Merit: 500
Decor in numeris
March 20, 2013, 07:11:59 AM
The main problem is that no-one can be sure where the user installs Bitcoin-Qt.  Sure, it is most likely to go in /Applications/Bitcoin-Qt.app, but a user may choose to install it anywhere ($HOME/Applications or $HOME/Desktop would be likely candidates).  This makes placing a command-line executable inside the .app directory a bit awkward.

There is a "correct" way to do it, but I doubt you can sell it to Gavin Andresen:  Several apps that have command-line tools (The Aquamacs editor and Xcode come to mind) have a menu point called "install command-line tools" that then copies or links the tools into /usr/bin.  But not only does the app need to have this menu point, it should also have code detecting when it has been updated so it can pop up a dialog requesting permission to upgrade the command line tools.  Clearly some work to implement.

Another "correct" way is not to distribute Bitcoin-Qt as a simple app that is dragged into the application folder, but to use an installer. Again extra work, and I have no clue how to do that.

A simple possibility might be to include bitcoind in an "Extras" folder in the installation disk image, so interested parties (Armory users) can open that folder, where they find bitcoind and a link to /usr/bin so they can drag it over.  I suppose this would work.

Finally, Armory could have a heuristic for locating Bitcoin-Qt and then find bitcoind in a subfolder there.

legendary
Activity: 1428
Merit: 1093
Core Armory Developer
March 19, 2013, 06:48:48 PM
Quote
if you find a simple fix for the makefile.osx so I can make -f makefile.osx RELEASE=1  … and end up with a bitcoind that runs on everybody's machines, then I'd be happy to do that
I guess it would be RELEASE=1 STATIC=1 ....
I'm compiling RELEASE=1 STATIC=1 on my build machine now, I'll upload the binary for you to play with. I don't remember what the issues were last time...
http://skypaint.com/bitcoin/bitcoind.osx
[/font]

It sounds like there is not a deterministic way to build on OSX, so it won't require messing with gitian.   Is it possible to compile and include extra executables in the .app?  Will I be able to reference it by a direct path name?  (i.e.  /Users/LibraryApplications/whatever/bitcoind)

Given the high price of BTC these days, it looks like I only need to offer, say, 3 BTC as an incentive for this one Smiley  Again, it's something I have no experience with, but may be "easy" (easier) for others.
hero member
Activity: 742
Merit: 500
March 17, 2013, 01:23:24 PM
Ill look into it. I've been content with my brew formula, but it would be nice if it could be bundled with bitcoin-qt again.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
March 16, 2013, 12:51:04 PM
This is mostly directed at Red Emerald since he has compiled this many times before, but of course anyone can answer:

For the auto-bitcoind-management, I need OSX versions of bitcoind to be compiled and distributed with the download from www.bitcoin.org.  Gavin said that he doesn't do this because there's no clear path to do it, and there's no demand -- except from me.  He would probably be persuaded if I gave him a working build script for it that does exactly what he wants, but hell if I know how to do that.

He says it's not straightforward, because bitcoind is a terminal app, which means putting it in a .app package is not good, and would have to be distributed as a separate package which is extra work for him.  He would create a standalone bitcoind, but it would require all the dependencies to be static-compiled in, which he also says will be a lot of work.  If that was done, I don't know if it could be bundled along with the Bitcoin-Qt .app file.  If we could have a standalone-static-compile-everything bitcoind that would fit into his existing makefile and simply bundle it along with the Bitcoin-Qt .app, that would be absolutely ideal.  I bet he'd be willing to do it -- perhaps 30 minutes of reviewing the makefile, and that's it.  This assumes that it works, and every failed attempt is more "favors" spent ... I'm sure Gavin wouldn't mind spending a few minutes supporting this, but not more than a few minutes...

Any ideas for how to go about this?  How about a static-compiled version of it that doesn't have any dependencies?  I could float a separate .app package by him, but I doubt he wants to add that to his build/release process which is probably annoyingly long already (I know from experience).

legendary
Activity: 1428
Merit: 1093
Core Armory Developer
March 09, 2013, 10:01:16 PM
FYI --  I just started a bounty thread for Armory on OSX.

If you are on this thread and want to see someone finally put together the OSX package for it, please donate!

https://bitcointalksearch.org/topic/the-official-armory-for-osx-bounty-thread-claimed-25-btc-151313
hero member
Activity: 742
Merit: 500
March 03, 2013, 03:58:19 PM
The lack of a bitcoind in  MacOS is quite unfortunate (and a bit mysterious).  Installing it is not simple (at least not if you are an Armory install script).  I have never bothered, and is using Bitcoin-Qt with Armory.

I would suggest you do the same.  Bitcoin-Qt can take arguments that enable RPC, I saw that somewhere but cannot find it now (someting ugly like "open /Applications/Bitcoin-Qt.app --args args-to-bitcoinqt").  There is not way to start it hidden, but you can hide it after is has come up with this ugly command
Code:
osascript -e 'tell application "System Events" to set visible of application process "Bitcoin-Qt" to false'
I found it here: https://discussions.apple.com/thread/1476240?start=0&tstart=0

Trying to make a programming language to resemble a natural language results in something that is neither natural for programmers nor for nonprogrammers.  Applescript looks awful.

It will not hide the splash screen of Bitcoin-Qt, but it will hide the app as soon as the splash screen goes away, even if executed while the splash screen is there (just tried it out of curiosity).

I guess that the best alternative for Mac users is to use Bitcoin-Qt in this way.  The icon will still appear in the dock, however.

At one point, bitcoind came with Bitcoin.app, but not anymore for some reason I don't know.  That's one of the reasons I made my brew formula.  `brew install bitcoind` is pretty easy.  I'm going to make the formula also create a plist for launchd so you can configure bitcoind to start on login if you want by just making a symlink.

Is starting armory on login something that would be desired? Brew makes it really easy and totally optional.

If you have armory searching for bitcoind on the PATH for linux (Please don't use hard coded paths), you might as well have the same check happen for osx. If they have used my brew formula or compiled it themselves, it will just work. If that search fails, check for /Applications/Bitcoin-Qt.app and launch it with whatever crazy flags make it hidden.  Then if that fails, just tell the user "Armory couldn't find bitcoind or bitcoin-qt installed on your system." and then have system specific links if possible and a link to bitcoin.org if not.

I think that having the user install bitcoind/qt and armory smart enough to find it is plenty fine and is definitely going to be exponentially easier.  There are far too many possible system setups.  Any code you come up with for trying to install packages on all the different systems is going to be so complicated that I don't think its worth it. Just ubuntu alone has a couple ways (self-compiled, PPA, downloaded from bitcoin.org)
hero member
Activity: 547
Merit: 500
Decor in numeris
March 03, 2013, 08:23:41 AM
The lack of a bitcoind in  MacOS is quite unfortunate (and a bit mysterious).  Installing it is not simple (at least not if you are an Armory install script).  I have never bothered, and is using Bitcoin-Qt with Armory.

I would suggest you do the same.  Bitcoin-Qt can take arguments that enable RPC, I saw that somewhere but cannot find it now (someting ugly like "open /Applications/Bitcoin-Qt.app --args args-to-bitcoinqt").  There is not way to start it hidden, but you can hide it after is has come up with this ugly command
Code:
osascript -e 'tell application "System Events" to set visible of application process "Bitcoin-Qt" to false'
I found it here: https://discussions.apple.com/thread/1476240?start=0&tstart=0

Trying to make a programming language to resemble a natural language results in something that is neither natural for programmers nor for nonprogrammers.  Applescript looks awful.

It will not hide the splash screen of Bitcoin-Qt, but it will hide the app as soon as the splash screen goes away, even if executed while the splash screen is there (just tried it out of curiosity).

I guess that the best alternative for Mac users is to use Bitcoin-Qt in this way.  The icon will still appear in the dock, however.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
March 02, 2013, 11:18:00 PM
I know that Red Emerald has a homebrew that builds a bitcoind for macs https://github.com/WyseNynja/homebrew-bitcoin/blob/master/bitcoind.rb so you might want to talk to him about that.

You can use RPC with bitcoin-qt on OSX, but you have of course enable it thru the bitcoin.conf file first. You can't pass an argument thru the command line for it, last time I checked it was deprecated I may be wrong on that.

I got the RPC thing figured out -- I securely create it myself if it's not there, before starting bitcoind (using a 128-bit random password).

If the user doesn't have bitcoind available, I want to have a button that will basically get it for them, along with links in case they want to get it themself.  In Windows, this means downloading the .exe into a temp directory and then executing it.  In linux, this may mean setting up the Ubuntu PPA, or downloading and unpacking it for them.  It sounds like there is not really an equivalent option in OSX...

Also, I don't want to bundle bitcoind with Armory, because I don't want to be responsible for quickly releasing new versions of Armory when vulnerabilities are found in Bitcoin-Qt requiring an update.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
March 02, 2013, 10:58:58 PM
One more thing:  you mentioned "/Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt".  Does the default installation include bitcoind?

There isn't an official bitcoind for Mac OSX, there is only bitcoin-qt.

Crap!  So then... should I just make "Manage Bitcoin-Qt/bitcoind myself" the only option for OSX?  I think loading Bitcoin-Qt is a problem, because Armory will expect to manage it, but then the user may close it and Armory won't know what to do.  The number of permutations of things I have to handle to implement this is already annoying, I don't want to add that to it.

I assume you can still use RPC with Bitcoin-Qt on OSX?  If not, then it's not even an option.
legendary
Activity: 1498
Merit: 1000
March 02, 2013, 10:32:37 PM
One more thing:  you mentioned "/Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt".  Does the default installation include bitcoind?

There isn't an official bitcoind for Mac OSX, there is only bitcoin-qt.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
March 02, 2013, 10:30:33 PM
I don't understand how running a bitcoind under armory will save ram usage?


It won't.  It's an unrelated task.  But it's one that I need to do to make Armory a little more accessible, and quite a bit less error-prone.  No more asking the user to press buttons or start applications at the right times, with wacky behavior if they get it wrong.  It will just "Do the Right Thing" and Armory will look like a single program.

One more thing:  you mentioned "/Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt".  Does the default installation include bitcoind?

Thanks for the info, that's exactly what I was looking for!  
Pages:
Jump to: