Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2164

Unable to use go install with mongo driver for Go 1.17 onwards

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Blocker - P1 Blocker - P1
    • 1.7.3
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Not Needed

      I am trying to run the following command on my Linux machine before building my binary for the code that is shown below.

      The command I ran:

      ```

      go install -linkshared -buildmode=shared
      go.mongodb.org/mongo-driver/bson/ go.mongodb.org/mongo-driver/event/ go.mongodb.org/mongo-driver/mongo/options

      ```

      Since go 1.17+ I am not able to run the above command, as I always get the following error. I can't seem to understand what this error actually means and I am stuck at this.

       

      Error:

      ```

      1. go.mongodb.org/mongo-driver/vendor/github.com/klauspost/compress/zstd/internal/xxhash# go.mongodb.org/mongo-driver/vendor/github.com/klauspost/compress/zstd/internal/xxhashasm: xxhash_amd64.s:120: when dynamic linking, R15 is clobbered by a global variable access and is used here: 00092 (/usr/local/go/src/go.mongodb.org/mongo-driver/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_amd64.s:120) ADDQ R15, AXasm: assembly failed

      ```

       

      The code I want to build is attached here.

            Assignee:
            benji.rewis@mongodb.com Benji Rewis (Inactive)
            Reporter:
            subhanshu.25197@gmail.com Mukul N/A
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: