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

XMLWordPrintableJSON

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

      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 (Inactive)
            Reporter:
            Mukul N/A
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: