Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run Perl universal binaries on macOS Catalina(10.15) #18734

Closed
Semab-Tariq opened this issue Apr 20, 2021 · 22 comments
Closed

Unable to run Perl universal binaries on macOS Catalina(10.15) #18734

Semab-Tariq opened this issue Apr 20, 2021 · 22 comments

Comments

@Semab-Tariq
Copy link

Hi there,

I am trying to build universal binaries for Perl with intel(x86_64) and arm64 support on macOS m1 machine.

Build part is done successfully and I have binaries with both of these architectures support

$ file ./perl
./perl: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
./perl (for architecture x86_64):	Mach-O 64-bit executable x86_64
./perl (for architecture arm64):	Mach-O 64-bit executable arm64

Issue

These binaries are working fine on this macOS m1 machine where I build them. But when I place these binaries on macOS Catalina(10.15) machine and try to check the Perl version I get few errors

In a default terminal session which is zsh

% ./perl -v
zsh: segmentation fault  ./perl -v

And in a bash session

bash-3.2$ ./perl -v
Segmentation fault: 11
bash-3.2$ 

Build details

  • Machine = macOS m1 (arm64)
  • Terminal session = Bash
  • Perl version = Perl-5.32.1
  • Configure command = $ LDFLAGS="-L/tmp/perl-test/lib" ./Configure -ders -Dcc=llvm-gcc -Dusethreads -Duseithreads -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -A ccflags=-DUSE_SITECUSTOMIZE -A ccflags=-DPERL_RELOCATABLE_INCPUSH -A ccflags=-Duselargefiles -Accflags="-arch x86_64 -arch arm64 -fno-merge-constants" -Aldflags="-arch x86_64 -arch arm64" -Duseshrplib -Dprefix=/tmp/perl-test -Dprivlib=/tmp/perl-test/lib -Darchlib=/tmp/perl-test/lib -Dsiteprefix=/tmp/perl-test/site -Dsitelib=/tmp/perl-test/site/lib -Dsitearch=/tmp/perl-test/site/lib

Now can someone please help me with some sort of solution?

Thanks.

@tonycoz
Copy link
Contributor

tonycoz commented Apr 27, 2021

Could you please attach the config.sh generated by Configure on the m1?

@Semab-Tariq
Copy link
Author

Hi @tonycoz
here is the file(config.sh) generated by Configure on m1 machine

@tonycoz
Copy link
Contributor

tonycoz commented Apr 28, 2021

Thanks.

Nothing leaps out at me when I compare it with an x86_64 config.sh, adding -Dmultiarch might fix the problem, but I doubt it.

Could you please get a backtrace of the crash? You might need to rebuild with -Doptimize='-O3 -g' (or -O0 -g) to get line numbers in the backtrace.

To do that, run the process under lldb:

$ lldb -- perl -v
...
(lldb) r
...
(some error from the crash)
(lldb) bt
(backtrace here)

Unfortunately the only Mac I have access to is an old Mac mini running 10.13.6, so I can't test your process myself.

@Semab-Tariq
Copy link
Author

Hi @tonycoz
I have tried to build with -Dmultiarch='arm64 x86_64' flag but no success. Anyways I think we are already specifying -Accflags="-arch x86_64 -arch arm64 flag in configure command so I don't think -Dmultiarch will make any difference.

Here are some crash details that you wish for

% ./perl -v
zsh: segmentation fault  ./perl -v

% lldb -- perl -v
(lldb) target create "perl"
Current executable set to '/tmp/perl-test/bin/perl' (x86_64).
(lldb) settings set -- target.run-args  "-v"
(lldb) r
Process 65909 launched: '/tmp/perl-test/bin/perl' (x86_64)
Process 65909 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
    frame #0: 0x000000010020f477 libperl.dylib`Perl_sv_vcatpvfn_flags + 11687
libperl.dylib`Perl_sv_vcatpvfn_flags:
->  0x10020f477 <+11687>: movq   (%rax), %rbx
    0x10020f47a <+11690>: movl   0xc(%rbx), %eax
    0x10020f47d <+11693>: movl   %eax, %ecx
    0x10020f47f <+11695>: andl   $0x200400, %ecx           ; imm = 0x200400 
Target 0: (perl) stopped.

(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
  * frame #0: 0x000000010020f477 libperl.dylib`Perl_sv_vcatpvfn_flags + 11687
    frame #1: 0x000000010020a81f libperl.dylib`Perl_vnewSVpvf + 239
    frame #2: 0x0000000100298396 libperl.dylib`PerlIO_vprintf + 70
    frame #3: 0x0000000100298509 libperl.dylib`PerlIO_printf + 137
    frame #4: 0x000000010014a750 libperl.dylib`S_minus_v + 64
    frame #5: 0x0000000100149ec0 libperl.dylib`Perl_moreswitches + 3200
    frame #6: 0x0000000100145966 libperl.dylib`perl_parse + 2502
    frame #7: 0x0000000100003de6 perl`main + 166
    frame #8: 0x00007fff6a61acc9 libdyld.dylib`start + 1
(lldb) 


@tonycoz
Copy link
Contributor

tonycoz commented Apr 30, 2021

I have tried to build with -Dmultiarch='arm64 x86_64' flag but no success.

It just needs -Dmultiarch no parameters, and the -Accflags="-arch x86_64 -arch arm64" that you already have.

Please also add -Doptimize=-O0 -g to get line numbers in the backtrace.

Given the instruction it crashes on, please also do:

register read 

in lldb after the crash

Thanks

@Semab-Tariq
Copy link
Author

@tonycoz

I get this error if i don't pass any parameter to -Dmultiarch
Skipping the try tests in the rest of Configure as no targethost was defined when cross-compiling

Full configure output

$ LDFLAGS="-L/tmp/perl-test/lib" ./Configure -ders -Dcc=llvm-gcc -Dusethreads -Duseithreads -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -A ccflags=-DUSE_SITECUSTOMIZE -A ccflags=-DPERL_RELOCATABLE_INCPUSH -A ccflags=-Duselargefiles -Accflags="-arch x86_64 -arch arm64 -fno-merge-constants" -Aldflags="-arch x86_64 -arch arm64" -Duseshrplib -Dprefix=/tmp/perl-test -Dprivlib=/tmp/perl-test/lib -Darchlib=/tmp/perl-test/lib -Dsiteprefix=/tmp/perl-test/site -Dsitelib=/tmp/perl-test/site/lib -Dsitearch=/tmp/perl-test/site/lib -Dmultiarch -Doptimize="-O0 -g"
First let's make sure your kit is complete.  Checking...

Would you like to see the instructions? [n]  
Locating common programs...
Checking compatibility between /bin/echo and builtin echo (if any)...
Symbolic links are supported.
Checking how to test for symbolic links...
You can test for symbolic links with 'test -h'.
Checking for cross-compile
Skipping the try tests in the rest of Configure as no targethost was defined when cross-compiling

@tonycoz
Copy link
Contributor

tonycoz commented May 6, 2021

Ok, please try getting the backtrace without setting -Dmultiarch and with -Doptimize="-O0 -g"

@Semab-Tariq
Copy link
Author

Hi @tonycoz

Here is. my new configure command from config.sh
configrue

config_arg0='./Configure'
config_args='-ders -Dcc=llvm-gcc -Dusethreads -Duseithreads -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -A ccflags=-DUSE_SITECUSTOMIZE -A ccflags=-DPERL_RELOCATABLE_INCPUSH -A ccflags=-Duselargefiles -Accflags=-arch x86_64 -arch arm64 -fno-merge-constants -Aldflags=-arch x86_64 -arch arm64 -Duseshrplib -Dprefix=/tmp/perl-test -Dprivlib=/tmp/perl-test/lib -Darchlib=/tmp/perl-test/lib -Dsiteprefix=/tmp/perl-test/site -Dsitelib=/tmp/perl-test/site/lib -Dsitearch=/tmp/perl-test/site/lib -Doptimize=-O0 -g'

Output

% lldb -- perl -v
(lldb) target create "perl"
Current executable set to '/tmp/perl-test/bin/perl' (x86_64).
(lldb) settings set -- target.run-args  "-v"
(lldb) r
Process 29798 launched: '/tmp/perl-test/bin/perl' (x86_64)
Process 29798 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
    frame #0: 0x00000001002db686 libperl.dylib`Perl_sv_vcatpvfn_flags + 7926
libperl.dylib`Perl_sv_vcatpvfn_flags:
->  0x1002db686 <+7926>: movq   (%rax), %rax
    0x1002db689 <+7929>: movq   %rax, -0x288(%rbp)
    0x1002db690 <+7936>: movq   -0x288(%rbp), %rax
    0x1002db697 <+7943>: movq   %rax, -0x290(%rbp)
Target 0: (perl) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
  * frame #0: 0x00000001002db686 libperl.dylib`Perl_sv_vcatpvfn_flags + 7926
    frame #1: 0x00000001002d679b libperl.dylib`Perl_sv_vsetpvfn + 139
    frame #2: 0x00000001002d6701 libperl.dylib`Perl_vnewSVpvf + 257
    frame #3: 0x00000001003b8ab9 libperl.dylib`PerlIO_vprintf + 73
    frame #4: 0x00000001003b8d0c libperl.dylib`PerlIO_printf + 380
    frame #5: 0x0000000100165414 libperl.dylib`S_minus_v + 100
    frame #6: 0x0000000100164536 libperl.dylib`Perl_moreswitches + 5686
    frame #7: 0x000000010015efd4 libperl.dylib`S_parse_body + 292
    frame #8: 0x000000010015e18b libperl.dylib`perl_parse + 1771
    frame #9: 0x0000000100003db8 perl`main + 200
    frame #10: 0x00007fff6a61acc9 libdyld.dylib`start + 1
    frame #11: 0x00007fff6a61acc9 libdyld.dylib`start + 1
(lldb) register read 
General Purpose Registers:
       rax = 0x00117e49d3f000a6
       rbx = 0x0000000000000000
       rcx = 0x00117e49d3f000ae
       rdx = 0x00117e49d3f000a6
       rdi = 0x0000000100706d90
       rsi = 0x0000000000000070
       rbp = 0x00007ffeefbfefb0
       rsp = 0x00007ffeefbfe560
        r8 = 0x00000000fffdffff
        r9 = 0x0000000000000002
       r10 = 0x0000000000000020
       r11 = 0x00000000001cd1ed
       r12 = 0x0000000000000000
       r13 = 0x0000000000000000
       r14 = 0x00117e49d3f000a6
       r15 = 0x0000000000000000
       rip = 0x00000001002db686  libperl.dylib`Perl_sv_vcatpvfn_flags + 7926
    rflags = 0x0000000000010202
        cs = 0x000000000000002b
        fs = 0x0000000000000000
        gs = 0x0000000000000000

(lldb) 

@hvds
Copy link
Contributor

hvds commented May 8, 2021

Not sure if this helps, but comparing those 4 lines of code with what I get here, I suspect we're getting the SEGV at the va_arg() read for '%-p' (ie SVf) at sv.c:12445:

    argsv = MUTABLE_SV(va_arg(*args, void*));
    eptr = SvPV_const(argsv, elen);
                    ...

.. hit by the call from perl.c:3805:

    PerlIO_printf(PIO_stdout,
        "\nThis is perl "       STRINGIFY(PERL_REVISION)
        ", version "            STRINGIFY(PERL_VERSION)
        ", subversion "         STRINGIFY(PERL_SUBVERSION)
        " (%" SVf ") built for "        ARCHNAME, SVfARG(level)
    );

@tonycoz
Copy link
Contributor

tonycoz commented May 11, 2021

Could you please:

  • show the config_argnumber lines from config.sh too? config_args doesn't show the grouping very well, it looks like the -g isn't making it into optimize, which you could also check in config.sh, and
  • do image list in lldb after the crash, to make sure the correct libperl.dylib is being loaded (but I think it's the -g that's the problem)

Thanks

@Semab-Tariq
Copy link
Author

Hi @tonycoz
Sorry for the late reply as I was on vacations

So I am not sure if this is what you said to show but here are config_arg numbers

: Configure command line arguments.
config_arg0='./Configure'
config_args='-ders -Dcc=llvm-gcc -Dusethreads -Duseithreads -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -A ccflags=-DUSE_SITECUSTOMIZE -A ccflags=-DPERL_RELOCATABLE_INCPUSH -A ccflags=-Duselargefiles -Accflags=-arch x86_64 -arch arm64 -fno-merge-constants -Aldflags=-arch x86_64 -arch arm64 -Duseshrplib -Dprefix=/tmp/perl-test -Dprivlib=/tmp/perl-test/lib -Darchlib=/tmp/perl-test/lib -Dsiteprefix=/tmp/perl-test/site -Dsitelib=/tmp/perl-test/site/lib -Dsitearch=/tmp/perl-test/site/lib -Doptimize=-O0 -g'
config_argc=23
config_arg1='-ders'
config_arg2='-Dcc=llvm-gcc'
config_arg3='-Dusethreads'
config_arg4='-Duseithreads'
config_arg5='-Uinstallusrbinperl'
config_arg6='-Ulocincpth='
config_arg7='-Uloclibpth='
config_arg8='-A'
config_arg9='ccflags=-DUSE_SITECUSTOMIZE'
config_arg10='-A'
config_arg11='ccflags=-DPERL_RELOCATABLE_INCPUSH'
config_arg12='-A'
config_arg13='ccflags=-Duselargefiles'
config_arg14='-Accflags=-arch x86_64 -arch arm64 -fno-merge-constants'
config_arg15='-Aldflags=-arch x86_64 -arch arm64'
config_arg16='-Duseshrplib'
config_arg17='-Dprefix=/tmp/perl-test'
config_arg18='-Dprivlib=/tmp/perl-test/lib'
config_arg19='-Darchlib=/tmp/perl-test/lib'
config_arg20='-Dsiteprefix=/tmp/perl-test/site'
config_arg21='-Dsitelib=/tmp/perl-test/site/lib'
config_arg22='-Dsitearch=/tmp/perl-test/site/lib'
config_arg23='-Doptimize=-O0 -g'

And image list output

(lldb) image list
[  0] 6AE564AA-2105-3ABA-9D3B-3230793565FD 0x0000000100000000 /tmp/perl-test/bin/perl 
[  1] 1D318D60-C9B0-3511-BE9C-82AFD2EF930D 0x0000000100010000 /usr/lib/dyld 
[  2] 78D5DB01-3026-3B29-B28B-81F8AC0803B2 0x0000000100115000 /tmp/perl-test/lib/CORE/libperl.dylib 
[  3] 0A6C8BA1-30FD-3D10-83FD-FF29E221AFFE 0x00007fff65f63000 /usr/lib/libSystem.B.dylib 
[  4] AF488D13-9E89-35E0-B078-BE37CC5B8586 0x00007fff68d60000 /usr/lib/system/libcache.dylib 
[  5] C7912BE5-993E-3581-B2A0-6AABDC8C5562 0x00007fff68d66000 /usr/lib/system/libcommonCrypto.dylib 
[  6] 49B8F644-5705-3F16-BBE0-6FFF9B17C36E 0x00007fff68d72000 /usr/lib/system/libcompiler_rt.dylib 
[  7] 3C481225-21E7-370A-A30E-0CCFDD64A92C 0x00007fff68d7a000 /usr/lib/system/libcopyfile.dylib 
[  8] 60567BF8-80FA-359A-B2F3-A3BAEFB288FD 0x00007fff68d84000 /usr/lib/system/libcorecrypto.dylib 
[  9] CD9C059C-91D9-30E8-8926-5B9CD0D5D4F5 0x00007fff68f23000 /usr/lib/system/libdispatch.dylib 
[ 10] 789A18C2-8AC7-3C88-813D-CD674376585D 0x00007fff68f64000 /usr/lib/system/libdyld.dylib 
[ 11] DB3337BE-01CA-3425-BD0C-87774FC0CDC0 0x00007fff68f9b000 /usr/lib/system/libkeymgr.dylib 
[ 12] AFBCBDD3-0B55-3ECD-8E04-A73A3A57356B 0x00007fff68fa9000 /usr/lib/system/liblaunch.dylib 
[ 13] AA613A9C-961A-3B67-B696-4622FA59FC4E 0x00007fff68faa000 /usr/lib/system/libmacho.dylib 
[ 14] F234E51D-FD0B-3EE4-B679-AE3EE9C536C3 0x00007fff68fb0000 /usr/lib/system/libquarantine.dylib 
[ 15] 7C7EFC79-BD24-33EF-B073-06AED234593E 0x00007fff68fb3000 /usr/lib/system/libremovefile.dylib 
[ 16] 1563EE02-0657-3B78-99BE-A947C24122EF 0x00007fff68fb5000 /usr/lib/system/libsystem_asl.dylib 
[ 17] 0D53847E-AF5F-3ACF-B51F-A15DEA4DEC58 0x00007fff68fcd000 /usr/lib/system/libsystem_blocks.dylib 
[ 18] BBDED5E6-A646-3EED-B33A-91E4331EA063 0x00007fff68fce000 /usr/lib/system/libsystem_c.dylib 
[ 19] 0EE84C33-64FD-372B-974A-AF7A136F2068 0x00007fff69056000 /usr/lib/system/libsystem_configuration.dylib 
[ 20] A199156E-058D-3ABB-BCE9-4B9F20DCED0F 0x00007fff6905a000 /usr/lib/system/libsystem_coreservices.dylib 
[ 21] 5B12B5DB-3F30-37C1-8ECC-49A66B1F2864 0x00007fff6905e000 /usr/lib/system/libsystem_darwin.dylib 
[ 22] EBB4C2C2-E031-3094-B40A-E67BF261D295 0x00007fff69067000 /usr/lib/system/libsystem_dnssd.dylib 
[ 23] 29FD922A-EC2C-3F25-BCCC-B58D716E60EC 0x00007fff6906f000 /usr/lib/system/libsystem_featureflags.dylib 
[ 24] 8A321605-5480-330B-AF9E-64E65DE61747 0x00007fff69071000 /usr/lib/system/libsystem_info.dylib 
[ 25] 00F331F1-0D09-39B3-8736-1FE90E64E903 0x00007fff690ec000 /usr/lib/system/libsystem_m.dylib 
[ 26] 8549294E-4C53-36EB-99F3-584A7393D8D5 0x00007fff69134000 /usr/lib/system/libsystem_malloc.dylib 
[ 27] F06C65C5-2CBE-313C-96E1-A09240F9FE57 0x00007fff6915c000 /usr/lib/system/libsystem_networkextension.dylib 
[ 28] FA22F928-D91B-3AA5-96BB-3186AC0FB264 0x00007fff6916a000 /usr/lib/system/libsystem_notify.dylib 
[ 29] 051C4018-4345-3034-AC98-6DE42FB8273B 0x00007fff69188000 /usr/lib/system/libsystem_sandbox.dylib 
[ 30] F80872AA-E1FD-3D7E-8729-467656EC6561 0x00007fff6918d000 /usr/lib/system/libsystem_secinit.dylib 
[ 31] A576A1CF-7726-3146-B04B-A26E1CDB9757 0x00007fff690bf000 /usr/lib/system/libsystem_kernel.dylib 
[ 32] 009A7C1F-313A-318E-B9F2-30F4C06FEA5C 0x00007fff69174000 /usr/lib/system/libsystem_platform.dylib 
[ 33] 62CB1A98-0B8F-31E7-A02B-A1139927F61D 0x00007fff6917d000 /usr/lib/system/libsystem_pthread.dylib 
[ 34] 5820A2AF-CE72-3AB3-ABCC-273A3419FB55 0x00007fff69190000 /usr/lib/system/libsystem_symptoms.dylib 
[ 35] 04B47629-847B-3D74-8ABE-C05EF9DEEFE4 0x00007fff69198000 /usr/lib/system/libsystem_trace.dylib 
[ 36] 42B7B509-BAFE-365B-893A-72414C92F5BF 0x00007fff691b0000 /usr/lib/system/libunwind.dylib 
[ 37] 3E243A41-030F-38E3-9FD2-7B38C66C35B1 0x00007fff691b6000 /usr/lib/system/libxpc.dylib 
[ 38] 6DF81160-5E7F-3E31-AA1E-C875E3B98AF6 0x00007fff67dc3000 /usr/lib/libobjc.A.dylib 
[ 39] E692F14F-C65E-303B-9921-BB7E97D77855 0x00007fff6629c000 /usr/lib/libc++abi.dylib 
[ 40] 59A8239F-C28A-3B59-B8FA-11340DC85EDC 0x00007fff66249000 /usr/lib/libc++.1.dylib 
(lldb) 

Thanks

@tonycoz
Copy link
Contributor

tonycoz commented May 24, 2021

I don't see why you don't get line number information.

Is there a reason you're using llvm-gcc instead of cc? (On my old mini both point at clang anyway)

I tried following up @hvds suggestion, but I could only see that being a problem if we had prototype mismatches between the caller and called code, which would produce compiler warnings, which you haven't mentioned.

I don't see a way for me to debug this any further without access to the hardware.

@Semab-Tariq
Copy link
Author

@tonycoz do you think we need to arrange a meeting? Where we can work on this issue in a screen share session?

@Semab-Tariq
Copy link
Author

Semab-Tariq commented Jul 8, 2021

Hi @tonycoz
Hope you are well

We are still stuck with this problem and I am attaching more build warnings this might help for debugging

clang: warning: optimization flag '-fno-merge-constants' is not supported [-Wignored-optimization-argument]
clang: warning: optimization flag '-fno-merge-constants' is not supported [-Wignored-optimization-argument]

Can you please help?

Thanks

@Semab-Tariq
Copy link
Author

Hi @tonycoz
One more thing that i noticed even though we are giving -macosx-version-min=10.14 in configure command but in build log I still see -mmacosx-version-min=11.0
@llvm-gcc -c -DPERL_CORE -fno-common -DPERL_DARWIN -no-cpp-precomp -mmacosx-version-min=11.0

Here is the configure command
LDFLAGS="-L/tmp/perl-test/lib -mmacosx-version-min=10.14" CFLAGS="-mmacosx-version-min=10.14" CPPFLAGS="-mmacosx-version-min=10.14" CXXFLAGS="-mmacosx-version-min=10.14" ./Configure -ders -Dcc=llvm-gcc -Dusethreads -Duseithreads -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -A ccflags=-DUSE_SITECUSTOMIZE -A ccflags=-DPERL_RELOCATABLE_INCPUSH -A ccflags=-Duselargefiles -Accflags="-arch x86_64 -arch arm64 -fno-merge-constants" -Aldflags="-arch x86_64 -arch arm64" -Duseshrplib -Dprefix=/tmp/perl-test -Dprivlib=/tmp/perl-test/lib -Darchlib=/tmp/perl-test/lib -Dsiteprefix=/tmp/perl-test/site -Dsitelib=/tmp/perl-test/site/lib -Dsitearch=/tmp/perl-test/site/lib

@tonycoz
Copy link
Contributor

tonycoz commented Jul 12, 2021

Configure doesn't look at those environment variables, if you need Configure to include that option you'll need to supply -Aldflags="-L/tmp/perl-test/lib -mmacosx-version-min=10.14" etc as Configure arguments.

@tonycoz
Copy link
Contributor

tonycoz commented Jul 12, 2021

@tonycoz do you think we need to arrange a meeting? Where we can work on this issue in a screen share session?

We can try, I'm on UTC+1000 so matching times are often a problem.

@Semab-Tariq
Copy link
Author

Hi @tonycoz
What about connecting at UTC 10 00 on 16 July 2021?
If that doesn't work for you can you please give me some options in terms of your free slots available this week?

@tonycoz
Copy link
Contributor

tonycoz commented Jul 16, 2021

That can work for me, I believe it will be 8pm Friday for me.

You can contact me as "TonyC" on irc.perl.org or as TonyC (ImTooTired#6223) in the perl discord https://discord.gg/xqvBdaDe

@tonycoz
Copy link
Contributor

tonycoz commented Jul 20, 2021

One of the tests we did during the zoom session was to set -Dneed_va_copy on the Configure command-line, but from looking at the Configure source this is one of the options that can't be overridden directly.

Please test the following:

  • check the config.sh file we generated with -Dneed_va_copy has need_va_copy=define
  • if not, please make distclean, re-run Configure, edit config.sh to set need_va_copy=define and rebuild to perform the test again

Please also paste the diff between the config.sh files generated on arm64 and x86_64 so we can check on other possible configuration that could be causing a problem.

Thanks

@Semab-Tariq
Copy link
Author

Hi @tonycoz

Here are our findings

  • Build universal binaries for Perl on BigSur arm64 and they won't work on Catalina x86_64 and BigSur x86_64
  • Build universal binaries for Perl on BigSur x86_64 they will run fine on Catalina x86_64 and BigSur arm64
  • Build universal binaries for Perl on Catalina x86_64 and they will run fine on BigSur x86_64 and BigSur arm64

So seems like the problem is only with building Perl on BigSur arm64
That's why we decided to change our build machine from BigSur arm64 to BigSur x86_64

@systemresearch
Copy link

I found that Perl Universal Binary modules which include arm64, arm64e and x86_64 instruction Set Architecutures (ISA) run OK on both a macOS Ventura Intel machine and a macOS Ventura Apple Silicon machine. If I left out any one of the three, runtime "needed …" errors occured.

In addition, the macOS Ventura Intel machine with the current Xcode built the universal binaries ok. However, only the x86_64 binary slice can be run/tested on the Intel processor.

Related discussions are here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants