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

bootstrap: "'p' exponent requires hexadecimal mantissa" warning emitted when bootstrapping Go 1.12 from tip (1.13) #33625

Closed
cherrymui opened this issue Aug 13, 2019 · 6 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@cherrymui
Copy link
Member

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

tip (61bb56a)

Does this issue reproduce with the latest release?

No

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

darwin/amd64

What did you do?

Bootstrapping Go 1.12.7 from tip (~1.13)

$ git checkout go1.12.7
HEAD is now at 7f416b4f04 [release-branch.go1.12] go1.12.7
$ GOROOT_BOOTSTRAP=$HOME/src/go-tip ./make.bash 
Building Go cmd/dist using /Users/cherryyz/src/go-tip.
Building Go toolchain1 using /Users/cherryyz/src/go-tip.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
go_asm.h:584:33: 'p' exponent requires hexadecimal mantissa
go_asm.h:585:39: 'p' exponent requires hexadecimal mantissa
go_asm.h:584:33: 'p' exponent requires hexadecimal mantissa
go_asm.h:585:39: 'p' exponent requires hexadecimal mantissa
go_asm.h:584:33: 'p' exponent requires hexadecimal mantissa
go_asm.h:585:39: 'p' exponent requires hexadecimal mantissa
go_asm.h:584:33: 'p' exponent requires hexadecimal mantissa
go_asm.h:585:39: 'p' exponent requires hexadecimal mantissa
Building Go toolchain2 using go_bootstrap and Go toolchain1.
# runtime
go_asm.h:584:33: 'p' exponent requires hexadecimal mantissa
go_asm.h:585:39: 'p' exponent requires hexadecimal mantissa
# runtime
go_asm.h:584:33: 'p' exponent requires hexadecimal mantissa
go_asm.h:585:39: 'p' exponent requires hexadecimal mantissa
# runtime
go_asm.h:584:33: 'p' exponent requires hexadecimal mantissa
go_asm.h:585:39: 'p' exponent requires hexadecimal mantissa
# runtime
go_asm.h:584:33: 'p' exponent requires hexadecimal mantissa
go_asm.h:585:39: 'p' exponent requires hexadecimal mantissa
Building Go toolchain3 using go_bootstrap and Go toolchain2.
Building packages and commands for darwin/amd64.
---
Installed Go for darwin/amd64 in /Users/cherryyz/src/go-tmp
Installed commands in /Users/cherryyz/src/go-tmp/bin

What did you expect to see?

make.bash succeeded.

What did you see instead?

make.bash succeeded, with warnings 'p' exponent requires hexadecimal mantissa for go_asm.h.

The warning is printed only when using "toolchain1", which is Go 1.12 toolchain built by the bootstrap toolchain. In Go 1.13 we stop generating floating point constants in go_asm.h (https://go-review.googlesource.com/c/go/+/161904), but toolchain1 still does, as it is Go 1.12. Then this is fed into the toolchain1 cmd/asm, which is also Go 1.12 but its text/scanner package is from the bootstrap toolchain, which is Go 1.13 in this case, which emits the error.

Possible solutions:

  • don't do anything. I understand that bootstrapping Go 1.12 from a newer toolchain is a bit weird setting, which we probably could decide not to care. And it is only a warning.
  • change cmd/dist to use the target's copy of text/scanner when building toolchain1 (we already do this for e.g. math/big and debug/dwarf).

@jeremyfaller found this initially.

@andybons andybons added NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Aug 13, 2019
@andybons andybons added this to the Unplanned milestone Aug 13, 2019
@gopherbot gopherbot removed the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Aug 13, 2019
@nicocesar
Copy link

if this helps. I had the same error and ended up being an extra "2" before package in one of my subpackages definitions as in:

2package foo

as the first line of the file.

@go101
Copy link

go101 commented Aug 12, 2022

The problem is still there, but may be this issue is outdated now?

@go101
Copy link

go101 commented Aug 12, 2022

BTW, it is impossible to use Go 1.16+ to bootstrap Go 1.12 now.
Using Go 1.16+ to bootstrap Go 1.13 is okay.

@excenter
Copy link

excenter commented Oct 5, 2022

I was trying to install 1.12 for an older package and running into this.
What ended up working was installing the 1.17 binary from a repository, using that to build 1.13.5 from source, and then using 1.13.5 to build the version of 1.12 I wanted

@allenhaozi
Copy link

@ianlancetaylor
Copy link
Contributor

At this point I don't think that anybody cares enough to address this (and I don't know how it could be addressed).

It is still possible to build Go 1.12 with earlier versions.

@ianlancetaylor ianlancetaylor closed this as not planned Won't fix, can't repro, duplicate, stale Dec 21, 2022
@golang golang locked and limited conversation to collaborators Dec 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

8 participants