question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running yarn install fails with error: ld: library not found for -lindy

See original GitHub issue

Note that the overall intent here is to be able to build the project to a .tgz file for use in a React Native app.

Hardware: Intel i7 MacBook Pro, M1 Mac Mini. Both running Big Sur. Steps

  1. git clone https://github.com/hyperledger/aries-framework-javascript
  2. yarn install yields the error (among other output): ld: library not found for -lindy

What I’ve tried: yarn install indy-sdk and yarn install rn-indy-sdk Note that if I use install, I get the error: error "install" has been replaced with "add" to add new dependencies. Run "yarn add indy-sdk" instead. Using yarn add indy-sdk or yarn add rn-indy-sdk both yield the same error from before: ld: library not found for -lindy

Full output here:

david@david aries-framework-javascript % yarn add indy-sdk    
yarn add v1.22.10
warning ../../package.json: No license field
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
error /Users/david/Desktop/aries-framework-javascript/node_modules/indy-sdk: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments: 
Directory: /Users/david/Desktop/aries-framework-javascript/node_modules/indy-sdk
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@4.0.0
gyp info using node@12.15.0 | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args   '/Users/david/Desktop/aries-framework-javascript/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/david/Desktop/aries-framework-javascript/node_modules/indy-sdk/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/david/Desktop/aries-framework-javascript/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/david/.node-gyp/12.15.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/david/.node-gyp/12.15.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/david/Desktop/aries-framework-javascript/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/david/.node-gyp/12.15.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/david/Desktop/aries-framework-javascript/node_modules/indy-sdk',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/indynodejs/src/indy.o
../src/indy.cc:234:24: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
                tuple->Set(0, Nan::New<v8::Number>(icb->handle0));
                       ^
/Users/david/.node-gyp/12.15.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/david/.node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/indy.cc:235:24: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
                tuple->Set(1, Nan::New<v8::Number>(icb->u32int0));
                       ^
/Users/david/.node-gyp/12.15.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/david/.node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/indy.cc:243:24: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
                tuple->Set(0, toJSString(icb->str0));
                       ^
/Users/david/.node-gyp/12.15.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/david/.node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/indy.cc:244:24: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
                tuple->Set(1, Nan::New<v8::Number>(icb->i64int0));
                       ^
/Users/david/.node-gyp/12.15.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/david/.node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/indy.cc:252:24: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
                tuple->Set(0, toJSString(icb->str0));
                       ^
/Users/david/.node-gyp/12.15.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/david/.node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/indy.cc:253:24: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
                tuple->Set(1, Nan::NewBuffer(icb->buffer0data, icb->buffer0len).ToLocalChecked());
                       ^
/Users/david/.node-gyp/12.15.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/david/.node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/indy.cc:258:24: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
                tuple->Set(0, toJSString(icb->str0));
                       ^
/Users/david/.node-gyp/12.15.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/david/.node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/indy.cc:259:24: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
                tuple->Set(1, toJSString(icb->str1));
                       ^
/Users/david/.node-gyp/12.15.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/david/.node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/indy.cc:264:24: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
                tuple->Set(0, toJSString(icb->str0));
                       ^
/Users/david/.node-gyp/12.15.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/david/.node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/indy.cc:265:24: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
                tuple->Set(1, toJSString(icb->str1));
                       ^
/Users/david/.node-gyp/12.15.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/david/.node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/indy.cc:266:24: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
                tuple->Set(2, Nan::New<v8::Number>(icb->timestamp0));
                       ^
/Users/david/.node-gyp/12.15.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/david/.node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/indy.cc:271:24: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
                tuple->Set(0, toJSString(icb->str0));
                       ^
/Users/david/.node-gyp/12.15.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/david/.node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/indy.cc:272:24: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
                tuple->Set(1, toJSString(icb->str1));
                       ^
/Users/david/.node-gyp/12.15.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/david/.node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/indy.cc:273:24: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
                tuple->Set(2, toJSString(icb->str2));
                       ^
/Users/david/.node-gyp/12.15.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/david/.node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
14 warnings generated.
  SOLINK_MODULE(target) Release/indynodejs.node
ld: library not found for -lindy
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/indynodejs.node] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/david/Desktop/aries-framework-javascript/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:223:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 20.3.0
gyp ERR! command "/usr/local/bin/node" "/Users/david/Desktop/aries-framework-javascript/node_modules/indy-sdk/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/david/Desktop/aries-framework-javascript/node_modules/indy-sdk
gyp ERR! node -v v12.15.0
gyp ERR! node-gyp -v v4.0.0
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
blu3bericommented, Apr 5, 2021

@shoebsd31 I made a gist for installing everything to work with AFJ. It was tested on the newest version of POP!_OS (debian based) Check it here!

1reaction
shoebsd31commented, Apr 6, 2021

Ah yeah that was my fault. Within the Indy-sdk you should cd into libindy.

My bad!

edit: I’ve updated the setup gist for debian based systems so you can follow that one (everything should be fine now).

that worked 😃 thanks !!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

READM.md: Update link and adding VSC workflow #41 - GitHub
I can only run using the following on visual studio #code: npm install ... ld: library not found for -lindy clang: error: linker...
Read more >
Linker issue: Providing custom LD_LIBRARY_PATH doesn't ...
So after having libindy library ready according to the step 5, I am trying to install indy-sdk NPM package. As the artefact is...
Read more >
Error: ld: library not found for -lPods with CocoaPods
My suspicion is that when you do pod install the install script expects a certain state (and can't handle things very effectively if...
Read more >
Document target-postgres error `ld: library not found for -lssl`
Running command git clone -q https://github.com/meltano/target-postgres.git /private/var/folders/4j/zyl4wgts2mdbvf22dfrngfrw0000gp/T/pip-req- ...
Read more >
Untitled
Region bank, Scorm 1.2 api not found, Festejos de enero en el mundo, ... Taverna cretekou yelp, Speartooth river shark, Failure to learn...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found