Graphicsmagick package binary broken on AMD systems.
Using Alpine linux docker image (node:12-alpine) apk install graphicsmagick Use the library to resize an image and it fails: traps: gm[24562] trap invalid opcode ip:7fa6c4553048 sp:7ffe4b7b46c8 error:0 [2934835.125412] in png.so[7fa6c4553000+1000] The host machine is ECS t3a: cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 23 model : 1 model name : AMD EPYC 7571 stepping : 2 microcode : 0x8001227 cpu MHz : 2199.636 cache size : 512 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 1 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid eagerfpu pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch topoext vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 clzero arat npt nrip_save bugs : fxsave_leak sysret_ss_attrs null_seg bogomips : 4399.27 TLB size : 2560 4K pages clflush size : 64 cache_alignment : 64 address sizes : 48 bits physical, 48 bits virtual power management: