Uploaded image for project: 'Libmongocrypt'
  1. Libmongocrypt
  2. MONGOCRYPT-375

Building for macOS-x86_64 but attempting to link with file built for macOS-arm64 on mac m1

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Unknown Unknown
    • None
    • None
    • None

    Description

      Hey there, I don't see issues page, but i saw this PR about mac m1.
      I use Mac m1 12.0.1 monterey, and node@14.17.0 | darwin | x64.

      I successfully installed mongodb-client-encryption npm package. Now when i try to run my index.js where i require('mongodb-client-encryption"), it gives me following error in the terminal.

      Error: dlopen(/Users/ray/Desktop/crypt/cryptpad/database/node_modules/mongodb-client-encryption/build/Release/mongocrypt.node, 0x0001): tried: '/Users/ray/Desktop/crypt/cryptpad/database/node_modules/mongodb-client-encryption/build/Release/mongocrypt.node' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/mongocrypt.node' (no such file)

      When i tried to rebuild inside node_modules, env BUILD_TYPE="dynamic" npx node-gyp rebuild, it throws:

      Anyone knows how to resolve ? I followed the README of _https://github.com/mongodb/libmongocrypt/_ repo, but still same issue on mac M1

      Attachments

        Activity

          People

            Unassigned Unassigned
            rajugautam45@gmail.com Anon Decen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: