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

[Bug]: new golang 2:1.17 tools no run #7356

Closed
zhlmnet opened this issue Aug 19, 2021 · 13 comments
Closed

[Bug]: new golang 2:1.17 tools no run #7356

zhlmnet opened this issue Aug 19, 2021 · 13 comments
Labels
bug report Something is not working properly

Comments

@zhlmnet
Copy link

zhlmnet commented Aug 19, 2021

Problem description

usr/lib/go/pkg/tool/android_arm64/ all files not to run,
file info:
-rwx------ 1 u0_a438 u0_a438 3597040 Aug 18 06:40 addr2line
-rwx------ 1 u0_a438 u0_a438 4393264 Aug 18 06:40 api
-rwx------ 1 u0_a438 u0_a438 4172192 Aug 18 06:40 asm
-rwx------ 1 u0_a438 u0_a438 2135760 Aug 18 06:40 buildid
-rwx------ 1 u0_a438 u0_a438 3854832 Aug 18 06:40 cgo
-rwx------ 1 u0_a438 u0_a438 19410136 Aug 18 06:40 compile
-rwx------ 1 u0_a438 u0_a438 4061744 Aug 18 06:40 cover
-rwx------ 1 u0_a438 u0_a438 2868080 Aug 18 06:40 dist
-rwx------ 1 u0_a438 u0_a438 3262064 Aug 18 06:40 doc
-rwx------ 1 u0_a438 u0_a438 2733968 Aug 18 06:40 fix
-rwx------ 1 u0_a438 u0_a438 5474792 Aug 18 06:40 link
-rwx------ 1 u0_a438 u0_a438 3531504 Aug 18 06:40 nm
-rwx------ 1 u0_a438 u0_a438 3861200 Aug 18 06:40 objdump
-rwx------ 1 u0_a438 u0_a438 1949784 Aug 18 06:40 pack
-rwx------ 1 u0_a438 u0_a438 11963664 Aug 18 06:39 pprof
-rwx------ 1 u0_a438 u0_a438 2143056 Aug 18 06:40 test2json
-rwx------ 1 u0_a438 u0_a438 8780144 Aug 18 06:39 trace
-rwx------ 1 u0_a438 u0_a438 5910800 Aug 18 06:40 vet

./api: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=vFVNRCammyHB13CwFuAg/aShREmCWy_zEvu-Nuzgl/PxScszd6L5yXbeOk78XY/gOaEJFqisgmswgOMmWow, stripped

uname -a
Linux localhost 4.4.205-perf+ #1 SMP PREEMPT Thu Dec 3 03:34:06 CST 2020 aarch64 Android

What steps will reproduce the bug?

1.apk install golang

What is the expected behavior?

No response

System information

termux-info:
Application version:
0.117
Packages CPU architecture:
aarch64
Subscribed repositories:

sources.list

deb https://packages.termux.org/apt/termux-main/ stable main

game-repo (sources.list.d/game.list)

deb https://packages.termux.org/apt/termux-games games stable

science-repo (sources.list.d/science.list)

deb https://packages.termux.org/apt/termux-science science stable

root-repo (sources.list.d/root.list)

deb https://packages.termux.org/apt/termux-root root stable

x11-repo (sources.list.d/x11.list)

deb https://packages.termux.org/apt/termux-x11 x11 main
Updatable packages:
proot/stable 5.1.107-42 aarch64 [upgradable from: 5.1.107-41]
Android version:
10
Kernel build information:
Linux localhost 4.4.205-perf+ #1 SMP PREEMPT Thu Dec 3 03:34:06 CST 2020 aarch64 Android
Device manufacturer:
OnePlus
Device model:
ONEPLUS A5000


@zhlmnet zhlmnet added the bug report Something is not working properly label Aug 19, 2021
@thunder-coding
Copy link
Member

thunder-coding commented Aug 19, 2021

Can reproduce on aarch64 Android 11.

Here's what error I got while go run script/build.go in GitHub CLI

go tool compile: fork/exec /data/data/com.termux/files/usr/lib/go/pkg/tool/android_arm64/compile: no such file or directory

The PR which updated Go #7345

@thunder-coding
Copy link
Member

Digging into the issue,

Executing $PREFIX/lib/go/pkg/tool/android_arm64/tool/compile fails with

Failed to execute process './compile'. Reason:                  The file './compile' does not exist or could not be executed.

@hnmn
Copy link

hnmn commented Aug 19, 2021

IMG_20210820_003751
Looks like linked to linux x86-64

@ghost
Copy link

ghost commented Aug 20, 2021

Same here; cannot revert because 1.16.7 no longer exists in the repos.

@ghost
Copy link

ghost commented Aug 20, 2021

Looks like linked to linux x86-64

No, that's just wrong dynamic linker path set

@adenis78
Copy link

adenis78 commented Aug 20, 2021

It's pain.
where can I get the previous version from? UPD: suppose i need to download prev version of whole termux apk?
UPD2: just downgraded termux version in f-droid :)

@ghost
Copy link

ghost commented Aug 20, 2021

@adenis78 Termux apk version has nothing to do with package versions. They are entirely separate, just application provides you a way to run packages.

@adenis78
Copy link

@xeffyr, yes... and it's bad.

$ apt-cache madison golang 
golang |     2:1.17 | https://termux.mentality.rip/termux-main stable/main aarch64 Packages

@rendiix
Copy link

rendiix commented Aug 21, 2021

Does anyone have a backup of golang version 1.16

@hnmn
Copy link

hnmn commented Aug 21, 2021

@rendiix
Copy link

rendiix commented Aug 21, 2021

Does anyone have a backup of golang version 1.16

Here you go

https://github.com/termux/termux-packages/suites/3501132160/artifacts/83436791

From
https://github.com/termux/termux-packages/actions/runs/1131365380

Thank you sir,

ghost pushed a commit that referenced this issue Aug 21, 2021
@zhlmnet zhlmnet closed this as completed Aug 22, 2021
@NatoBoram
Copy link

NatoBoram commented Aug 22, 2021

I managed to build go1.17 on aarch64

@zorro
Copy link
Contributor

zorro commented Sep 18, 2021

On android-9 go is linking to /lib64/ld-linux-x86-64.so.2 instead of /system/bin/linker64

$ go build hello.go                      
$ patchelf --print-interpreter hello     
/lib64/ld-linux-x86-64.so.2

tested on aarch64 device

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly
Projects
None yet
Development

No branches or pull requests

7 participants