doublethinkco / cpp-ethereum-cross

Scripts for cross-building cpp-ethereum (C++ Ethereum client)
http://doublethink.co/
Apache License 2.0
27 stars 11 forks source link

Support iOS #36

Open bobsummerwill opened 8 years ago

yep commented 8 years ago

A first step towards compilation on iOS can be found in the ios branch over here: https://github.com/yep/cpp-ethereum-cross

Start compilation with ./main.sh armv7 xcode

bobsummerwill commented 8 years ago

Great! If you would like to make a PR for those changes, I would be delighted to pull it.

Quick note on the author tag. I just stripped those because they are something which Anthony Cros did and which we didn't really talk through at the time. I don't think that per-file author tags are at all useful. See https://github.com/doublethinkco/cpp-ethereum-cross/commit/a0c9df0b725cf0e9c9f0271262c8e16920e4d697

So please could you NOT add an author line in your edit? The copyright line is different, though, and adding yourself in is fine, of course.

See also https://bobsummerwill.com/2016/07/12/ethereum-everywhere/ and https://bobsummerwill.com/2016/07/12/c-re-licensing-plan/ which I am working through for cpp-ethereum right now.

We're already using Apache 2.0 for cpp-ethereum-cross (which is "my thing" unrelated to my work at the Ethereum Foundation), so there is nothing TODO there, but be aware that I am likely going to want to work through similar paperwork for cpp-ethereum-cross - which would just be a simple doc declaring that the contributions came from the contributor. I would want to do that because I think that cpp-ethereum-cross is likely to be donated to a larger project at some stage soon.

Just want to check that you are cool with that coming your way if you contribute here? :-)

bobsummerwill commented 8 years ago

Will be something just like this: https://drive.google.com/open?id=1C5LEvZ5CrmxuZdBew2ChRUk5NK72Lp1q1wiZaG9ujko

yep commented 8 years ago

Yes, I'm fine with using the apache license and signing the individual contributor license agreement.

bobsummerwill commented 8 years ago

Great - so yes, please free to create a PR for this iOS support, and we can get into a pattern of you doing some chunk of work, me reviewing/sucking in, and round we go.

No doubt we will have working iOS binaries in no time.

I can also looking in what @karalabe did for his iOS cross-builds, and maybe I can mimic that here too, so that I can have my TravisCI runs producing iOS binaries too (even if they are slightly crappy ones).

bobsummerwill commented 8 years ago

There are standard APT packages for Android cross-compilers just like the ARM cross-compilers which I have here already, so I think that adding Android binaries here too will be easy.

https://github.com/doublethinkco/cpp-ethereum-cross/issues/35

That has also just been sitting on my backlog forever, un-actioned because of other priorities.

bobsummerwill commented 8 years ago

Aside - I was just cleaning up what I thought was old and unused content in the Releases of this repos and deleted "ExternalDependencies".

Looks like the scripts DO actually reference that location, for the Boost ZIP:

https://github.com/doublethinkco/cpp-ethereum-cross/blob/master/cross-build/ethereum/setup.sh#L47

So you might find yourself temporary broken, but that was literally just the Boost 1.61.00 tar.gz hosted in a place which isn't sourceforge!

I also have forked cryptopp, jsoncpp and libjson-rpc-cpp repos within doublethinkco. I think they were all tiny edits to add -fPIC, and I would like to replace the forked repos with references to the upstreams and scripts which make the same tweak.

There is still a long list of minor hacks to be upstreamed/resolved/removed:

https://github.com/doublethinkco/cpp-ethereum-cross/issues/11#issuecomment-168071285

And as I am working on the upstream, I am in a great place to make those happen :-)

I understand the cpp-ethereum build system much better than I did when these scripts were written by Anthony, at which stage we were both total noobs and outsiders to cpp-ethereum.

bobsummerwill commented 8 years ago

As soon as I have landed cpp-ethereum back into ethereum/cpp-ethereum and made the v1.3.1 release, I will refocus on eliminating all these hacks, and simplifying these scripts again.

I will probably roll them all together into main.sh, and look to combine the multiple CMake ones into a single multi-output pass, if I can.

All the homogenization is unnecessary, for example. That can all go.

bobsummerwill commented 8 years ago

I think that all the "install" steps can likely be eliminated too. We shouldn't need to distinguish between work and install. Might also be possible to even avoid the need to copy to work.