Back to error with docker make env step 34 of 35.... I tried reading every related gomobile stack overflow / gopher issue. Any ideas what I could try?
The command '/bin/sh -c gomobile init -ndk $ANDROID_HOME/ndk-bundle' returned a non-zero code: 1 make: *** [env] Error 1 Clives-MBP:android seebe$ make env mkdir -p /Users/seebe/.gradle mkdir -p /Users/seebe/.android docker build -t perkeep/android devenv Sending build context to Docker daemon 4.096kB Step 1/35 : FROM openjdk:8-jdk ---> 77582d6037d7 Step 2/35 : MAINTAINER camlistore <[email protected]> ---> Using cache ---> 6d9e0f3e757d Step 3/35 : RUN echo "Adding gopher user and group" && groupadd --system --gid 1000 gopher && useradd --system --gid gopher --uid 1000 --shell /bin/bash --create-home gopher && mkdir /home/gopher/.gradle && chown --recursive gopher:gopher /home/gopher ---> Using cache ---> 31bfbf183243 Step 4/35 : RUN apt-get update && apt-get -y upgrade ---> Using cache ---> bfc19d6c1985 Step 5/35 : RUN apt-get install -y lib32z1 lib32stdc++6 ---> Using cache ---> 46da722745b2 Step 6/35 : RUN apt-get -y --no-install-recommends install curl gcc ---> Using cache ---> e77457fa3b45 Step 7/35 : RUN apt-get -y --no-install-recommends install ca-certificates libc6-dev git ---> Using cache ---> 39bee3742d2b Step 8/35 : USER gopher ---> Using cache ---> 3fca9aed1854 Step 9/35 : VOLUME "/home/gopher/.gradle" ---> Using cache ---> ec21446be7b6 Step 10/35 : ENV GOPHER /home/gopher ---> Using cache ---> e4cd83422cd6 Step 11/35 : WORKDIR $GOPHER ---> Using cache ---> 883cdedc9eee Step 12/35 : RUN mkdir android-sdk ---> Using cache ---> 6f4a6f7d4631 Step 13/35 : ENV ANDROID_HOME $GOPHER/android-sdk ---> Using cache ---> 65cfadecfa20 Step 14/35 : WORKDIR $ANDROID_HOME ---> Using cache ---> 34dba83e0247 Step 15/35 : RUN curl -O https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip ---> Using cache ---> 244857d5d15b Step 16/35 : RUN echo '444e22ce8ca0f67353bda4b85175ed3731cae3ffa695ca18119cbacef1c1bea0 sdk-tools-linux-3859397.zip' | sha256sum -c ---> Using cache ---> 0a9e0167ef10 Step 17/35 : RUN unzip sdk-tools-linux-3859397.zip ---> Using cache ---> 2e12d577b08f Step 18/35 : RUN echo y | $ANDROID_HOME/tools/bin/sdkmanager --update ---> Using cache ---> cc2e17bb1199 Step 19/35 : RUN echo y | $ANDROID_HOME/tools/bin/sdkmanager 'platforms;android-27' ---> Using cache ---> db7dbb15a884 Step 20/35 : RUN echo y | $ANDROID_HOME/tools/bin/sdkmanager 'build-tools;28.0.3' ---> Using cache ---> ea6ec5ee9eb1 Step 21/35 : RUN echo y | $ANDROID_HOME/tools/bin/sdkmanager 'extras;android;m2repository' ---> Using cache ---> 0082d740c51f Step 22/35 : RUN echo y | $ANDROID_HOME/tools/bin/sdkmanager 'ndk-bundle' ---> Using cache ---> 40ee3e690dfc Step 23/35 : WORKDIR $GOPHER ---> Using cache ---> 6c5444b0c8d5 Step 24/35 : RUN curl -O https://storage.googleapis.com/golang/go1.11.linux-amd64.tar.gz ---> Using cache ---> ef39fd35b794 Step 25/35 : RUN echo 'b3fcf280ff86558e0559e185b601c9eade0fd24c900b4c63cd14d1d38613e499 go1.11.linux-amd64.tar.gz' | sha256sum -c ---> Using cache ---> f8f5f578d5d0 Step 26/35 : RUN tar -xzf go1.11.linux-amd64.tar.gz ---> Using cache ---> eebba8f0dc96 Step 27/35 : ENV GOPATH $GOPHER ---> Using cache ---> e4d59db0b61a Step 28/35 : ENV GOROOT $GOPHER/go ---> Using cache ---> bcb3b0145f62 Step 29/35 : ENV PATH $PATH:$GOROOT/bin:$GOPHER/bin ---> Using cache ---> 8029e1df0f0b Step 30/35 : RUN go get -u golang.org/x/mobile/cmd/gomobile ---> Using cache ---> fe6424f18b42 Step 31/35 : WORKDIR $GOPATH/src/golang.org/x/mobile/cmd/gomobile ---> Using cache ---> b34e3dc40b37 Step 32/35 : RUN git reset --hard 069be623eb8e75049d64f1419849b3e92aab1c81 ---> Using cache ---> 4eaf91f7bae4 Step 33/35 : RUN go install ---> Using cache ---> f95286cfe9a8 Step 34/35 : RUN gomobile init -ndk $ANDROID_HOME/ndk-bundle ---> Running in fa9622717870 gomobile: go install -gcflags=-shared -ldflags=-shared -pkgdir=/home/gopher/pkg/gomobile/pkg_android_arm std failed: exit status 2 # runtime/cgo /home/gopher/android-sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtbegin_dynamic.o: No such file or directory /home/gopher/android-sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtend_android.o: No such file or directory /home/gopher/android-sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -llog /home/gopher/android-sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldl /home/gopher/android-sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lc /home/gopher/android-sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldl /tmp/go-build032942289/b081/_x003.o:gcc_android.c:function fatalf: error: undefined reference to 'fprintf' /tmp/go-build032942289/b081/_x003.o:gcc_android.c:function fatalf: error: undefined reference to 'vfprintf' /tmp/go-build032942289/b081/_x003.o:gcc_android.c:function fatalf: error: undefined reference to 'fprintf' /tmp/go-build032942289/b081/_x003.o:gcc_android.c:function fatalf: error: undefined reference to '__android_log_vprint' /tmp/go-build032942289/b081/_x003.o:gcc_android.c:function fatalf: error: undefined reference to 'abort' /tmp/go-build032942289/b081/_x003.o:gcc_android.c:function fatalf: error: undefined reference to '__sF' /tmp/go-build032942289/b081/_x004.o:gcc_android_arm.c:function inittls: error: undefined reference to 'pthread_key_create' /tmp/go-build032942289/b081/_x004.o:gcc_android_arm.c:function inittls: error: undefined reference to 'pthread_setspecific' /tmp/go-build032942289/b081/_x004.o:gcc_android_arm.c:function inittls: error: undefined reference to 'pthread_setspecific' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function x_cgo_sys_thread_create: error: undefined reference to 'strerror' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function x_cgo_sys_thread_create: error: undefined reference to 'fprintf' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function x_cgo_sys_thread_create: error: undefined reference to 'abort' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function x_cgo_sys_thread_create: error: undefined reference to '__sF' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function _cgo_try_pthread_create: error: undefined reference to 'pthread_create' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function _cgo_try_pthread_create: error: undefined reference to 'pthread_detach' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function _cgo_try_pthread_create: error: undefined reference to 'nanosleep' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function _cgo_wait_runtime_init_done: error: undefined reference to 'pthread_mutex_lock' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function _cgo_wait_runtime_init_done: error: undefined reference to 'pthread_cond_wait' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function _cgo_wait_runtime_init_done: error: undefined reference to 'pthread_mutex_unlock' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function x_cgo_notify_runtime_init_done: error: undefined reference to 'pthread_mutex_lock' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function x_cgo_notify_runtime_init_done: error: undefined reference to 'pthread_cond_broadcast' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function x_cgo_notify_runtime_init_done: error: undefined reference to 'pthread_mutex_unlock' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function x_cgo_set_context_function: error: undefined reference to 'pthread_mutex_lock' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function x_cgo_set_context_function: error: undefined reference to 'pthread_mutex_unlock' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function _cgo_get_context_function: error: undefined reference to 'pthread_mutex_lock' /tmp/go-build032942289/b081/_x006.o:gcc_libinit.c:function _cgo_get_context_function: error: undefined reference to 'pthread_mutex_unlock' /tmp/go-build032942289/b081/_x007.o:gcc_linux_arm.c:function _cgo_sys_thread_start: error: undefined reference to 'pthread_sigmask' /tmp/go-build032942289/b081/_x007.o:gcc_linux_arm.c:function _cgo_sys_thread_start: error: undefined reference to 'memset' /tmp/go-build032942289/b081/_x007.o:gcc_linux_arm.c:function _cgo_sys_thread_start: error: undefined reference to 'pthread_attr_init' /tmp/go-build032942289/b081/_x007.o:gcc_linux_arm.c:function _cgo_sys_thread_start: error: undefined reference to 'pthread_attr_getstacksize' /tmp/go-build032942289/b081/_x007.o:gcc_linux_arm.c:function _cgo_sys_thread_start: error: undefined reference to 'pthread_sigmask' /tmp/go-build032942289/b081/_x007.o:gcc_linux_arm.c:function _cgo_sys_thread_start: error: undefined reference to 'strerror' /tmp/go-build032942289/b081/_x007.o:gcc_linux_arm.c:function sigfillset: error: undefined reference to '__errno' /tmp/go-build032942289/b081/_x007.o:gcc_linux_arm.c:function sigfillset: error: undefined reference to 'memset' /tmp/go-build032942289/b081/_x007.o:gcc_linux_arm.c:function threadentry: error: undefined reference to 'free' /tmp/go-build032942289/b081/_x007.o:gcc_linux_arm.c:function x_cgo_init: error: undefined reference to 'pthread_attr_init' /tmp/go-build032942289/b081/_x007.o:gcc_linux_arm.c:function x_cgo_init: error: undefined reference to 'pthread_attr_getstacksize' /tmp/go-build032942289/b081/_x007.o:gcc_linux_arm.c:function x_cgo_init: error: undefined reference to 'pthread_attr_destroy' /tmp/go-build032942289/b081/_x008.o:gcc_setenv.c:function x_cgo_setenv: error: undefined reference to 'setenv' /tmp/go-build032942289/b081/_x008.o:gcc_setenv.c:function x_cgo_unsetenv: error: undefined reference to 'unsetenv' /tmp/go-build032942289/b081/_x010.o:gcc_util.c:function x_cgo_thread_start: error: undefined reference to 'malloc' /tmp/go-build032942289/b081/_x010.o:gcc_util.c:function x_cgo_thread_start: error: undefined reference to 'fprintf' /tmp/go-build032942289/b081/_x010.o:gcc_util.c:function x_cgo_thread_start: error: undefined reference to 'abort' /tmp/go-build032942289/b081/_x010.o:gcc_util.c:function x_cgo_thread_start: error: undefined reference to '__sF' clang: error: linker command failed with exit code 1 (use -v to see invocation) The command '/bin/sh -c gomobile init -ndk $ANDROID_HOME/ndk-bundle' returned a non-zero code: 1 make: *** [env] Error 1 On Tuesday, October 23, 2018 at 6:17:02 AM UTC-7, mathieu.lonjaret wrote: > > Cool. Building for Android is a black art, that you're now versed into! > As for signing, given that you don't have the project's secret key, > you won't be able to sign your apk is if we were doing it. So your > android will always see anything you sign as a mismatch with the > official app already installed. So unless you wanna run with your own > fork of the project, there's not much point for you to sign the apk > imho. > > That said, if you want to try signing on your own, you need to > generate a keystore (there's docs for it I'm sure), and you need to > have a clients/android/keystore.properties file, with fields like that > in it: > storeFile=perkeep-android.keystore > storePassword=yourPassword > keyAlias=camKey > > On Tue, 23 Oct 2018 at 11:43, clive.boulton <[email protected] > <javascript:>> wrote: > > > > Thank you. With your direction I built debug and release using the > docker build. I now need to figure out how to sign the apk. > > app-release-unsigned.apk > > > > On Saturday, October 20, 2018 at 5:56:24 AM UTC-7, simon.bohlin wrote: > >> > >> why so old gradle? > >> > >> gradle can be used via gradlew - a wrapper script. That's reliable when > automating, and builds quickly, bypassing docker. > >> > >> For how to integrate gradlew in a build script, see most any sample app > gitrepo, like the repo of react-native-firebase sample. > >> > >> Check you have ANDROID_SDK defined. > >> > >> You'll probably need to have build keys in a file, say MY_KEYS.keystore > and reference that file in root folder .properties and then typically I'd > have to android app's build . properties in a folder right below the root. > >> Building android apps is a science > >> > >> > >> Android play store demands API target 28.1, minSDK 23 or so. I'd use > gradle 4.6+ if compatible => if go can work with this newer gradle. > > > > -- > > You received this message because you are subscribed to the Google > Groups "Perkeep" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected] <javascript:>. > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Perkeep" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
