Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple GoMobile throws exception when building #48

Open
houmie opened this issue Oct 20, 2024 · 0 comments
Open

Apple GoMobile throws exception when building #48

houmie opened this issue Oct 20, 2024 · 0 comments

Comments

@houmie
Copy link

houmie commented Oct 20, 2024

Hello brother,

I got the latest and tried to compile, but it throws an exception:

Folder structure:

/project/libXray
/project/Xray-core
➜  libXray git:(main) ✗ python3 build/main.py apple gomobile
['build/main.py', 'apple', 'gomobile']
go: creating new go.mod: module github.com/xtls/libxray
go: to add module requirements and sums:
	go mod tidy
go: finding module for package gopkg.in/yaml.v3
go: finding module for package google.golang.org/protobuf/proto
go: found github.com/xtls/xray-core/transport/internet in github.com/xtls/xray-core v0.0.0-00010101000000-000000000000
go: found gopkg.in/yaml.v3 in gopkg.in/yaml.v3 v3.0.1
go: found github.com/xtls/xray-core/app/router in github.com/xtls/xray-core v0.0.0-00010101000000-000000000000
go: found github.com/xtls/xray-core/common/cmdarg in github.com/xtls/xray-core v0.0.0-00010101000000-000000000000
go: found github.com/xtls/xray-core/common/uuid in github.com/xtls/xray-core v0.0.0-00010101000000-000000000000
go: found github.com/xtls/xray-core/core in github.com/xtls/xray-core v0.0.0-00010101000000-000000000000
go: found github.com/xtls/xray-core/main/distro/all in github.com/xtls/xray-core v0.0.0-00010101000000-000000000000
go: found google.golang.org/protobuf/proto in google.golang.org/protobuf v1.35.1
go: downloading golang.org/x/sys v0.26.0
go: downloading github.com/sagernet/sing v0.4.3
go: downloading github.com/pires/go-proxyproto v0.8.0
go: downloading google.golang.org/grpc v1.67.1
go: downloading golang.org/x/net v0.30.0
go: downloading golang.org/x/crypto v0.28.0
go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142
go: downloading golang.org/x/text v0.19.0
go: downloading golang.org/x/mobile v0.0.0-20241016134751-7ff83004ec2c
go: downloading golang.org/x/tools v0.26.0
go: added golang.org/x/mobile v0.0.0-20241016134751-7ff83004ec2c
go: upgraded golang.org/x/mod v0.18.0 => v0.21.0
go: upgraded golang.org/x/tools v0.22.0 => v0.26.0
gomobile: go mod tidy failed: exit status 1
go: found github.com/xtls/libxray in github.com/xtls/libxray v0.0.0-00010101000000-000000000000
go: downloading google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f
go: gobind/gobind imports
	github.com/xtls/libxray imports
	github.com/xtls/libxray/xray imports
	github.com/xtls/xray-core/main/distro/all imports
	github.com/xtls/xray-core/app/log/command imports
	google.golang.org/grpc/status imports
	google.golang.org/genproto/googleapis/rpc/status: ambiguous import: found package google.golang.org/genproto/googleapis/rpc/status in multiple modules:
	google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f (/Users/houmie/go/pkg/mod/google.golang.org/[email protected]/googleapis/rpc/status)
	google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 (/Users/houmie/go/pkg/mod/google.golang.org/genproto/googleapis/[email protected]/status)
go: gobind/gobind imports
	github.com/xtls/libxray imports
	github.com/xtls/libxray/xray imports
	github.com/xtls/xray-core/main/distro/all imports
	github.com/xtls/xray-core/app/log/command imports
	google.golang.org/grpc/codes tested by
	google.golang.org/grpc/codes.test imports
	google.golang.org/genproto/googleapis/rpc/code: ambiguous import: found package google.golang.org/genproto/googleapis/rpc/code in multiple modules:
	google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f (/Users/houmie/go/pkg/mod/google.golang.org/[email protected]/googleapis/rpc/code)
	google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 (/Users/houmie/go/pkg/mod/google.golang.org/genproto/googleapis/[email protected]/code)
go: gobind/gobind imports
	github.com/xtls/libxray imports
	github.com/xtls/libxray/xray imports
	github.com/xtls/xray-core/main/distro/all imports
	github.com/xtls/xray-core/app/log/command imports
	google.golang.org/grpc/status tested by
	google.golang.org/grpc/status.test imports
	google.golang.org/genproto/googleapis/rpc/errdetails: ambiguous import: found package google.golang.org/genproto/googleapis/rpc/errdetails in multiple modules:
	google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f (/Users/houmie/go/pkg/mod/google.golang.org/[email protected]/googleapis/rpc/errdetails)
	google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 (/Users/houmie/go/pkg/mod/google.golang.org/genproto/googleapis/[email protected]/errdetails)

Traceback (most recent call last):
  File "/Users/houmie/Projects/libXray/build/main.py", line 27, in <module>
    builder.build()
  File "/Users/houmie/Projects/libXray/build/app/apple_gomobile.py", line 28, in build
    raise Exception("build failed")
Exception: build failed

Why is it failing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant