Bible Pay

Read 6740 times

  • MIP
  • Sr. Member

    • 365


    • 47
    • February 13, 2018, 11:55:52 AM
    more
MacOS compiles - iOS version support machine
« on: May 03, 2018, 03:22:15 AM »
We had some pending topics that converged at the same point: the lack of a platform and dev license for MacOS and iOS compiles.

I sort of made the iOS version (development is practically over) with a rented VM at MacinCloud, but I had almost constant hang-ups and connection cuts. It has been a real pain.

The problem with this VM (apart the mentioned usability ones) is that you can't install any special packages or SDKs out of the "regular" ones. This invalidates the VM for permanent compile platform and also for a long-term maintenance tool for the iOS version.

Also, I could not test the phone's camera and QR scanning on the XCode simulator for obvious reasons.

As a result, I proposed Rob to purchase a second hand Mac to overcome all this limitations and start working on MacOS compiles and better iOS version maintenance.

SCOPE:

- Purchase a 2nd hand Mac with at least i5 proc and 8GB
- Install development license
- Prepare MacOS signed builds.
- Test iOS with real hardware and then launch beta version.

BUDGET

- 2nd hand Mac (770€)
- Developer license for 1 year: (99€) --> already budgeted in Mobile app proposal = 0€
- Prepare and support MacOS builds: voluntary = 0€
- Test and launch iOS app: already budgeted, 0€

After 1 year, only new Apple developer licenses renewal (99€) would be proposed.

770€ (BTC @ 7700€) = 0,1 BTC (BBP @ 37sat) = 270270 BBP

I had thought to distribute this in a year's amortization, but I would require to create a proposal each month, and actually, after all the expenses I have for my daughter's knee problem, it would be a financial effort I can't assume.

Of course any other use for this Mac that you think we can implement to support Biblepay would be welcomed.

Proposal has been added to gobernance. Kindly consider your masternode vote. If possitive:

Code: [Select]
gobject vote-many 3a89aed047f627edee22853b8a7b3b3fbb5b6298d42ff78a495c4e38c0107fff funding yes
Thank you!
« Last Edit: May 04, 2018, 08:05:04 AM by MIP »


Re: MacOS compiles - iOS version support machine
« Reply #1 on: May 04, 2018, 01:33:01 PM »
I like the plan, voted yes! :)


  • jaapgvk
  • Hero Member

    • 558


    • 31
    • September 01, 2017, 08:02:57 PM
    • Netherlands
    more
Re: MacOS compiles - iOS version support machine
« Reply #2 on: May 08, 2018, 02:36:07 AM »
Great plan, and an easy 'yes'. Thanks :)


  • sunk818
  • Global Moderator

    • 521


    • 36
    • April 24, 2018, 02:02:20 PM
    more
Re: MacOS compiles - iOS version support machine
« Reply #3 on: May 11, 2018, 11:29:40 AM »
Where does Rob live? Our work has computer sales and have off-lease business Macs for sale sometimes. I'm in California. Shipping would be expensive for a desktop... I think mac Mini is likely the least expensive way to go, or a mac desktop if you wanted something a little more powerful. macbook pro/air is okay, but they are a premium cost wise.
« Last Edit: May 11, 2018, 10:17:00 PM by LifeThruGrace »
BH6oxjLkyz3z8FYpvU3ZR7PTZ31Xt9DkXZ


  • MIP
  • Sr. Member

    • 365


    • 47
    • February 13, 2018, 11:55:52 AM
    more
Re: MacOS compiles - iOS version support machine
« Reply #4 on: May 11, 2018, 01:58:58 PM »
Where does Rob live? Our work has computer sales and have off-lease business Macs for sale sometimes. I'm in California. Shipping would be expensive for a desktop... I think mac Mini is likely the least expensive way to go, or a mac desktop if you wanted something a little more powerful. macbook pro/air is okay, but they are a premium cost wise.

compiling on freebsd macos is challenge every time.

In my case I'm from Spain. Ironically I got a good deal for a MacAir but it's coming from Los Angeles... It will take a while though.

Thanks for you offer anyway


  • MIP
  • Sr. Member

    • 365


    • 47
    • February 13, 2018, 11:55:52 AM
    more
Re: MacOS compiles - iOS version support machine
« Reply #5 on: June 04, 2018, 03:59:52 AM »
Ok a quick summary on the MacOS compile efforts

I could compile with the latest QT version, adding c++11 flags to the compiler and some tweaks on Txmempool source because of some obscure C++ quircks in boost 1.66+. The GUI-less daemon works wonderfully, but the biblepay-qt GUI crashes.

When debugging I saw it crashed at kjv.cpp when creating this huge b[31102] array with Bible's verses, at index 1223 .
I tried to change the static allocation with a unordered_map structure, hoping that C++ magic would come to the rescue. Little progress, it just crashed at verse 9010.

I found this guy from Norway at Discord that told me he had compiled and run the QT version without issues. The funny thing is that he had made exactly the same tweaks and flags I made, and he has the same OS version. The only difference is that he's using the GNU toolchain and I have the XCode toolchain, which could also be the same thing by just using a symlink.

I suspect of some compiling options so now I'm reviewing and comparing all the environment, versions, etc. one by one which looks like a lot of pain ahead :-D

EDIT: I saw that in MacOS the default stack size is 8MB. That would explain something. After increasing the stack size it still crashes, but it processes more verses. In fact if I comment the last 14000 verses application loads fine (but it's unable to load chain because of the failing PoW checks...). I'll keep on researching.
« Last Edit: June 04, 2018, 09:54:04 AM by MIP »


  • sunk818
  • Global Moderator

    • 521


    • 36
    • April 24, 2018, 02:02:20 PM
    more
Re: MacOS compiles - iOS version support machine
« Reply #6 on: June 04, 2018, 11:57:09 AM »
And using GNU toolchain gives you better results?

I hate compiling on macOS. I'm almost going bald now pulling my hair out. ;)
BH6oxjLkyz3z8FYpvU3ZR7PTZ31Xt9DkXZ


  • MIP
  • Sr. Member

    • 365


    • 47
    • February 13, 2018, 11:55:52 AM
    more
Re: MacOS compiles - iOS version support machine
« Reply #7 on: June 05, 2018, 02:29:54 AM »
And using GNU toolchain gives you better results?

I hate compiling on macOS. I'm almost going bald now pulling my hair out. ;)

I think they are both the same, it's just that apple included some copy with symlinks into their XCode bundle.

I would try to increase the stack size in the linker, as it seems that QT libraries put some pressure on the stack (proof is that biblepayd loads perfectly but biblepay-qt fails when loading the same 31102 verses.)


  • MIP
  • Sr. Member

    • 365


    • 47
    • February 13, 2018, 11:55:52 AM
    more
Re: MacOS compiles - iOS version support machine
« Reply #8 on: June 05, 2018, 01:57:58 PM »
Ok so this was it:

It seems that, unlike Linux, MacOS has a predefined stack size, which is 8MB for main thread, and a pityful 512KB for the other threads.

This is the reason why biblepayd loaded the verses fine, because it lives in main thread.
But QT version launches it's own thread for windowing and when it tries to load the verses, it hits the 512KB limit for the stack.

Solution: I had to patch qthread_unix.cpp from QT 5.11.0 to increase the stack size of threads, compile QT all over again (317 minutes lol) and then... it worked!!!

So we have part 1 finished.

Now I'l begin part 2, creating and signing DMG file for distribution.


  • MIP
  • Sr. Member

    • 365


    • 47
    • February 13, 2018, 11:55:52 AM
    more
Re: MacOS compiles - iOS version support machine
« Reply #9 on: June 08, 2018, 04:42:13 AM »
Finally part 2 was also solved.

I had to create and sign the executable into a MacOS bundle which was sort of complicated stuff (docs only refer to XCode IDE projects) and there is little or none info on manual bundling.

So we will have the MacOS wallet DMG uploaded to biblepay.org shortly.


  • noxpost
  • Jr. Member

    • 19


    • 6
    • April 10, 2018, 07:24:15 AM
    more
Re: MacOS compiles - iOS version support machine
« Reply #10 on: June 10, 2018, 02:44:38 PM »
Finally part 2 was also solved.

I had to create and sign the executable into a MacOS bundle which was sort of complicated stuff (docs only refer to XCode IDE projects) and there is little or none info on manual bundling.

So we will have the MacOS wallet DMG uploaded to biblepay.org shortly.

Congrats MIP! That's awesome.


  • sunk818
  • Global Moderator

    • 521


    • 36
    • April 24, 2018, 02:02:20 PM
    more
Re: MacOS compiles - iOS version support machine
« Reply #11 on: June 11, 2018, 09:21:33 AM »
a macOS wallet will be interesting to see if PoW difficulty goes up because of new potential computers coming on to the network.
BH6oxjLkyz3z8FYpvU3ZR7PTZ31Xt9DkXZ