Open antwal opened 3 years ago
. If you install go 1.5 with brew instead and then add path variable like goroot and go bin zshrc, the problem will be fixed.
. If you install go 1.5 with brew instead and then add path variable like goroot and go bin zshrc, the problem will be fixed.
Hello,
I had manually installed GoLang and it was version 1.5.x, but when I had to install Brew he updated everything to version 1.16.x.
I tried to uninstall via brew golang and reinstall it again specifying version 1.5 but it doesn't work:
➜ ~ brew update
Already up-to-date.
➜ ~ brew install go@1.5
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "go@1.5".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
➜ ~ brew install golang@1.5
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "golang@1.5".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
I don't understand why Brew is still used for these projects, when it is possible to install all the necessary software without using it. In the end I downloaded and installed golang as I always did via the link:
when i launch the build i have this "warning":
➜ stf_ios_support git:(master) ✗ go version
go version go1.5.1 darwin/amd64
➜ stf_ios_support git:(master) ✗ make all
jq => version 1.6
graphicsmagick => version 1.3.36
zeromq => version 4.3.4
protobuf => version 3.15.8
yasm => version 1.3.0_2
pkg-config => version 0.29.2_3
carthage => version 0.38.0
automake => version 1.16.3_1
autoconf => version 2.71
libtool => version 2.4.6_3
wget => version 1.21.1
node@12 => version 12.22.1_1
libsodium => version 1.0.18_1
czmq => version 4.2.0
jpeg-turbo => version 2.1.0
nanomsg => version 1.1.5
libgcrypt => version 1.9.3
gnutls => version 3.6.15
mobiledevice => version 2.0.0
Missing brew package(s):
go
Run init.sh to correct
the build now throws a runtime error with version 1.5.1:
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C repos/ios_video_stream
go build -o ios_video_stream .
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x18c8cfd0ddc pc=0xa6c69]
runtime stack:
runtime.throw(0x5d7160, 0x2a)
/usr/local/go/src/runtime/panic.go:527 +0x90
runtime.sigpanic()
/usr/local/go/src/runtime/sigpanic_unix.go:12 +0x5a
runtime.(*gcWork).put(0xc82001e720, 0xc8204bb140)
/usr/local/go/src/runtime/mgcwork.go:87 +0x49
runtime.greyobject(0xc8204bb140, 0x0, 0x0, 0xc81ffda275, 0x0, 0x8b9098, 0xc82001e720)
/usr/local/go/src/runtime/mgcmark.go:956 +0x2f1
runtime.shade(0xc8204bb140)
/usr/local/go/src/runtime/mgcmark.go:894 +0x9a
runtime.gcmarkwb_m(0xc8204e8000, 0xc8204bb140)
/usr/local/go/src/runtime/mbarrier.go:91 +0xc1
runtime.writebarrierptr_nostore1.func1()
/usr/local/go/src/runtime/mbarrier.go:117 +0x134
runtime.systemstack(0xc82001d500)
/usr/local/go/src/runtime/asm_amd64.s:262 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc1.go:674
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:216 fp=0xc820130348 sp=0xc820130340
runtime.writebarrierptr_nostore1(0xc8204e8000, 0xc8204bb140)
/usr/local/go/src/runtime/mbarrier.go:118 +0x71 fp=0xc820130380 sp=0xc820130348
runtime.writebarrierptr(0xc8204e8000, 0xc8204bb140)
/usr/local/go/src/runtime/mbarrier.go:137 +0x4b fp=0xc8201303b0 sp=0xc820130380
go/token.(*FileSet).AddFile(0xc8204bb140, 0xc8204cf680, 0x22, 0x72a, 0xf3, 0x0)
/usr/local/go/src/go/token/position.go:373 +0x3b4 fp=0xc820130440 sp=0xc8201303b0
go/parser.(*parser).init(0xc820064600, 0xc8204bb140, 0xc8204cf680, 0x22, 0xc820112200, 0xf3, 0x100, 0x6)
/usr/local/go/src/go/parser/parser.go:74 +0x4c fp=0xc820130490 sp=0xc820130440
go/parser.ParseFile(0xc8204bb140, 0xc8204cf680, 0x22, 0x3e3040, 0xc8200f8360, 0x6, 0x0, 0x0, 0x0)
/usr/local/go/src/go/parser/interface.go:116 +0x199 fp=0xc820130500 sp=0xc820130490
go/build.(*Context).Import(0x7a6880, 0xc8203c1031, 0x2, 0xc8203c3600, 0x15, 0x4, 0x0, 0x0, 0x0)
/usr/local/go/src/go/build/build.go:679 +0x2597 fp=0xc820130f98 sp=0xc820130500
main.loadImport(0xc8203c1031, 0x2, 0xc8203c3600, 0x15, 0xc8203bd000, 0xc820133828, 0xc8203a1540, 0x2, 0x2, 0x1, ...)
/usr/local/go/src/cmd/go/pkg.go:344 +0x687 fp=0xc820131280 sp=0xc820130f98
main.(*Package).load(0xc8203bd000, 0xc820133828, 0xc820360f00, 0x0, 0x0, 0x4)
/usr/local/go/src/cmd/go/pkg.go:900 +0x42e1 fp=0xc820131ae0 sp=0xc820131280
main.loadImport(0xc8203c05e1, 0x3, 0xc8203c2260, 0x16, 0xc8203bc400, 0xc820133828, 0xc8203c47e0, 0x1, 0x1, 0x1, ...)
/usr/local/go/src/cmd/go/pkg.go:375 +0xd67 fp=0xc820131dc8 sp=0xc820131ae0
main.(*Package).load(0xc8203bc400, 0xc820133828, 0xc820360c00, 0x0, 0x0, 0x4)
/usr/local/go/src/cmd/go/pkg.go:900 +0x42e1 fp=0xc820132628 sp=0xc820131dc8
main.loadImport(0xc82014f981, 0x4, 0xc82013d3c0, 0x3d, 0xc820137c00, 0xc820133828, 0xc8200ebda0, 0x1, 0x1, 0x1, ...)
/usr/local/go/src/cmd/go/pkg.go:375 +0xd67 fp=0xc820132910 sp=0xc820132628
main.(*Package).load(0xc820137c00, 0xc820133828, 0xc8200e6900, 0x0, 0x0, 0x4)
/usr/local/go/src/cmd/go/pkg.go:900 +0x42e1 fp=0xc820133170 sp=0xc820132910
main.loadImport(0x542da0, 0x1, 0xc820016880, 0x3d, 0x0, 0xc820133828, 0x0, 0x0, 0x0, 0x0, ...)
/usr/local/go/src/cmd/go/pkg.go:375 +0xd67 fp=0xc820133458 sp=0xc820133170
main.loadPackage(0x542da0, 0x1, 0xc820133828, 0x0)
/usr/local/go/src/cmd/go/pkg.go:1572 +0x13c3 fp=0xc820133768 sp=0xc820133458
main.packagesAndErrors(0xc82014f600, 0x1, 0x1, 0x0, 0x0, 0x0)
/usr/local/go/src/cmd/go/pkg.go:1611 +0x3b4 fp=0xc820133958 sp=0xc820133768
main.packagesForBuild(0xc82000a0e0, 0x1, 0x1, 0x0, 0x0, 0x0)
/usr/local/go/src/cmd/go/pkg.go:1624 +0x76 fp=0xc820133ab8 sp=0xc820133958
main.runBuild(0x79f3e0, 0xc82000a0e0, 0x1, 0x1)
/usr/local/go/src/cmd/go/build.go:415 +0x8c fp=0xc820133c40 sp=0xc820133ab8
main.main()
/usr/local/go/src/cmd/go/main.go:181 +0x782 fp=0xc820133f30 sp=0xc820133c40
runtime.main()
/usr/local/go/src/runtime/proc.go:111 +0x2b0 fp=0xc820133f80 sp=0xc820133f30
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc820133f88 sp=0xc820133f80
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1696 +0x1
goroutine 5 [syscall]:
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
/usr/local/go/src/os/signal/signal_unix.go:28 +0x37
make[1]: *** [ios_video_stream] Error 2
make: *** [repos/ios_video_stream/ios_video_stream] Error 2
I need a specific version of golang?
Thank you.
Hello,
it took a while but in the end I managed to move on but there are still problems:
First I relaunched the init and had brew reinstall everything:
➜ stf_ios_support git:(master) ✗ ./init.sh
Xcode 12.4 installed
jq => version 1.6
graphicsmagick => version 1.3.36
zeromq => version 4.3.4
protobuf => version 3.15.8
yasm => version 1.3.0_2
pkg-config => version 0.29.2_3
carthage => version 0.38.0
automake => version 1.16.3_1
autoconf => version 2.71
libtool => version 2.4.6_3
wget => version 1.21.1
node@12 => version 12.22.1_1
libsodium => version 1.0.18_1
czmq => version 4.2.0
jpeg-turbo => version 2.1.0
nanomsg => version 1.1.5
libgcrypt => version 1.9.3
gnutls => version 3.6.15
mobiledevice => version 2.0.0
Installing missing packages:
goUpdating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 3 formulae.
==> Downloading https://ghcr.io/v2/homebrew/core/go/manifests/1.16.3
Already downloaded: /Users/antwal/Library/Caches/Homebrew/downloads/a0c7d5540c8c88f612cedc7d9af128deb15aa152ce0b0f2e1bcd3d8f235020f5--go-1.16.3.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/go/blobs/sha256:69c28f5e60612801c66e51e93d32068f822b245ab83246cb6cb374572eb59e15
Already downloaded: /Users/antwal/Library/Caches/Homebrew/downloads/d74822e0d6c473f04ff2856cab284c0f3a55bc4edbd09f63f4c542a528d0495e--go--1.16.3.catalina.bottle.tar.gz
==> Pouring go--1.16.3.catalina.bottle.tar.gz
🍺 /usr/local/Cellar/go/1.16.3: 9,955 files, 503.5MB
libplist - HEAD already installed
libplist - installed HEAD is version 2.2.1 ( ==2.2.1 )
libusbmuxd - HEAD already installed
libusbmuxd - installed HEAD is version 2.0.3 ( ==2.0.3 )
Then I configured golang as described on this guide
Then I checked the dependencies as described here
➜ stf_ios_support git:(master) ✗ cd repos/ios_video_pull
➜ ios_video_pull git:(master) ✗ go list -deps .
go: github.com/nanoscopic/ios_video_pull: package github.com/google/gousb imported from implicitly required module; to add missing requirements, run:
go get github.com/google/gousb@v0.0.0-20190812193832-18f4c1d8a750
instead of using the suggested command, I used:
go get -d github.com/google/gousb@v0.0.0-20190812193832-18f4c1d8a750
and in the next build it worked.
Then another error on "view_log.go":
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C repos/wdaproxy
go build .
go: downloading github.com/DHowett/go-plist v0.0.0-20170330020707-795cf23fd27f
go: downloading github.com/facebookgo/freeport v0.0.0-20150612182905-d4adf43b75b9
go: downloading github.com/gobuild/log v1.0.0
go: downloading github.com/gorilla/mux v1.3.1-0.20170228224354-599cba5e7b61
go: downloading github.com/gorilla/websocket v1.1.1-0.20170319172727-a91eba7f9777
go: downloading github.com/mash/go-accesslog v0.0.0-20151029030928-9ba8e13f3608
go: downloading github.com/ogier/pflag v0.0.2-0.20160129220114-45c278ab3607
go: downloading github.com/shurcooL/vfsgen v0.0.0-20170320185537-47fc2dca6b18
go: downloading github.com/codeskyblue/muuid v0.0.0-20170401091614-44f8dfd4b3a9
go: downloading github.com/pkg/errors v0.8.1-0.20170316201538-ff09b135c25a
go: downloading golang.org/x/sys v0.0.0-20190422165155-953cdadca894
go: downloading github.com/shurcooL/httpfs v0.0.0-20161230030236-df3d5d88c596
go: downloading github.com/satori/go.uuid v1.1.1-0.20160927100844-b061729afc07
go: downloading golang.org/x/tools v0.0.0-20170406185716-24acc66eabea
cp repos/wdaproxy/wdaproxy bin/wdaproxy
go get github.com/fsnotify/fsnotify
go: downloading github.com/fsnotify/fsnotify v1.4.9
go: downloading golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9
go get github.com/sirupsen/logrus
go: downloading github.com/sirupsen/logrus v1.8.1
go: downloading golang.org/x/sys v0.0.0-20191026070338-33540a1f6037
go build view_log.go
view_log.go:13:5: no required module provides package github.com/fsnotify/fsnotify: go.mod file not found in current directory or any parent directory; see 'go help modules'
view_log.go:14:5: no required module provides package github.com/sirupsen/logrus: go.mod file not found in current directory or any parent directory; see 'go help modules'
make: *** [view_log] Error 1
i did it this way and it looks like it worked:
➜ stf_ios_support git:(master) ✗ go mod init view_log.go
go: creating new go.mod: module view_log.go
go: to add module requirements and sums:
go mod tidy
➜ stf_ios_support git:(master) ✗ go mod tidy
warning: ignoring symlink /Users/antwal/Projects/stf_ios_support/bin/ffmpeg
go: finding module for package github.com/fsnotify/fsnotify
go: finding module for package github.com/sirupsen/logrus
go: found github.com/fsnotify/fsnotify in github.com/fsnotify/fsnotify v1.4.9
go: found github.com/sirupsen/logrus in github.com/sirupsen/logrus v1.8.1
warning: ignoring symlink /Users/antwal/Projects/stf_ios_support/bin/ffmpeg
go: downloading github.com/stretchr/testify v1.2.2
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading github.com/davecgh/go-spew v1.1.1
➜ stf_ios_support git:(master) ✗ go build view_log.go
now the last error that I still have not solved:
cd repos/WebDriverAgent && ./Scripts/bootstrap.sh
/bin/sh: ./Scripts/bootstrap.sh: No such file or directory
make: *** [repos/WebDriverAgent/Carthage/Checkouts/RoutingHTTPServer/Info.plist] Error 127
although this problem has already been reported here #95
@antwal First of all, hi, sorry for being late. I guess it is about the index structure changed in 1.16 in the previous problem. I solved the problem similar to yours with my own method.
The second problem is that in the problem with wda, since the need for the web driver agent has been removed from the cartaga, bootstrap.sh is now deleted under the scripts folder. You will see that it has created build info with boostrap.sh where there are wda build code lines in the makefile file in the project. makefile; 204.line repos/WebDriverAgent/Carthage/Checkouts/RoutingHTTPServer/Info.plist: | repos/WebDriverAgent cd repos/WebDriverAgent && ./Scripts/bootstrap.sh
1.Solution: To get rid of this problem, first delete the wda folder and switch to the old version with boostrap sh. This is the release: https://github.com/appium/WebDriverAgent/releases/tag/v2.35.1 -->xcode version 12.4
2.Solution. :or edit makefile compilation operations to current wda or remove that line it is simple :) cd repos/WebDriverAgent && ./Scripts/bootstrap.sh
@ahmetdellall Hi, no problems, thanks for the reply. I was building and installing the package manually on each device and it works; I tried removing the line on the Makefile, but it keeps throwing me errors:
error: No account for team "*****". Add a new account in the Accounts preference pane or verify that your accounts have valid credentials. (in target 'WebDriverAgentRunner' from project 'WebDriverAgent')
error: No profiles for 'com.facebook.WebDriverAgentRunner.xctrunner' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.facebook.WebDriverAgentRunner.xctrunner'. (in target 'WebDriverAgentRunner' from project 'WebDriverAgent')
error: No account for team "*****". Add a new account in the Accounts preference pane or verify that your accounts have valid credentials. (in target 'WebDriverAgentLib' from project 'WebDriverAgent')
error: No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "*****" with a private key was found. (in target 'WebDriverAgentLib' from project 'WebDriverAgent')
The thing is very strange, because compiling manually works without problems
@antwal hello, did you open WebDriverAgent.xcodeproj xcode and define apple account and certificates from settings?
Hello,
I tried to install it on catalina, although I was puzzled at first as Brew is used;
in fact, at the end of the installation, brew had messed up and corrupted several software already installed including xcode.
I wasted 1 full day correcting errors and problems manually, even though it was already almost everything installed without using Brew but I saw that there was no way to make it work without it.
Now the next step with the "make all" command generates an error on "ios_video_pull":
I tried to run the suggested command but it always got the same error:
how do i solve the problem to continue the installation?
Thank you.