Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: weird problem with macports perl on apple m1/m2 based system

by trwww (Priest)
on Jun 12, 2023 at 17:37 UTC ( [id://11152814] : note . print w/replies, xml ) Need Help??


in reply to Re: weird problem with macports perl on apple m1/m2 based system
in thread weird problem with macports perl on apple m1/m2 based system

I didn't run your script because I installed p5-tk with MacPorts and got a display error, I think because I have to install xquartz and I'm not interested in doing that right now on this machine. I did just now run the below though, with a 5.34 perl installed via MacPorts on an M1 mac:

% uname -a Darwin ... 21.6.0 Darwin Kernel Version 21.6.0: Mon Apr 24 21:11:17 PD +T 2023; root:xnu-8020.240.18.701.5~1/RELEASE_ARM64_T6000 arm64 % perl -le 'print 12.99 * 16.25' 211.0875
  • Comment on Re^2: weird problem with macports perl on apple m1/m2 based system
  • Download Code

Replies are listed 'Best First'.
Re^3: weird problem with macports perl on apple m1/m2 based system
by perltux (Monk) on Jun 12, 2023 at 18:41 UTC
    I don't know about xquartz (as I said I don't own a Mac so I'm not familiar with what xquartz is), but you would have to install xorg from MacPorts like this:

    sudo port install xorg
    sudo port install p5-tk

    that's taken from the macOS installation instructions for my application, these instructions were written for me by another macOS user (with an Intel Mac though).
    http://obd-amigos.linuxtech.net/files/00-How_to_install_OBD_Amigos_on_macOS.html

    Since these are MacPorts packages, isn't it quite easy to uninstall them cleanly again after the test, if you have no need for them?

    Thanks for the one-liner test but unfortunately it's not as simple as that to trigger this issue, I also gave the user of my application a similar one-liner (but with eval) at first, without triggering the issue. I have a feeling that Tk is needed to trigger the issue.
      I have a feeling that Tk is needed to trigger the issue.

      You're saying that you feel it's a bug in Tk.
      If it is a bug in Tk, then I would think it's a bug that's being exposed by some specific rarity in the users perl configuration or system.

      In any case, I think the first thing to obtain and peruse is the perl -V output from the user's m1/m2 system.

      Cheers,
      Rob
        "I think the first thing to obtain and peruse is the perl -V output from the user's m1/m2 system"

        here you go:

        Summary of my perl5 (revision 5 version 34 subversion 1) configuration +: Platform: osname=darwin osvers=22.3.0 archname=darwin-thread-multi-2level uname='darwin venturaa.local 22.3.0 darwin kernel version 22.3.0: +mon jan 30 20:39:35 pst 2023; root:xnu-8792.81.3~2release_arm64_t8103 + arm64 ' config_args='-des -Dprefix=/opt/local -Dscriptdir=/opt/local/bin - +Dvendorprefix=/opt/local -Dusemultiplicity=y -Dusethreads -Duseshrpli +b -Dcc=/usr/bin/cc -Dman1ext=1pm -Dman3ext=3pm -Dinstallstyle=lib/per +l5 -Dman1dir=/opt/local/share/man/man1p -Dman3dir=/opt/local/share/ma +n/man3p -Dsitebin=/opt/local/libexec/perl5.34/sitebin -Dsiteman1dir=/ +opt/local/share/perl5.34/siteman/man1 -Dsiteman3dir=/opt/local/share/ +perl5.34/siteman/man3 -Dvendorbin=/opt/local/libexec/perl5.34 -Dvendo +rman1dir=/opt/local/share/perl5.34/man/man1 -Dvendorman3dir=/opt/loca +l/share/perl5.34/man/man3 -Dpager=/usr/bin/less -sR -Dperlpath=/opt/l +ocal/bin/perl5.34 -Dstartperl=#!/opt/local/bin/perl5.34 -Acppflags=-I +/opt/local/include -Accflags=-pipe -Os -Alddlflags=-L/opt/local/li +b -Wl,-headerpad_max_install_names -Aldflags=-L/opt/local/lib -Wl,- +headerpad_max_install_names ' hint=recommended useposix=true d_sigaction=define useithreads=define usemultiplicity=define use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define Compiler: cc='/usr/bin/cc' ccflags ='-fno-common -DPERL_DARWIN -pipe -Os -fno-strict-alias +ing -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUT +ENV' optimize='-O3' cppflags='-I/opt/local/include -fno-common -DPERL_DARWIN -pipe - +Os -fno-strict-aliasing -fstack-protector-strong -I/opt/local/inclu +de' ccversion='' gccversion='Apple LLVM 14.0.0 (clang-1400.0.29.202)' gccosandvers='' intsize=4 longsize=8 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=define longlongsize=8 d_longdbl=define longdblsize=8 longdblkind=0 ivtype='long' ivsize=8 nvtype='double' nvsize=8 Off_t='off_t' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='/usr/bin/cc' ldflags =' -L/opt/local/lib -Wl,-headerpad_max_install_names -f +stack-protector-strong' libpth=/opt/local/lib /Library/Developer/CommandLineTools/usr/lib/ +clang/14.0.0/lib /Library/Developer/CommandLineTools/SDKs/MacOSX13.1. +sdk/usr/lib /Library/Developer/CommandLineTools/usr/lib /usr/lib libs=-lgdbm perllibs= libc= so=dylib useshrplib=true libperl=libperl.dylib gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs dlext=bundle d_dlsymun=undef ccdlflags=' ' cccdlflags=' ' lddlflags=' -bundle -undefined dynamic_lookup -L/opt/local/lib -W +l,-headerpad_max_install_names -fstack-protector-strong' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_OP_PARENT PERL_PRESERVE_IVUV PERL_USE_SAFE_PUTENV USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API USE_THREAD_SAFE_LOCALE Built under darwin Compiled at Feb 24 2023 04:18:24 @INC: /opt/local/lib/perl5/site_perl/5.34/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.34 /opt/local/lib/perl5/vendor_perl/5.34/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.34 /opt/local/lib/perl5/5.34/darwin-thread-multi-2level /opt/local/lib/perl5/5.34

        I'm not really sure what to look for in this output, I see USE_LOCALE_NUMERIC among the active compile time options but that's also the case with the Perl on my Linux PC so that by itself should not be the cause of the issue.
        I will see if I can get that output but I haven't gotten any reply in almost a week to my last message to the macOS M1 the user of my application so I don't know if and when I will get it.
      Hi, I did do `sudo port install xorg` but got the same display error as earlier running your Tk program and didn't proceed installing additional dependencies, apologies.
        Did the display error appear even after a reboot? Maybe a reboot is needed to get it running.
        Sorry I don't know macOS therefore I can't really tell why the xorg server doesn't work on your Mac, thanks anyway for trying.