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

AWS CRT binary not present on linux-arm64/aws-crt-nodejs - Raspberry Pi 4+Ubuntu 20.10 Desktop #111

Closed
2 tasks done
rodriguesrenato opened this issue Nov 26, 2020 · 5 comments
Labels
dependencies This issue is a problem in a dependency. feature-request A feature should be added or improved.

Comments

@rodriguesrenato
Copy link

rodriguesrenato commented Nov 26, 2020

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Known Issue

  • I'm using ATS data type endpoint: the endpoint should look like <prefix>-ats.iot.<region>.amazonaws.com

Platform/OS/Hardware/Device
Raspberry Pi 4 with Ubuntu Desktop 20.10 Desktop

to simplify the tests I've made, I'm using the following one-line code in index.js:

var awsIot = require('aws-iot-device-sdk-v2');

package.json dependences:

 "dependencies": {
    "aws-crt": "^1.3.4",
    "aws-iot-device-sdk": "^2.2.6",
    "aws-iot-device-sdk-v2": "^1.3.3",
    "dotenv": "^8.2.0"
  }

project was created/installed both with yarn and npm, without errors.

Question/Bug?

I successfully ran my complete code with aws-iot-device-sdk-js-v2 on Ubuntu 18 - Laptop.

When I tried to run my code on a Raspberry Pi 4 with Ubuntu Desktop 20.10 Desktop, I got the following message:

/home/renato/projects/aws-iot-device-sdk-js-v2/node_modules/aws-crt/dist/native/binding.js:60
    throw new Error("AWS CRT binary not present in any of the following locations:\n\t" + search_paths.join('\n\t'));
    ^

Error: AWS CRT binary not present in any of the following locations:
        /home/renato/projects/aws-iot-device-sdk-js-v2/node_modules/aws-crt/dist/bin/native/aws-crt-nodejs
        /home/renato/projects/aws-iot-device-sdk-js-v2/node_modules/aws-crt/dist/bin/linux-arm64/aws-crt-nodejs
    at Object.<anonymous> (/home/renato/projects/aws-iot-device-sdk-js-v2/node_modules/aws-crt/dist/native/binding.js:60:11)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/home/renato/projects/aws-iot-device-sdk-js-v2/node_modules/aws-crt/dist/native/crt.js:22:35)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)

when I looked at the aws-iot-device-sdk-js-v2/node_modules/aws-crt/dist/bin/ folder, I could only find linux-x64,darwin-x64 and win32-x64 folders, nothing with arm64.

I investigated /node_modules/aws-crt/dist/native/binding.js but found no clues.

I've tried to clone the rep aws-iot-device-sdk-js-v2 in another folder and npm install, but the folder linux-arm64 wasnt created and I got the same error.

I suppose it is not compiling for linux-arm64.. there is a way to compile for linux-arm64? Could someone give me the instructions?

May I missed some steps during instalation?

@rodriguesrenato rodriguesrenato added guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Nov 26, 2020
@rodriguesrenato rodriguesrenato changed the title AWS CRT binary not present on linux-arm64/aws-crt-nodej - Raspberry Pi 4+Ubuntu 20.10 Desktop AWS CRT binary not present on linux-arm64/aws-crt-nodejs - Raspberry Pi 4+Ubuntu 20.10 Desktop Nov 26, 2020
@jmklix
Copy link
Member

jmklix commented Dec 3, 2020

As noted here we have added this to our backlog. I am going to change this to a feature request so the status of this can be updated when prebuilt binaries are added.

@jmklix jmklix added dependencies This issue is a problem in a dependency. feature-request A feature should be added or improved. and removed guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Dec 3, 2020
@rodriguesrenato
Copy link
Author

rodriguesrenato commented Dec 4, 2020

As noted here we have added this to our backlog. I am going to change this to a feature request so the status of this can be updated when prebuilt binaries are added.

Thanks for your feedback @jmklix and for add this feature on sdk, it will help a lot!

I've been trying to compile the aws-crt-nodejs dependence in the RaspberryPi4 with ubuntu Desktop with no success.. It aways crashes on the make of aws-crt, with an error related with libcrypto and zlib. Ive built both zlib and openssl from source with -fPIC and shared flags, but compiling aws-crt crashes at [100%]. If someone could guide me on how to build zlib, openssl and aws-crt properly I appreciate a lot too. If it will help, I can share the steps Ive done to compile aws-crt and error ive got.

@github-actions
Copy link

github-actions bot commented Dec 7, 2020

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@rodmaz
Copy link

rodmaz commented Jan 14, 2021

@rodriguesrenato Have you found a solution to this issue?

@bretambrose
Copy link
Contributor

Just a note on a closed issue: per [email protected] and [email protected] we now bundle pre-built linux aarch64 binaries. This hopefully addresses raspberry pi 4/3 issues. armv7a support will be more difficult and will need to come at a later date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies This issue is a problem in a dependency. feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

4 participants