mozilla / mozjpeg

Improved JPEG encoder.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mac OS X M1 pre-build test failed libpng

martiniert opened this issue · comments

mozjpeg compiling from source fails on Mac with M1 with the following message:
✖ Error: autoreconf -fiv && ./configure --disable-shared --prefix="/Users/marinakatic/Desktop/Raffiniert/insieme/node_modules/mozjpeg/vendor" --bindir="/Users/marinakatic/Desktop/Raffiniert/insieme/node_modules/mozjpeg/vendor" --libdir="/Users/marinakatic/Desktop/Raffiniert/insieme/node_modules/mozjpeg/vendor" && make --jobs=8 && make install --jobs=8 Command failed: make --jobs=8 ld: warning: ignoring file /opt/homebrew/Cellar/libpng/1.6.37/lib/libpng16.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 Undefined symbols for architecture x86_64 "_png_create_info_struct", referenced from: _start_input_png in cjpeg-rdpng.o ...

I tried using brew install automake autoconf libtool dpkg pkgconfig nasm libpng, but that doesn't help.

What am I missing?

It seems that your homebrew is for Intel macs. Or maybe reverse - your compiler is for Intel, and homebrew for ARM.

@kornelski any idea how to check/solve this?

Your compiler is for Intel (only?) and isn't building for ARM.