OrchidTechnologies / orchid

Orchid: VPN, Personal Firewall
https://www.orchid.com/
GNU Affero General Public License v3.0
655 stars 102 forks source link

apk build fails with "No rule to make target 'shared/flutter/packages/flutter/pubspec.yaml'" #85

Closed chrishobcroft closed 3 years ago

chrishobcroft commented 3 years ago

Describe the bug

When attempting to build an Android APK using make in /orchid/app-android, after installing the NDK, setting the ANDROID_NDK_HOME, and installing zipalign, the process fails with:

orchid@revolver:~/orchid/app-android$ make
grep: ./vpn/shared/./quickjs/*.c: No such file or directory
make: *** No rule to make target 'shared/flutter/packages/flutter/pubspec.yaml', needed by 'shared/flutter/packages/flutter/pubspec.lock'. Stop.
saurik commented 3 years ago

To quote the top-level README:

Don't forget to do a "git submodule update --init --recursive"...

If you need help learning how to use git, there are resources available at https://try.github.io/.

(And again--per my paragraph on #83 and since I want to solve the actual problem you have instead of just answering your questions--it should be very easy to integrate usage of our lottery0 contract into your project, so that users can have a drop-in experience of nanopayments; this would not require the user to rely on packet capture to stream your video--which of course would also prevent users from simultaneously using an actual VPN--and it would be very easy to integrate as it doesn't use any of our code. I am available next week.)

chrishobcroft commented 3 years ago

OK, so whatever you did fixed this error, but now I'm onto another one... I doubt you want me to raise another (non-)issue for it, so I will leave it here :) it's beyond my capabilities to fix it, as I don't believe it's just a case of installing one of "the usual (complete) set of GNU build tools":

orchid@revolver:~/orchid$ git submodule update --init --recursive
orchid@revolver:~/orchid$ cd app-android/
orchid@revolver:~/orchid/app-android$ make
clang++ -stdlib=libc++ -c -std=c++11 -o out-and/protobuf/any.o -DHAVE_PTHREAD -I./vpn/shared/p2p/protobuf/src -Isrc vpn/shared/p2p/protobuf/src/google/protobuf/any.cc
In file included from vpn/shared/p2p/protobuf/src/google/protobuf/any.cc:31:
./vpn/shared/p2p/protobuf/src/google/protobuf/any.h:34:10: fatal error: 'string' file not found
#include <string>
         ^~~~~~~~
1 error generated.
make: *** [vpn/shared/p2p/protobuf.mk:28: out-and/protobuf/any.o] Error 1

I truly am sorry for pestering you with all these things. It's just that I'm a firm believer in being able to easily build open-source software from source, and would rather verify than trust someone else's build process. I also want to see if Orchid will run on a non-Google-ified version of Android, or whether it relies somehow on Google Play Services (fingers crossed that it doesn't).

I also wish to ease the onboarding process for anyone else who might be interested in "building on Orchid", in order to foster widespread permissionless community engagement around what is an insanely cool, ambitious, potentially-disruptive concept. We're going to need support from the masses if this thing is ever going to take hold.

I also accept that there are many people out there with far more advanced knowledge than I have, of build processes and git and devOps in general... but I'm also aware that there is a huge fight for mindshare of "public blockchain" community developers and infrastructure operators, and if the onboarding process can not include debugging of build processes, then such folks are likely to much more easily onboard to using Orchid, and then to begin to prototype on top of this stuff in ways which perhaps none of us ever imagined.

To conclude, I'm mightily impressed with what has been built here... being able to build multi-OS client / server software from the same underlying codebase is quite an achievement, especially for something as complex as this. Bravo. You are a credit to the ecosystem. And I am inspired to want to help connect this powerful software to folks out there who perhaps aren't aware that it exists, or indeed aren't aware of what it does, but who may be a crucial part to rolling this whole thing out to the masses, so that we really can make the internet and more private and free place for everyone.

I will respond to your offer in #83

saurik commented 3 years ago

@chrishobcroft So, the command that failed is literally just running clang--notably with -stdlib=libc++--and it isn't working because it couldn't #include . Maybe you don't have libc++ installed? Like, I kind of expect that a C/C++ developer--certainly one capable of making a modification to our project that works, as we heavily rely on C++20 coroutines--is going to see that error message and go "oh, duh". Meanwhile, that's for the "host compiler", and so it isn't exactly appropriate for me to have too strong of opinions on "how" you install it (the fact that I even require clang there is arguably a bit annoying, but gcc just isn't there yet)... you just need to have a fully-working "fully-clang" setup. That said, if you happen to be on some variant of Ubuntu, running the env/setup-lnx.sh file that I suggest in the README file would "install most of what you'd want" definitely installs libc++.

chrishobcroft commented 3 years ago

Good morning Jay, thanks for that, and thanks being gentle when telling me to RTFM... I'm gonna try it.

I'm certainly no C/C++ dev. But I do like to be able to compile what I run in production, so that I know I can, if I wanted to, audit the code and understand wtf is going on.

saurik commented 3 years ago

@chrishobcroft To respond to a couple other points:

I also want to see if Orchid will run on a non-Google-ified version of Android, or whether it relies somehow on Google Play Services (fingers crossed that it doesn't).

We absolutely should not be relying on Google Play Services (and if you discover we somehow are I will be shocked but will also take it as a critical bug to fix).

I also wish to ease the onboarding process for anyone else who might be interested in "building on Orchid"...

I honestly don't expect anyone "building on Orchid" to begin with the source code of the Orchid VPN client; either what you want is to interface with our payments system (in which case you would use an Ethereum SDK), or you want to work with our protocol (which isn't exactly ready to have anyone build anything other than a VPN client on yet) possibly by some kind of library (but likely a separate one written in Go on top of Pion; I imagine it would be extremely small).

It's just that I'm a firm believer in being able to easily build open-source software from source, and would rather verify than trust someone else's build process.

Ok, so from the perspective of an end user I can appreciate this goal: I have GitHub's CI working on doing a test of using my "just build me a copy of this" docker.sh script, and will have this flow debugged and pushed to master later today.