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

Import google.golang.org/grpc fails #253

Open
ChristianKniep opened this issue Jul 27, 2022 · 2 comments
Open

Import google.golang.org/grpc fails #253

ChristianKniep opened this issue Jul 27, 2022 · 2 comments
Assignees
Labels

Comments

@ChristianKniep
Copy link

When importing import "google.golang.org/grpc" I get this.

error loading plugin "/go/src/gomacro.imports/gomacro_pid_9/import_7/import_7.so": 
  plugin.Open("/go/src/gomacro.imports/gomacro_pid_9/import_7/import_7"): 
    plugin was built with a different version of package google.golang.org/grpc/metadata
@cosmos72
Copy link
Member

cosmos72 commented Aug 14, 2022

The bug is confirmed - I am getting a slightly different error from import "google.golang.org/grpc",
but it still fails:

error loading plugin "/home/max/go/src/gomacro.imports/gomacro_pid_29747/import_1/import_1.so":
  plugin.Open("/home/max/go/src/gomacro.imports/gomacro_pid_29747/import_1/import_1"):
    plugin was built with a different version of package internal/goarch

Looking at the dependencies of google.golang.org/grpc, I'd say it's a dependency version conflict:

  • gophernotes uses golang.org/x/sys version v0.0.0-20211117180635-dee7805ff2e1
  • importing google.golang.org/grpc pulls golang.org/x/sys version v0.0.0-20210119212857-b64e53b001e4

Unluckily, the import mechanism is not smart enough to resolve version conflicts between packages being imported (and their dependencies) and packages imported by a previous import or statically compiled in the main program.

@cosmos72 cosmos72 self-assigned this Aug 14, 2022
@cosmos72 cosmos72 added the bug label Aug 14, 2022
@cosmos72
Copy link
Member

cosmos72 commented Nov 3, 2023

Commit 5514204 fixes most errors while importing packages.

Some imports still fail, mostly due to version conflicts between gophernotes dependencies and dependencies of the package being imported.
The most common version conflict I found is:

 error loading plugin "[...]/import_1.so": plugin.Open("[...]/import_1"):
   plugin was built with a different version of package golang.org/x/text/transform

which happens really often: import "google.golang.org/grpc" fails with such error,
and import "gonum.org/v1/plot" fails with the same error too.

@sbinet any chance to remove the dependency from golang.org/x/text/transform in github.com/go-zeromq/zmq4, or at least update it?

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

No branches or pull requests

2 participants