Shadowsocks-android: sbt clean go-build android:package-release 执行有问题,构建无法通过

Created on 7 Sep 2017  ·  8Comments  ·  Source: shadowsocks/shadowsocks-android

Please read FAQ then answer these questions before submitting your issue. Thanks!

Environment

  • Android version: e.g. "7.0.0_r14", more detailed description is preferred
  • Device: e.g. Google Pixel XL
  • Shadowsocks version: version code "v3.0.0" or commit ID "a073f85"
  • Last version that did not exhibit the issue (if applicable):

编译构建环境

ubuntu16.04 amd64

环境变量:
export JAVA_HOME=/usr/local/jdk1.8.0_144/
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export JASON_HOME="/home/jason"
export PATH="$JASON_HOME/bin:$JASON_HOME/.local/bin:/usr/local/android-studio/bin:$PATH"

export GOPATH="$HOME/golang/3rdpkg:$HOME/golang/go:$HOME/golang/own"
export GOROOT="$HOME/golang/go"
export PATH="$PATH:$GOROOT/bin"
export GOROOT_BOOTSTRAP="$HOME/golang/go"

export ANDROID_HOME="/home/jason/Android/Sdk"

export NDK_HOME="/home/jason/Android/Sdk/ndk-bundle"

What did you do?

按照readme 编译构建 版本

What did you expect to see?

build成功

What did you see instead?

编译没有成功,好像报的是go 第三方package没有找到.
[info] Loading project definition from /home/jason/shadowsocks-android/project
[info] Set current project to shadowsocks-android (in build file:/home/jason/shadowsocks-android/)
[info] Adding android subproject dependency rules for: mobile
[info] Set current project to shadowsocks-android (in build file:/home/jason/shadowsocks-android/)
[success] Total time: 0 s, completed Sep 7, 2017 7:41:28 PM
[info] Get dependences for overture
[warn] UPDATE: A newer sbt-android is available: 1.7.9, currently running: 1.7.8
[warn] Android SDK updates available, run 'android-update' to update:
[warn] NDK
[error] package github.com/tools/godep
[info] ~/shadowsocks-android/mobile/src/overture/src/github.com/shadowsocks/overture/main ~/shadowsocks-android
[error] imports github.com/kr/fs
[info] Cross compile overture for arm
[error] imports github.com/kr/pretty
[error] imports github.com/kr/text
[error] imports github.com/pmezard/go-difflib/difflib
[error] imports golang.org/x/tools/go/vcs
[error] imports golang_org/x/crypto/chacha20poly1305: unrecognized import path "golang_org/x/crypto/chacha20poly1305"
[error] package github.com/tools/godep
[error] imports github.com/kr/fs
[error] imports github.com/kr/pretty
[error] imports github.com/kr/text
[error] imports github.com/pmezard/go-difflib/difflib
[error] imports golang.org/x/tools/go/vcs
[error] imports golang_org/x/crypto/curve25519: unrecognized import path "golang_org/x/crypto/curve25519"
[error] package github.com/tools/godep
[error] imports github.com/kr/fs
[error] imports github.com/kr/pretty
[error] imports github.com/kr/text
[error] imports github.com/pmezard/go-difflib/difflib
[error] imports golang.org/x/tools/go/vcs
[error] imports golang_org/x/net/http2/hpack: unrecognized import path "golang_org/x/net/http2/hpack"
[error] package github.com/tools/godep
[error] imports github.com/kr/fs
[error] imports github.com/kr/pretty
[error] imports github.com/kr/text
[error] imports github.com/pmezard/go-difflib/difflib
[error] imports golang.org/x/tools/go/vcs
[error] imports golang_org/x/net/idna: unrecognized import path "golang_org/x/net/idna"
[error] package github.com/tools/godep
[error] imports github.com/kr/fs
[error] imports github.com/kr/pretty
[error] imports github.com/kr/text
[error] imports github.com/pmezard/go-difflib/difflib
[error] imports golang.org/x/tools/go/vcs
[error] imports golang_org/x/net/lex/httplex: unrecognized import path "golang_org/x/net/lex/httplex"
[error] package github.com/tools/godep
[error] imports github.com/kr/fs
[error] imports github.com/kr/pretty
[error] imports github.com/kr/text
[error] imports github.com/pmezard/go-difflib/difflib
[error] imports golang.org/x/tools/go/vcs
[error] imports golang_org/x/text/unicode/norm: unrecognized import path "golang_org/x/text/unicode/norm"
[error] package github.com/tools/godep
[error] imports github.com/kr/fs
[error] imports github.com/kr/pretty
[error] imports github.com/kr/text
[error] imports github.com/pmezard/go-difflib/difflib
[error] imports golang.org/x/tools/go/vcs
[error] imports golang_org/x/text/width: unrecognized import path "golang_org/x/text/width"
[error] mobile/src/overture/make.bash: line 63: godep: command not found
[error] log_android.go:31:2: cannot find package "github.com/Sirupsen/logrus" in any of:
[error] /home/jason/shadowsocks-android/mobile/src/overture/go/src/github.com/Sirupsen/logrus (from $GOROOT)
[error] /home/jason/shadowsocks-android/mobile/src/overture/src/github.com/Sirupsen/logrus (from $GOPATH)
[error] ../core/cache/cache.go:15:2: cannot find package "github.com/miekg/dns" in any of:
[error] /home/jason/shadowsocks-android/mobile/src/overture/go/src/github.com/miekg/dns (from $GOROOT)
[error] /home/jason/shadowsocks-android/mobile/src/overture/src/github.com/miekg/dns (from $GOPATH)
[error] ../core/outbound/client.go:14:2: cannot find package "golang.org/x/net/proxy" in any of:
[error] /home/jason/shadowsocks-android/mobile/src/overture/go/src/golang.org/x/net/proxy (from $GOROOT)
[error] /home/jason/shadowsocks-android/mobile/src/overture/src/golang.org/x/net/proxy (from $GOPATH)
[error] import cycle not allowed
[error] package github.com/shadowsocks/overture/main
[error] imports bufio
[error] imports bytes
[error] imports errors
[error] imports runtime
[error] imports runtime/internal/atomic
[error] imports runtime/internal/sys
[error] imports runtime
java.lang.RuntimeException: Native build script exit code: 255
at scala.sys.package$.error(package.scala:27)
at $2f2999287a2addc3c82b$$anonfun$$sbtdef$1.apply(/home/jason/shadowsocks-android/mobile/build.sbt:67)
at $2f2999287a2addc3c82b$$anonfun$$sbtdef$1.apply(/home/jason/shadowsocks-android/mobile/build.sbt:64)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[error] (mobile/*:goBuild) Native build script exit code: 255
[error] Total time: 12 s, completed Sep 7, 2017 7:41:40 PM

help wanted

All 8 comments

排除网络环境问题(科学上网与否),确信可以正常下载安装包。

For detailed steps to build the project, please refer to the log of travis-ci: https://travis-ci.org/shadowsocks/shadowsocks-android

thanks for @madeye. I rebuild for several times, and the issue about go packaged disappeared. But I Still have a issue about ndk build: I checked all the issues previous. But I cant find a good solution.

I will try to fix it by myself. thanks !

-------------------------part log of build -------------------------------------------

[error] warning: Ignoring InnerClasses attribute for an anonymous inner class
[error] (org.xbill.DNS.APLRecord$1) that doesn't come with an
[error] associated EnclosingMethod attribute. This class was probably produced by a
[error] compiler that did not target the modern .class file format. The recommended
[error] solution is to recompile the class from source, using an up-to-date compiler

[error] and without specifying any "-target" type options. The consequence of ignoring
[error] this warning is that reflective operations on this class will incorrectly
[error] indicate that it is not an inner class.
[error] warning: Ignoring InnerClasses attribute for an anonymous inner class
[error] (org.xbill.DNS.Compression$1) that doesn't come with an
[error] associated EnclosingMethod attribute. This class was probably produced by a
[error] compiler that did not target the modern .class file format. The recommended
[error] solution is to recompile the class from source, using an up-to-date compiler
[error] and without specifying any "-target" type options. The consequence of ignoring
[error] this warning is that reflective operations on this class will incorrectly
[error] indicate that it is not an inner class.
[error] warning: Ignoring InnerClasses attribute for an anonymous inner class
[error] (org.xbill.DNS.UDPClient$1) that doesn't come with an
[error] associated EnclosingMethod attribute. This class was probably produced by a
[error] compiler that did not target the modern .class file format. The recommended
[error] solution is to recompile the class from source, using an up-to-date compiler
[error] and without specifying any "-target" type options. The consequence of ignoring
[error] this warning is that reflective operations on this class will incorrectly
[error] indicate that it is not an inner class.
[error] warning: Ignoring InnerClasses attribute for an anonymous inner class
[error] (org.xbill.DNS.ZoneTransferIn$1) that doesn't come with an
[error] associated EnclosingMethod attribute. This class was probably produced by a
[error] compiler that did not target the modern .class file format. The recommended
[error] solution is to recompile the class from source, using an up-to-date compiler
[error] and without specifying any "-target" type options. The consequence of ignoring
[error] this warning is that reflective operations on this class will incorrectly
[error] indicate that it is not an inner class.
[info] dex method count: 41458
[error] ndk-build failed!
[error] (mobile/android:ndkBuild) ndk-build failed!
[error] Total time: 74 s, completed Sep 8, 2017 11:21:54 AM

Off topic. Your build failure is with high probability caused by your own mistakes instead of incompatibilities of the build system with your OS, architecture, etc. And this is not the place for general Q&A.

Evidence:

[error] mobile/src/overture/make.bash: line 63: godep: command not found

Your second log provides 0 useful information. You can immediately tell if you compare these log with Travis output.

At least take your time to read your own log before posting.

Also we don't have the responsibility to educate you how to build this project, especially if you don't even bother to (or don't even know you should) read the log you posted.

BTW I'm writing this just so I will have something I can link to whenever I want to close something similar in the future.

@Mygod You are so cranky! Indeed I read my log and I noticed the"[ error] mobile/src/overture/make.bash line 63: godep: command not found". I just focus on the the first error about import.

I will fix the issue by myself. Don't worry, I don't need your "educate"!

I will fix the issue by myself. Don't worry, I don't need your "educate"!
This is a sucked project on building aspect. I haven't seen a project been such harder built.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ggwolfking picture ggwolfking  ·  3Comments

Edelwiess picture Edelwiess  ·  6Comments

Rabbit1623 picture Rabbit1623  ·  5Comments

theScrabi picture theScrabi  ·  5Comments

iKirby picture iKirby  ·  4Comments