-
Notifications
You must be signed in to change notification settings - Fork 18k
build: run more buildmode=shared tests #16602
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
Comments
What's the the environment variable I can set? GO_GCFLAGS=...., GO_LDFLAGS=.... ? |
I don't think there's an environment variable that will do the job (yet). The standard library needs to be installed with -buildmode=shared, and then the binary built with -linkshared. Those are go binary flags, not compiler/linker flags. |
Looks like an environment variable already exists: $GO_FLAGS: make.bash does: CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd |
You can't install the standard library linked against itself though. On 5 August 2016 at 13:10, Brad Fitzpatrick [email protected]
|
I don't follow. Tell me what to do and I'll set up builder. |
Doing "cd src && ./make.bash && go install -buildmode=shared std && cd ../test && go run run.go -linkshared" would be one useful thing. I'm not sure if that's what @crawshaw meant, sorry for hijacking if not. |
@crawshaw, what command should the buildmode=shared builder run? |
Ideally the stdlib tests, against a dynamically linked stdlib:
As a bonus, what @mwhudson suggested:
This is mostly just adding the -linkshared flag to the usual tests, but cmd/dist has to call go install somewhere first. |
@quentinmit, any interest in setting up a new builder for this? |
@bradfitz I probably won't have cycles to do this before 1.8 ships. |
I'm guessing this won't happen until 1.9. |
I'd still like to do it, especially now that we have two more weeks. |
Ah, the release schedule shifted? Where should I look for it? |
@crawshaw I'm guessing it's https://groups.google.com/forum/#!topic/golang-dev/G09HaWfMl6g in golang-dev ML. |
Ping @crawshaw |
I don't really have time to fit this in before any deadline. @bradfitz were you going to look at it? If not, I guess we bump it to 1.9. |
It's not much work. I went to try the instructions above just locally, but they don't work. On the Go 1.8 release branch, the
|
@crawshaw, any tips? |
Sorry, my instructions were bad. (If you install a .so with a package in it, and then try to run the tests of that package, you don't have the extra symbols added by the _test.go files.) If you install the minimal .so of runtime and sync/atomic, then you can run the tests of every package other than runtime and sync/atomic. E.g.
Unfortunately that means the Interestingly the tests for package reflect fail. That may actually be a bug. |
I don't fully understand. What's the pseudo code English for what I should run? Foreach package $PKG in "std", install something (?), then |
Do the go install once, then for each package in std do go test.
…On Wed, Feb 8, 2017 at 5:24 PM Brad Fitzpatrick ***@***.***> wrote:
I don't fully understand.
What's the pseudo code English for what I should run?
Foreach package $PKG in "std", install something (?), then go test -short
-linkshared $PKG?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16602 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAJ2J31ltuEAKEgucC2an6sX29Xi3eesks5rakCLgaJpZM4JcnyH>
.
|
Um, it just hangs for me:
Process tree shows nothing interesting:
|
I also tried on |
I don't look at my pkg directory. I'm a little disgusted that |
Okay, it works now after nuking Is this the reflect error you saw?
|
Yes that's the reflect error. It might be real. We could give it its own issue. The pkg directory gets an extra workout with -buildmode=shared, .so files end up there. I agree it should just work, it's just that these newer build modes don't get enough eyes. |
Obsoleted by #47788 |
#16590 was found very late in the 1.7 cycle and would have been caught much earlier if standard library tests for buildmode=shared were being run somewhere.
The text was updated successfully, but these errors were encountered: