Open john-terrell opened 2 years ago
@john-terrell
Running with the following env variable made the trick for me.
export CPPFLAGS="-DPNG_ARM_NEON_OPT=0"
or
CPPFLAGS="-DPNG_ARM_NEON_OPT=0" npm install imagemin-optipng --save-dev
For reference, I was able to install v6.0.0 without this flag.
Is this something that can be integrated into imagemin-optipng so devs don't have to figure this out the hard way? Several of our devs lost hours on this. A normal npm install worked on my M1 mac without any flags, but not on theirs. Thank you.
@john-terrell Running with the following env variable made the trick for me.
export CPPFLAGS="-DPNG_ARM_NEON_OPT=0"
orCPPFLAGS="-DPNG_ARM_NEON_OPT=0" npm install imagemin-optipng --save-dev
For reference, I was able to install v6.0.0 without this flag.
This one worked for me as well. I needed to run with the flag on my M1 in the lib version 8.0.0, using Node.js 14.20.0 on an application. Thanks!
On an Apple Silicon Mac:
$ npm install imagemin-optipng --save-dev
...
Undefined symbols for architecture arm64: npm ERR! "_png_init_filter_functions_neon", referenced from: npm ERR! _png_read_filter_row in libpng.a(pngrutil.o) npm ERR! ld: symbol(s) not found for architecture arm64