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

libgo: build failure on ppc64le since Go 1.14beta1 update: implicit declaration of function ‘runtime_nanotime #36694

Closed
laboger opened this issue Jan 22, 2020 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@laboger
Copy link
Contributor

laboger commented Jan 22, 2020

What version of Go are you using (go version)?

$ go version
go version go1.14beta1 gccgo (GCC) 10.0.1 20200122 (experimental) linux/ppc64le

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
linux/ppc64le

What did you do?

Tried to do a build of gccgo after the update to Go 1.14 in master/trunk.

What did you expect to see?

No errors.

What did you see instead?

libtool: compile: /home/boger/gccgo.git.work/bld/./gcc/xgcc -B/home/boger/gccgo.git.work/bld/./gcc/ -B/usr/local/gccgo.trunk/powerpc64le-linux/bin/ -B/usr/local/gccgo.trunk/powerpc64le-linux/lib/ -isystem /usr/local/gccgo.trunk/powerpc64le-linux/include -isystem /usr/local/gccgo.trunk/powerpc64le-linux/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc/libgo -I ../../../gcc/libgo/runtime -I../../../gcc/libgo/../libffi/include -I../libffi/include -pthread -L../libatomic/.libs -fexceptions -fnon-call-exceptions -fsplit-stack -Wall -Wextra -Wwrite-strings -Wcast-qual -Werror -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I ../../../gcc/libgo/../libgcc -I ../../../gcc/libgo/../libbacktrace -I ../../gcc/include -g -O2 -MT runtime/print.lo -MD -MP -MF runtime/.deps/print.Tpo -c ../../../gcc/libgo/runtime/print.c -o runtime/print.o >/dev/null 2>&1
../../../gcc/libgo/runtime/runtime_c.c: In function ‘runtime_cputicks’:
../../../gcc/libgo/runtime/runtime_c.c:100:10: error: implicit declaration of function ‘runtime_nanotime’; did you mean ‘runtime_nanotime1’? [-Werror=implicit-function-declaration]
100 | return runtime_nanotime() + randomNumber;
| ^~~~~~~~~~~~~~~~
| runtime_nanotime1

Changing the call of runtime_nanotime to runtime_nanotime1 fixes the build, but haven't tested it yet.

@gopherbot
Copy link

Change https://golang.org/cl/215724 mentions this issue: runtime: call runtime_nanotime1, not runtime_nanotime

@toothrot toothrot added this to the Go1.14 milestone Jan 22, 2020
@toothrot toothrot added the NeedsFix The path to resolution is known, but the work has not been done. label Jan 22, 2020
@toothrot
Copy link
Contributor

/cc @ianlancetaylor

kraj pushed a commit to kraj/gcc that referenced this issue Jan 22, 2020
The function name was changed in 1.14beta1. Fix the non-x86, non-s390 code.

Fixes golang/go#36694

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/215724
@golang golang locked and limited conversation to collaborators Jan 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants