ghostscript4js icon indicating copy to clipboard operation
ghostscript4js copied to clipboard

Usage with M1 / Apple Silicon

Open mitchellbusby opened this issue 3 years ago • 3 comments

Several members of my team (myself included) have been having issues with ghostscript4js on Apple Silicon Macs. Even when installed and configured (symlinked) correctly, we get the message: dyld[7981]: missing symbol called

I notice that this is not an issue with Ghostscript itself, but I suspect in the linker code between it and NodeJS.

I also notice in the npm postinstall logs that this is logged:

warning: ignoring file /usr/local/lib/libgs.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64

Has anyone else been able to reproduce this?

mitchellbusby avatar Feb 08 '22 00:02 mitchellbusby

Hi @mitchellbusby, could you try to use Node.js v16? Today after some debug I found that with M1 / Apple Silicon some cflags are set to -arch x86_64 instead of -arch arm64. Now I'm trying to find a solution to patch the binding.gyp file. The first version of Node.js that support Apple Silicon / M1 is Node.js v16. Please let me know if the switch to Node,js v16 or above solve the problem.

NickNaso avatar Feb 09 '22 16:02 NickNaso

Hi @NickNaso!

That's quite interesting! I have tried doing a clean node modules install under Node 16 (using 16.14 via nvm). That seems to have not resolved the issue 😓 I still get the issue:

dyld[28688]: missing symbol called

mitchellbusby avatar Feb 11 '22 00:02 mitchellbusby