lifepillar / homebrew-appleii

Homebrew formulae for anything related to Apple I, Apple II, Apple ///, and Apple IIGS emulators.
53 stars 5 forks source link

Lisaem fails to compile on Sonoma M1 (Undefined symbols: _png_init_filter_functions_neon) #35

Open Minisector opened 10 months ago

Minisector commented 10 months ago

Hi there, I tried to install Lisaem with "brew install lisaem" and I get this:

==> Downloading https://formulae.brew.sh/api/formula.jws.json
######################################################################################################################## 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
######################################################################################################################## 100.0%
Warning: Treating lisaem as a formula. For the cask, use lifepillar/appleii/lisaem
==> Fetching lifepillar/appleii/lisaem
==> Downloading https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.3/wxWidgets-3.1.3.tar.bz2
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/1764646/5b586200-f8ec-11e9-96
######################################################################################################################## 100.0%
==> Downloading https://lisaem.sunder.net/downloads/lisaem-1.2.7-RC3a-2020.08.24-src.tar.xz
######################################################################################################################## 100.0%
==> Installing lisaem from lifepillar/appleii
==> ./build-wx3.1.2-modern-macosx.sh
==> ./build.sh build --quiet --no-upx --prefix=/opt/homebrew/Cellar/lisaem/1.2.7-2020.08.24
Last 15 lines from /Users/francescolecca/Library/Logs/Homebrew/lisaem/02.build.sh:
ld: warning: object file (/private/tmp/lisaem-20231030-9502-2ytatn/wxWidgets/lib/libwxzlib-3.1.a[12](wxzlib_inflate.o)) was built for newer 'macOS' version (14.1) than being linked (14.0)
ld: warning: object file (/private/tmp/lisaem-20231030-9502-2ytatn/wxWidgets/lib/libwxzlib-3.1.a[13](wxzlib_inftrees.o)) was built for newer 'macOS' version (14.1) than being linked (14.0)
ld: warning: object file (/private/tmp/lisaem-20231030-9502-2ytatn/wxWidgets/lib/libwxzlib-3.1.a[14](wxzlib_trees.o)) was built for newer 'macOS' version (14.1) than being linked (14.0)
ld: warning: object file (/private/tmp/lisaem-20231030-9502-2ytatn/wxWidgets/lib/libwxzlib-3.1.a[16](wxzlib_zutil.o)) was built for newer 'macOS' version (14.1) than being linked (14.0)
ld: **Undefined symbols:
  _png_init_filter_functions_neon**, referenced from:
      _wx_png_read_filter_row in libwxpng-3.1.a[10](wxpng_pngrutil.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
see: /tmp/slot.36219.35.sh /tmp/slot.36219.35.sh.failed for details
failed command was: clang++ -m64 -o bin/LisaEm obj/floppy.o obj/profile.o obj/unvars.o obj/vars.o obj/glue.o obj/fliflo_queue.o obj/cops.o obj/zilog8530.o obj/via6522.o obj/irq.o obj/mmu.o obj/rom.o obj/romless.o obj/memory.o obj/symbols.o obj/lisaem_wx.o obj/LisaConfig.o obj/LisaConfigFrame.o obj/LisaSkin.o obj/hq3x-3x.o obj/imagewriter-wx.o src/lib/libGenerator/lib/libGenerator.a src/lib/libdc42/lib/libdc42.a -lstdc++ -L/private/tmp/lisaem-20231030-9502-2ytatn/lisaem-1.2.7/../wxWidgets/lib -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL /private/tmp/lisaem-20231030-9502-2ytatn/lisaem-1.2.7/../wxWidgets/lib/libwx_osx_cocoau-3.1.a -framework WebKit -lwxtiff-3.1 -lwxjpeg-3.1 -lwxpng-3.1 -lwxregexu-3.1 -lwxscintilla-3.1 -lwxzlib-3.1 -framework Security -lpthread -liconv
from: /private/tmp/lisaem-20231030-9502-2ytatn/lisaem-1.2.7
---------------------------------------------------------------

/private/tmp/lisaem-20231030-9502-2ytatn/lisaem-1.2.7/waitq: Aborted due to a failed job! See /private/tmp/lisaem-20231030-9502-2ytatn/lisaem-1.2.7/obj/build-warnings.txt
* Exiting

I searched online and it looks like it's a common problem on Apple Silicon. I also tried to: export CPPFLAGS="-DPNG_ARM_NEON_OPT=0" before trying to install, to no avail. Thanks!

lifepillar commented 10 months ago

Thanks for reporting! While this is fixed (I may take a look, but @EricFromCanada knows better), you may try the cask with brew install --cask lisaem. I've seen that it crashes upon quitting: please report any other issues.

Minisector commented 10 months ago

Hi, the cask installs just fine, thank you.