Skip to content

It fails to run on arm64 architecture because of sharp.node #49

@shawnguo2

Description

@shawnguo2

Hi,

With the "fix" mentioned in issue #48, I can successfully build rocket.chat image on arm64 architecture. But when trying to run the image, I got the following exception caused by sharp.node.

$ docker run --name rocketchat -p 80:3000 --env ROOT_URL=http://localhost --link db:db rocket.chat
Note: you are using a pure-JavaScript implementation of bcrypt.
While this implementation will work correctly, it is known to be
approximately three times slower than the native implementation.
In order to use the native implementation instead, run

  meteor npm install --save bcrypt

in the root directory of your application.
Will load cache for users
0 records load from users
Will load cache for rocketchat_room
0 records load from rocketchat_room
Will load cache for rocketchat_subscription
0 records load from rocketchat_subscription
Will load cache for rocketchat_settings
373 records load from rocketchat_settings
Updating process.env.MAIL_URL
Starting Email Intercepter...
Will load cache for rocketchat_permissions
0 records load from rocketchat_permissions
Will load cache for rocketchat_roles
0 records load from rocketchat_roles
Exception in callback of async function: Error: /app/bundle/programs/server/npm/node_modules/sharp/build/Release/sharp.node: cannot open shared object file: No such file or directory
    at Object.Module._extensions..node (module.js:681:18)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/app/bundle/programs/server/npm/node_modules/sharp/lib/constructor.js:10:15)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/app/bundle/programs/server/npm/node_modules/sharp/lib/index.js:3:15)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at npmRequire (/app/bundle/programs/server/npm-require.js:133:10)
    at Module.useNode (packages/modules-runtime.js:697:18)
    at fileEvaluate (packages/modules-runtime.js:342:20)
    at require (packages/modules-runtime.js:238:16)
    at FileUpload.js (packages/rocketchat:file-upload/server/lib/FileUpload.js:1:351)
    at fileEvaluate (packages/modules-runtime.js:343:9)
    at require (packages/modules-runtime.js:238:16)
    at /app/bundle/programs/server/packages/rocketchat_file-upload.js:2252:1
    at /app/bundle/programs/server/packages/rocketchat_file-upload.js:2266:3
    at /app/bundle/programs/server/boot.js:411:36
    at Array.forEach (<anonymous>)
    at /app/bundle/programs/server/boot.js:220:19
    at /app/bundle/programs/server/boot.js:471:5
    at Function.run (/app/bundle/programs/server/profile.js:510:12)
    at /app/bundle/programs/server/boot.js:470:11

The cause is that this sharp.node in meteor bundle is an x86-64 executable file.

$ file bundle/programs/server/npm/node_modules/sharp/build/Release/sharp.node
bundle/programs/server/npm/node_modules/sharp/build/Release/sharp.node: ELF 64-bit LSB  shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=f0b3b64efe073fbfdd69b6a2778eb95102b58431, stripped

It seems that we should build this sharp package from source rather than always having a x86-64 binary in there? Thanks.

Shawn

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions