Termux-packages: Error: dlopen failed: cannot locate symbol "__atomic_fetch_add_4" referenced by

Created on 22 Jun 2020  路  5Comments  路  Source: termux/termux-packages

I install gulp-sass and node-sass
run gulp task.
when I start the gulp I get the following error.

[03:52:02] Requiring external module @babel/register
Error: dlopen failed: cannot locate symbol "__atomic_fetch_add_4" referenced by "/data/data/com.termux/files/home/core/node_modules/node-sass/vendor/android-arm-83/binding.node"...
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1250:18)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19)
at require (internal/modules/cjs/helpers.js:73:18)
at module.exports (/data/data/com.termux/files/home/core/node_modules/node-sass/lib/binding.js:19:10)
at Object. (/data/data/com.termux/files/home/core/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Module._compile (/data/data/com.termux/files/home/core/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] gulp.watch.slyle: gulp gulp.watch.style
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] gulp.watch.slyle script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /data/data/com.termux/files/home/.npm/_logs/2020-06-22T00_52_08_536Z-debug.log

on the computer, this code works.
Internet tips do not help.
How can I fix this error?

All 5 comments

Try reinstalling node-sass after running export LDFLAGS=-latomic, this type of error happens on arm for some codes. See https://github.com/termux/termux-packages/issues/3092

It is not working.

20-06-22T10_33_41_945Z-debug.log $ export LDFLAGS=-latomic $ npm run gulp.watch.slyle > [email protected] gulp.watch.slyle /data/data/com.termux/files/home/core > gulp gulp.watch.style [13:39:30] Requiring external module @babel/register Error: dlopen failed: cannot locate symbol "__atomic_fetch_add_4" referenced by "/data/data/com.termux/files/home/core/node_modules/node-sass/vendor/android-arm-83/binding.node"... at Object.Module._extensions..node (internal/modules/cjs/loader.js:1250:18) at Module.load (internal/modules/cjs/loader.js:1049:32) at Function.Module._load (internal/modules/cjs/loader.js:937:14) at Module.require (internal/modules/cjs/loader.js:1089:19) at require (internal/modules/cjs/helpers.js:73:18) at module.exports (/data/data/com.termux/files/home/core/node_modules/node-sass/lib/binding.js:19:10) at Object. (/data/data/com.termux/files/home/core/node_modules/node-sass/lib/index.js:14:35) at Module._compile (internal/modules/cjs/loader.js:1200:30) at Module._compile (/data/data/com.termux/files/home/core/node_modules/pirates/lib/index.js:99:24) at Module._extensions..js (internal/modules/cjs/loader.js:1220:10) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] gulp.watch.slyle: gulp gulp.watch.style npm ERR! Exit status 1
npm ERR! npm ERR! Failed at the [email protected] gulp.watch.slyle script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /data/data/com.termux/files/home/.npm/_logs/2020-06-22T10_39_36_342Z-debug.log $

npm run gulp.watch.slyle

Try reinstalling node-sass, as I said, rather than running gulp

Are you reinstalling modules from scratch or ./node_modules is already available? It looks like something is not being rebuilt.

You are hitting Android linker's dlopen issue https://github.com/android-ndk/ndk/issues/201, one or more dependencies are not linked with library providing symbol "__atomic_fetch_add_4".

Thanks.
I created flag
export LDFLAGS="-u__atomic_fetch_add_4 -latomic"
and node-sass to working

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Wetitpig picture Wetitpig  路  3Comments

loveablefellow007 picture loveablefellow007  路  3Comments

divyakutty picture divyakutty  路  3Comments

bkdwt picture bkdwt  路  3Comments

Cyb3rD3m0n picture Cyb3rD3m0n  路  3Comments