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

Error: dlopen failed: cannot locate symbol "__atomic_fetch_add_4" referenced by #5432

Closed
zababurinsv opened this issue Jun 22, 2020 · 5 comments

Comments

@zababurinsv
Copy link

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?

@zababurinsv zababurinsv changed the title 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"... Error: dlopen failed: cannot locate symbol "__atomic_fetch_add_4" referenced by Jun 22, 2020
@Grimler91
Copy link
Member

Try reinstalling node-sass after running export LDFLAGS=-latomic, this type of error happens on arm for some codes. See #3092

@zababurinsv
Copy link
Author

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 $

@Grimler91
Copy link
Member

npm run gulp.watch.slyle

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

@ghost
Copy link

ghost commented Jun 22, 2020

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 android/ndk#201, one or more dependencies are not linked with library providing symbol "__atomic_fetch_add_4".

@zababurinsv
Copy link
Author

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

@ghost ghost locked and limited conversation to collaborators Oct 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants