I’ve been learning how to compile Peercoin/Peerunity for Mac OS X and I have bumped into few walls and I will need some help.
So far I have learned that you need 1) Working Mac OS X install, 2) Xcode (compiler and OS X SDK).
As I do not use Apple computer I can not run OS X as native but have to virtualize it. I have found a somewhat working Mac OS X Yosemite image for KVM/Virtualbox on torrents, but Xcode demanded latest “El Capitan” to install and this image did not let me update.
What I am looking for now is that someone (a Mac user obviously) provides me with “El Capitan” image so I can get back on this.
It is a Mac OS X for hire VM in cloud, pays per hour. However you dont get root access unless you pay extra, without root it is quite cheap (1$ per hour).
I would leave this as aux solution, as the first one is better for long term.
Turns out, hours and hours later further in the instructions that Qt 4.8.x versions are incompatible with the latest El Capitan. The only compatible ones are in the range Qt5.x
the silver lining is that i finally got to upgrade my os but the bad news is I cant compile qt.
Turns out, hours and hours later further in the instructions that Qt 4.8.x versions are incompatible with the latest El Capitan. The only compatible ones are in the range Qt5.x
the silver lining is that i finally got to upgrade my os but the bad news is I cant compile qt.[/quote]
Than a port to QT5 is needed. Not a bad thing, we finally get to live in 2016
Can you do what I have requested? Provide an image for future use?
Last year I started working a toolchain to cross-compile to OSX from linux. I managed to get the daemon ported over, and only just started on getting Qt to play right with the toolchain.
The project got scrapped sometime last year during frist semesters classes when I couldn’t get a test machine to make sure the binaries were working right. I think I have the files backed up a flash drive around here somewhere.
Anyone, I based a lot of my work from this project: https://github.com/tpoechtrager/osxcross. The majority of the changes I made were to properly sign the binary with my Apple Developer cert, and to add proper dmg support so the entire building process happened in one go. I did have issues with getting the process to work well with gitian.
Good luck. Message me if you have any specific questions or problems. I have a few exams comming up this week, but if you need any help, I can see about making a write-up for you this weekend.
Turns out, hours and hours later further in the instructions that Qt 4.8.x versions are incompatible with the latest El Capitan. The only compatible ones are in the range Qt5.x
the silver lining is that i finally got to upgrade my os but the bad news is I cant compile qt.[/quote]
Than a port to QT5 is needed. Not a bad thing, we finally get to live in 2016
Can you do what I have requested? Provide an image for future use?[/quote]
I can port the client to Qt5, it’s quite simple. I can create a ppcoin-qt5 branch once I get home from business trip if that helps.
I’ve seen osxcross project, but it felt way simpler to simply install Mac OS X and start from there. What were your modifications exactly? Do you have a git repo?
[hr]
Status report:
So, I have successfully installed OS X, Xcode, macports and all dependencies that are required for Peercoin clients (both QT and daemon). I must notice that makefile for os x looks hackish and recommends ancient defaults.
However I have bumped into same errors with compiling it over and over again, and now I think that it is about boost - it is compiled with non compatible libraries.
Now I will try to use boost from homebrew project.
Keep you posted.
I’ve been using the Qt5 client for a few days now, seems to work fine.
You might try to compile it yourself.
After installing the missing dependencies (compiler, Qt5, miniupnpc, boost) run the following commands in the source folder to compile:
qmake
make
However I never used OSX, so it might be a bit more involved. The internet might help you out if you search for “compiling Qt5 app on OSX”.
I have to say that I am hitting the wall here, I doubt I will be able to do it before protocol switches to 0.5. It is taking too much of my time, and while hacking on this I am not productive on other stuff. Maybe someone will get lucky with different OS X version, I have tried with “El Capitan”.
So far I have completed following:
[ul][li]Install and prepare build environment[/li]
[li]Installed dependencies (Brew worked better than macports)[/li]
[li]Edited makefile.osx to comply with dependency paths that brew installs to[/li]
[li]Used miniupnpc 1.9 patch to enable compiling against recent library versions[/li]
[li]Tried compiling with clang, which failed almost imidiatlely[/li]
[li]Tried compiling with GCC (Installed from Brew), which failed as dependencies are compiled with clang and different C library[/li]
[li]Compiled boost library with GCC to try to fix the above but it has failed again[/li]
[li]Ran out of the ideas[/li][/ul]
It is best for community to put up a bounty and get this solved while there is still time.
The bounty should also request for fixing this problem permanently with some sort of build system that would produce valid OS X package (.dmg).
What we are doing so far for OS X is a hack, statically compiling binaries and compressing them into packages without any guarantee of quality and security. This cant be a standard way to provide OS X packages - we are doing something wrong.
This should really be done properly, with package signing and all, like I did with Linux packages recently so we present this community to newcomers as a group of people who know what they are doing and doing it professionally.
Is there a chance to get Peercoin/Peerunity to official Mac OS X store?
I never compiled anything on OSX, but some guy packaged an OSX build of http://finfoil.io for me and left some build & package scripts in my git repo.
The project uses CMake instead of qmake or autotools.
The compiler used was Clang as the Qt binaries are built for Clang and the libs were dynamically linked but included in the package, for easy installation.
Unfortunately this guy has no time to make a new build anymore (some changes need to be done to the script to include some extra libs, …). But I will probably see him again in a month or two, so he might give some pointers.