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

ABI issue with go1.22 #820

Closed
chenrui333 opened this issue Dec 20, 2023 · 9 comments · Fixed by #822
Closed

ABI issue with go1.22 #820

chenrui333 opened this issue Dec 20, 2023 · 9 comments · Fixed by #822

Comments

@chenrui333
Copy link

What version of Garble and Go are you using?

latest garble
go 1.22rc1

What environment are you running Garble on?

happens on all environments, see this action run, https://github.com/chenrui333/garble/actions/runs/7280828786/job/19840079094

What did you do?

setup go 1.22rc1 and run go test --race -timeout=20m ./...

What did you expect to see?

pass the tests

What did you see instead?

tests failed

--- FAIL: TestScript (0.15s)
    --- FAIL: TestScript/ldflags (19.05s)
        testscript.go:534: # Note the proper domain, since the dot adds an edge case.
            #
            # Also note that there are three forms of -X allowed:
            #
            #   -X=name=value
            #   -X name=value
            #   -X "name=value" (or with single quotes, allows spaces in value) ([19](https://github.com/chenrui333/garble/actions/runs/7280828786/job/19840079094#step:6:20).049s)
            > env LDFLAGS='-X=main.unexportedVersion=v1.22.33 -X=main.replacedWithEmpty= -X "main.replacedWithSpaces= foo bar " -X=domain.test/main/imported.ExportedUnset=garble_replaced -X=domain.test/missing/path.missingVar=value -X=main.someType=notAVariable'
            > exec garble build -ldflags=${LDFLAGS}
            [stderr]
            # internal/chacha8rand
            $WORK/.tmp/garble-shared75670532/OsogyD_oW/Ib6vi6Lf.s:55: ABI selector only permitted when compiling runtime, reference was to "OsogyD_oW.zA5rHYMs"
            asm: assembly of $WORK/.tmp/garble-shared75670532/OsogyD_oW/Ib6vi6Lf.s failed
            exit status 1
            exit status 1
            [exit status 1]
            FAIL: testdata/script/ldflags.txtar:10: unexpected command failure
            
    --- FAIL: TestScript/syntax (19.46s)
        testscript.go:534: > exec garble build
            [stderr]
            # internal/chacha8rand
            $WORK/.tmp/garble-shared2415[20](https://github.com/chenrui333/garble/actions/runs/7280828786/job/19840079094#step:6:21)8593/OsogyD_oW/Ib6vi6Lf.s:55: ABI selector only permitted when compiling runtime, reference was to "OsogyD_oW.zA5rHYMs"
            asm: assembly of $WORK/.tmp/garble-shared[24](https://github.com/chenrui333/garble/actions/runs/7280828786/job/19840079094#step:6:25)15208593/OsogyD_oW/Ib6vi6Lf.s failed
            exit status 1
            exit status 1
            [exit status 1]
            FAIL: testdata/script/syntax.txtar:1: unexpected command failure

relates to Homebrew/homebrew-core#157782

@lu4p
Copy link
Member

lu4p commented Dec 21, 2023

Interesting to know that someone made a homebrew package.

@chenrui333
Copy link
Author

Interesting to know that someone made a homebrew package.

why not? what is the concern?

@lu4p
Copy link
Member

lu4p commented Dec 21, 2023

There is no concern I just didn't know.

mvdan added a commit to mvdan/garble-fork that referenced this issue Dec 24, 2023
In early December, a new internal package linknamed from runtime
was introduced, internal/chacha8rand. Re-generate the tables.

Note that due to the same group of CLs and refactors,
math/rand and net are no longer linknamed from runtime in Go 1.22.
They are still in Go 1.21, so keep those entries around for now.
We can remove math/rand/v2, as it doesn't yet exist in 1.21.

Fixes burrowers#820.
@lu4p lu4p closed this as completed in #822 Dec 25, 2023
lu4p pushed a commit that referenced this issue Dec 25, 2023
In early December, a new internal package linknamed from runtime
was introduced, internal/chacha8rand. Re-generate the tables.

Note that due to the same group of CLs and refactors,
math/rand and net are no longer linknamed from runtime in Go 1.22.
They are still in Go 1.21, so keep those entries around for now.
We can remove math/rand/v2, as it doesn't yet exist in 1.21.

Fixes #820.
@chenrui333
Copy link
Author

Cool cool, thanks for the quick fix!

@stefanb
Copy link

stefanb commented Dec 27, 2023

Tnx for the fix, but to get it to homebrew this still needs to be tagged / released in the 0.12.0 or higher sometime before Go 1.22.0 is released (scheduled for February).

@mvdan
Copy link
Member

mvdan commented Dec 27, 2023

We did a release just three weeks ago. We can do another in a few weeks. If you're packaging a Go pre-release, you can package garble master.

@stefanb
Copy link

stefanb commented Dec 27, 2023

Go 1.22 is scheduled to be released in February, so few weeks from now should still be ok.

@stefanb
Copy link

stefanb commented Feb 6, 2024

@mvdan Go 1.22 is released

@mvdan
Copy link
Member

mvdan commented Feb 8, 2024

See #828. We uncovered a GOOS=darwin bug with Go 1.22, hence a slight delay with the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

4 participants