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

x/text : undefined #24473

Closed
nicolasStevenin opened this issue Mar 21, 2018 · 5 comments
Closed

x/text : undefined #24473

nicolasStevenin opened this issue Mar 21, 2018 · 5 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@nicolasStevenin
Copy link

nicolasStevenin commented Mar 21, 2018

Hello !

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

Go 1.10

Does this issue reproduce with the latest release?

yes, release 0.3.0

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

linux/amd64

What did you do?

Testing: "/builddir/build/BUILD/prometheus-2.2.1/_build/src/github.com/prometheus/prometheus/config"

  • GOPATH=/builddir/build/BUILD/prometheus-2.2.1/_build:/usr/share/gocode
  • go test -buildmode pie -compiler gc -ldflags '-extldflags '''-Wl,-z,relro ''''

What did you see ?

# golang.org/x/text/unicode/bidi
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:15:12: undefined: newBidiTrie
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:45:9: undefined: xorMasks
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:89:28: undefined: bidiValues
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:96:8: undefined: bidiIndex
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:106:8: undefined: bidiIndex
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:112:7: undefined: bidiIndex
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:122:8: undefined: bidiIndex
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:128:7: undefined: bidiIndex
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:134:7: undefined: bidiIndex
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:152:28: undefined: bidiValues
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:152:28: too many errors
# golang.org/x/text/unicode/norm
/usr/share/gocode/src/golang.org/x/text/unicode/norm/forminfo.go:132:20: undefined: firstMulti
/usr/share/gocode/src/golang.org/x/text/unicode/norm/forminfo.go:132:44: undefined: endMulti
/usr/share/gocode/src/golang.org/x/text/unicode/norm/forminfo.go:151:7: undefined: decomps
/usr/share/gocode/src/golang.org/x/text/unicode/norm/forminfo.go:153:9: undefined: decomps
/usr/share/gocode/src/golang.org/x/text/unicode/norm/trie.go:18:10: undefined: nfcSparseValues
/usr/share/gocode/src/golang.org/x/text/unicode/norm/trie.go:19:10: undefined: nfcSparseOffset
/usr/share/gocode/src/golang.org/x/text/unicode/norm/trie.go:23:10: undefined: nfkcSparseValues
/usr/share/gocode/src/golang.org/x/text/unicode/norm/trie.go:24:10: undefined: nfkcSparseOffset
/usr/share/gocode/src/golang.org/x/text/unicode/norm/trie.go:28:13: undefined: newNfcTrie
/usr/share/gocode/src/golang.org/x/text/unicode/norm/trie.go:29:13: undefined: newNfkcTrie
/usr/share/gocode/src/golang.org/x/text/unicode/norm/forminfo.go:153:9: too many errors
# golang.org/x/text/width
/usr/share/gocode/src/golang.org/x/text/width/transform.go:78:12: undefined: inverseData
/usr/share/gocode/src/golang.org/x/text/width/transform.go:161:12: undefined: inverseData
/usr/share/gocode/src/golang.org/x/text/width/transform.go:224:12: undefined: inverseData
/usr/share/gocode/src/golang.org/x/text/width/width.go:70:12: undefined: newWidthTrie
/usr/share/gocode/src/golang.org/x/text/width/width.go:117:10: undefined: inverseData
/usr/share/gocode/src/golang.org/x/text/width/width.go:129:10: undefined: inverseData
/usr/share/gocode/src/golang.org/x/text/width/width.go:141:10: undefined: inverseData

It happens when i try to test the prometheus project in version 2.2.1

Thanks for your help

@gopherbot gopherbot added this to the Unreleased milestone Mar 21, 2018
@bcmills
Copy link
Contributor

bcmills commented Mar 21, 2018

Those are all functions defined in one file but used in a different file in the same package.

That suggests two hypotheses, and some steps to test them:

  1. Some bad interaction between the compiler and the flags you are using (pie and/or relro).
    • What happens if you try go test without those flags?
  2. You are somehow missing some of the files.
    • How did you construct the …/x/text/… directories, and what files do they contain?
    • Are there x/text files in /builddir/build/BUILD/prometheus-2.2.1/_build too?

@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Mar 21, 2018
@nicolasStevenin
Copy link
Author

nicolasStevenin commented Mar 26, 2018

Hello,
For the first part,

What happens if you try go test without those flags

  • GOPATH=/builddir/build/BUILDROOT/prometheus-2.2.1-14.0.el7.llt.x86_64//usr/share/gocode:/usr/share/gocode
  • go test
# golang.org/x/text/unicode/bidi
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:15:12: undefined: newBidiTrie
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:45:9: undefined: xorMasks
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:89:28: undefined: bidiValues
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:96:8: undefined: bidiIndex
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:106:8: undefined: bidiIndex
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:112:7: undefined: bidiIndex
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:122:8: undefined: bidiIndex
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:128:7: undefined: bidiIndex
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:134:7: undefined: bidiIndex
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:152:28: undefined: bidiValues
/usr/share/gocode/src/golang.org/x/text/unicode/bidi/prop.go:152:28: too many errors
# golang.org/x/text/unicode/norm
/usr/share/gocode/src/golang.org/x/text/unicode/norm/forminfo.go:132:20: undefined: firstMulti
/usr/share/gocode/src/golang.org/x/text/unicode/norm/forminfo.go:132:44: undefined: endMulti
/usr/share/gocode/src/golang.org/x/text/unicode/norm/forminfo.go:151:7: undefined: decomps
/usr/share/gocode/src/golang.org/x/text/unicode/norm/forminfo.go:153:9: undefined: decomps
/usr/share/gocode/src/golang.org/x/text/unicode/norm/trie.go:18:10: undefined: nfcSparseValues
/usr/share/gocode/src/golang.org/x/text/unicode/norm/trie.go:19:10: undefined: nfcSparseOffset
/usr/share/gocode/src/golang.org/x/text/unicode/norm/trie.go:23:10: undefined: nfkcSparseValues
/usr/share/gocode/src/golang.org/x/text/unicode/norm/trie.go:24:10: undefined: nfkcSparseOffset
/usr/share/gocode/src/golang.org/x/text/unicode/norm/trie.go:28:13: undefined: newNfcTrie
/usr/share/gocode/src/golang.org/x/text/unicode/norm/trie.go:29:13: undefined: newNfkcTrie
/usr/share/gocode/src/golang.org/x/text/unicode/norm/forminfo.go:153:9: too many errors
# golang.org/x/text/width
/usr/share/gocode/src/golang.org/x/text/width/transform.go:78:12: undefined: inverseData
/usr/share/gocode/src/golang.org/x/text/width/transform.go:161:12: undefined: inverseData
/usr/share/gocode/src/golang.org/x/text/width/transform.go:224:12: undefined: inverseData
/usr/share/gocode/src/golang.org/x/text/width/width.go:70:12: undefined: newWidthTrie
/usr/share/gocode/src/golang.org/x/text/width/width.go:117:10: undefined: inverseData
/usr/share/gocode/src/golang.org/x/text/width/width.go:129:10: undefined: inverseData
/usr/share/gocode/src/golang.org/x/text/width/width.go:141:10: undefined: inverseData
FAIL    _/builddir/build/BUILD/prometheus-2.2.1/_build/src/github.com/prometheus/prometheus/config [build failed]

So... no changes apparently

@nicolasStevenin
Copy link
Author

nicolasStevenin commented Mar 26, 2018

And the 2nd part,

How did you construct the …/x/text/… directories, and what files do they contain?

We just create the same tree as you, so we use a macro %gobuildroot which sets up the build environment and creates the _bin directory
And each directory contains his own files.
I compare your files to mine diff -r text-ab48842968a66deafa354805a8b031924668e059/ my-golang-x-text/ > log.log

Only in text-ab48842968a66deafa354805a8b031924668e059/: AUTHORS
Only in text-ab48842968a66deafa354805a8b031924668e059/cases: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/cases: gen_trieval.go
Only in text-ab48842968a66deafa354805a8b031924668e059/cases: icu.go
Only in text-ab48842968a66deafa354805a8b031924668e059/cases: icu_test.go
Only in text-ab48842968a66deafa354805a8b031924668e059/cases: tables9.0.0.go
Only in text-ab48842968a66deafa354805a8b031924668e059/cases: tables9.0.0_test.go
Only in text-ab48842968a66deafa354805a8b031924668e059/cmd/gotext: examples
Only in text-ab48842968a66deafa354805a8b031924668e059/: codereview.cfg
Only in text-ab48842968a66deafa354805a8b031924668e059/collate: maketables.go
Only in text-ab48842968a66deafa354805a8b031924668e059/collate/tools/colcmp: darwin.go
Only in text-ab48842968a66deafa354805a8b031924668e059/collate/tools/colcmp: icu.go
Only in text-ab48842968a66deafa354805a8b031924668e059/collate/tools/colcmp: Makefile
Only in text-ab48842968a66deafa354805a8b031924668e059/: CONTRIBUTORS
Only in text-ab48842968a66deafa354805a8b031924668e059/currency: gen_common.go
Only in text-ab48842968a66deafa354805a8b031924668e059/currency: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/date: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/encoding/charmap: maketables.go
Only in text-ab48842968a66deafa354805a8b031924668e059/encoding/htmlindex: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/encoding/ianaindex: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/encoding/internal/identifier: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/encoding/japanese: maketables.go
Only in text-ab48842968a66deafa354805a8b031924668e059/encoding/korean: maketables.go
Only in text-ab48842968a66deafa354805a8b031924668e059/encoding/simplifiedchinese: maketables.go
Only in text-ab48842968a66deafa354805a8b031924668e059/encoding: testdata
Only in text-ab48842968a66deafa354805a8b031924668e059/encoding/traditionalchinese: maketables.go
Only in text-ab48842968a66deafa354805a8b031924668e059/feature/plural: gen_common.go
Only in text-ab48842968a66deafa354805a8b031924668e059/feature/plural: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/: .gitattributes
Only in text-ab48842968a66deafa354805a8b031924668e059/: .gitignore
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/cldrtree: testdata
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/export/idna: gen9.0.0_test.go
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/export/idna: gen_common.go
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/export/idna: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/export/idna: gen_trieval.go
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/export/idna: idna9.0.0.go
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/export/idna: idna9.0.0_test.go
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/export/idna: tables9.0.0.go
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/export: README
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/language/compact: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/language/compact: gen_index.go
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/language/compact: gen_parents.go
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/language: gen_common.go
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/language: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/number: gen_common.go
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/number: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/testtext: gccgo.go
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/testtext: go1_6.go
Only in text-ab48842968a66deafa354805a8b031924668e059/internal/triegen: gen_test.go
Only in text-ab48842968a66deafa354805a8b031924668e059/language/display: maketables.go
Only in text-ab48842968a66deafa354805a8b031924668e059/language: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/language: go1_1.go
Only in text-ab48842968a66deafa354805a8b031924668e059/language: testdata
Only in text-ab48842968a66deafa354805a8b031924668e059/: LICENSE
Only in text-ab48842968a66deafa354805a8b031924668e059/message/catalog: gopre19.go
Only in text-ab48842968a66deafa354805a8b031924668e059/message/pipeline: testdata
Only in text-ab48842968a66deafa354805a8b031924668e059/: PATENTS
Only in text-ab48842968a66deafa354805a8b031924668e059/secure/bidirule: bidirule9.0.0.go
Only in text-ab48842968a66deafa354805a8b031924668e059/secure/bidirule: bidirule9.0.0_test.go
Only in text-ab48842968a66deafa354805a8b031924668e059/secure/precis: enforce9.0.0_test.go
Only in text-ab48842968a66deafa354805a8b031924668e059/secure/precis: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/secure/precis: gen_trieval.go
Only in text-ab48842968a66deafa354805a8b031924668e059/secure/precis: tables9.0.0.go
Only in text-ab48842968a66deafa354805a8b031924668e059/unicode/bidi: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/unicode/bidi: gen_ranges.go
Only in text-ab48842968a66deafa354805a8b031924668e059/unicode/bidi: gen_trieval.go
Only in text-ab48842968a66deafa354805a8b031924668e059/unicode/bidi: tables9.0.0.go
Only in text-ab48842968a66deafa354805a8b031924668e059/unicode/cldr: makexml.go
Only in text-ab48842968a66deafa354805a8b031924668e059/unicode/norm: data9.0.0_test.go
Only in text-ab48842968a66deafa354805a8b031924668e059/unicode/norm: forminfo_test.go
Only in text-ab48842968a66deafa354805a8b031924668e059/unicode/norm: maketables.go
Only in text-ab48842968a66deafa354805a8b031924668e059/unicode/norm: tables9.0.0.go
Only in text-ab48842968a66deafa354805a8b031924668e059/unicode/norm: triegen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/unicode/rangetable: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/unicode/rangetable: tables9.0.0.go
Only in text-ab48842968a66deafa354805a8b031924668e059/unicode/runenames: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/unicode/runenames: tables9.0.0.go
Only in text-ab48842968a66deafa354805a8b031924668e059/width: gen_common.go
Only in text-ab48842968a66deafa354805a8b031924668e059/width: gen.go
Only in text-ab48842968a66deafa354805a8b031924668e059/width: gen_trieval.go
Only in text-ab48842968a66deafa354805a8b031924668e059/width: tables9.0.0.go

Are there x/text files in /builddir/build/BUILD/prometheus-2.2.1/_build too?

No we remove them

@bcmills
Copy link
Contributor

bcmills commented Mar 26, 2018

We just create the same tree as you, so we use a macro %gobuildroot which sets up the build environment and creates the _bin directory
And each directory contains his own files.

From the diff you posted it looks like you are missing files. It seems likely that the problem is in your %gobuildroot macro.

If you believe this is a problem in the Go toolchain itself, please post steps that we can follow ourselves to reproduce it.

@nicolasStevenin
Copy link
Author

Yes ! In fact, some missing files are important and my %gobuildroot macro didn't work properly. It's OK now

Thanks

@golang golang locked and limited conversation to collaborators Mar 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants