Closed jlarmstrongiv closed 1 year ago
@jlarmstrongiv hey!
You need to either upgrade to GCC-12 or disable the SimSIMD USEARCH_USE_SIMSIMD=0
option.
Thank you @ashvardanian
Unfortunately, the version of GCC is tied to the Amazon Linux 2 operating system.
I will try using the option and report back!
@jlarmstrongiv, are you sure? I'd definitely recommend upgrading the compiler over disabling explicit SIMD-acceleration. You can also try defining a macro in bindings.gyp
: SIMSIMD_TARGET_X86_AVX512=0
, disabling only AVX-512 acceleration and keeping AVX2.
That worked! Thank you @ashvardanian
That’s one of the quickest bug fixes I’ve experienced in a while 🚀
@ashvardanian oops, I ran the wrong command, I still have a build error with USEARCH_USE_SIMSIMD=0
@ashvardanian
unfortunately, I am unable to to use a different environment.
amazonlinux:2023 will be released hopefully before the end of the year 😂 but until then I’m stuck
I also received an error with the other flag SIMSIMD_TARGET_X86_AVX512=0
Your macro isn't being passed. Try changing it in the bindings.gyp here.
@ashvardanian is there a way to do that with a flag or environment variable? It builds right away, so there’s not really a gap between the npm install usearch@2.8.6
and the error
Would you recommend forking the repo to change that value?
@ashvardanian I forked and changed that value, but still have an error
@jlarmstrongiv, that's not the same error. You've skipped the very first step of procedure - pulling the GIT submodules. Please try that way, and let's think of a way of controlling this setting without forking 😄
@ashvardanian
I think I’ve jumped too far ahead. My goal is to be able to install usearch
on Amazon Linux 2.
Without building for Amazon Linux 2 specifically, I will be unable to run the node c++ bindings.
Some libraries, like sharp, provide prebuilt binaries for AWS Lambda. Others, like hnswlib-node
do not provide prebuilt binaries, but will build if using the --build-from-source
flag with their required build dependencies (like like gcc-c++
, python3
, etc.)
To build usearch for AWS Lambda, I am:
npm init -y
public.ecr.aws/lambda/nodejs:18-x86_64
yum install tar git python3 cmake gcc-c++ -y && yum groupinstall "Development Tools" -y
npm install --build-from-source usearch@2.8.6
Initially, I couldn’t find a way to change the flags without forking, but it appears I can pass them in as npm flags like npm install --USEARCH_USE_SIMSIMD=0 --SIMSIMD_TARGET_X86_AVX512=0 --build-from-source usearch@2.8.6
.
I’m not really sure how I would pull the git submodules during the npm install --build-from-source usearch@2.8.6
?
Unfortunately, I’m still running into an error though.
Using just SIMSIMD_TARGET_X86_AVX512=0
results in this error
:tada: This issue has been resolved in version 2.8.7 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Great catch, @jlarmstrongiv! Check the refreshed version, should be arriving at NPM in a minute 😄
@ashvardanian would you re-open this issue? While I think the submodules are part of the puzzle, I’m still getting an error
To see what’s installed, the npm code tab is helpful
Perhaps git init && git submodule add …
needs to be run? (note that &&
only works on unix, not windows)
@jlarmstrongiv are you by any chance on our Discord? I believe it would be faster to setup a quick call and fix this together 🤗
Describe the bug
Cannot build a version of usearch@2.8.6 for AWS Lambda
public.ecr.aws/lambda/nodejs:18-x86_64
Steps to reproduce
npm init -y
docker run --entrypoint /bin/bash -v $PWD:/var/task --rm public.ecr.aws/lambda/nodejs:18-x86_64 -c npm install -g npm@10.2.3 && yum install tar git python3 make gcc-c++ -y && yum groupinstall "Development Tools" -y && npm install --build-from-source usearch@2.8.6
Expected behavior
Build passes
USearch version
2.8.6
Operating System
Amazon Linux 2
Hardware architecture
x86
Which interface are you using?
Other bindings
Contact Details
No response
Is there an existing issue for this?
Code of Conduct