in reply to Re^7: Perl Tk on a Mac
in thread Perl Tk on a Mac

I was able to skip the two failing tests, too, and install Tk. A small app with a single button worked fine, but the app I needed to run uses PNG images and crashes with a SIGSEGV in the same way as the two tests. I have no idea how to fix that.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^9: Perl Tk on a Mac
by bliako (Abbot) on Mar 22, 2025 at 17:51 UTC

    I am not sure if Tk provides its own libpng or it relies on system-wide-installed libpng. If the case is the latter, then:

    It could be that since apple likes to use its own outdated/modified libraries, it uses its own libpng too which it placed somewhere where the linker finds it first and links with it during Tk compilation which crashes your program. You could perhaps find out what libpng is linked against Tk and where its location is. Perhaps with strace mytkapp? Alternatively observe during the configure stage of the PNG component of Tk, the location of the found libpng.

    Your next step would be to install your own libpng and then mess with the configure of the Makefile of the PNG component of Tk so that it is this one which gets linked instead of the system-wide one. You will want to link statically unless you want to mess with LD_LIBRARY_PATH / DYLD_LIBRARY_PATH (not recommended).

      I might try that next time the client comes. I might also try to persuade my boss I need a Mac myself. But if anyone already having a Mac tried and described their path, I'd be grateful.

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

        be careful what you wish, IMO osx is not what it used to be, but mac still is amazingly good hardware.