On Jan 2, 2025, at 19:17, 'Mounir IDRASSI' via openssl-users <openss...@openssl.org> wrote:
!-------------------------------------------------------------------|
This Message Is From an External Sender
This message came from outside the Laboratory.
|-------------------------------------------------------------------!
--
You received this message because you are subscribed to the Google Groups "openssl-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openssl-user...@openssl.org.
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-users/30a11935-2688-44f8-86e2-52d48462f3f6%40idrix.net.
I hear you. But given that there are two (or three at most!) architectures – I fail to see why building one complicated package with guaranteed 50% garbage (x86 machines don’t need PPC or AARCH64, and vs. versa) would be better than building two (or three) straightforward packages, one for each architecture, with no fluff.
--
V/R,
Uri
There are two ways to design a system. One is to make it so simple there are obviously no deficiencies.
The other is to make it so complex there are no obvious deficiencies.
- C. A. R. Hoare
From: 'Mounir IDRASSI' via openssl-users <openss...@openssl.org>
Date: Friday, January 3, 2025 at 04:16
To: openss...@openssl.org <openss...@openssl.org>
Subject: Re: [EXT] Re: Building "Fat" Mac Binary, or Cross-Compiling from ARM arch to x86-64
!-------------------------------------------------------------------|
This Message Is From an External Sender
This message came from outside the Laboratory.
|-------------------------------------------------------------------!
--
You received this message because you are subscribed to the Google Groups "openssl-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openssl-user...@openssl.org.
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-users/a9a300d1-fe63-48ae-b38e-ea4bd1aacc1c%40idrix.net.
On 1/2/25 4:59 PM, Viktor Dukhovni wrote:
Unfortunately, that can't trivially work for OpenSSL, becausearchitecture-specific assembly targets are included in the build.
Yes, that makes sense. After sending my last message I noticed that the OpenSSL "C" files (.c) were building fine with both archs; it was when it got to the assembly file (.S) that it started failing.
You'd need to build *both* the ARM *and* X86_64 assembly targets, invoking the appropriate assembler on each one, and producing either object code for that particular platform for inclusion in the "fat" binary, or somehow producting a "fat" objec that is "empty" for one of the targets. How to do that, requires more detailed knowledge of fat binaries than I can muster.
This can be done with the "lipo" command. It was Plan B, which is now turning into Plan A. Regards, Nick
FWIW, I’m working a lot with Macs, both Intel-based and Apple Silicon-based.
In my experience, it’s been never useful to build “fat” binaries. They brought nothing but problems.
In our place we build x86_64 binaries for Intel, and AARCH64 for Silicon - and is been perfectly satisfactory here. I recommend considering the same (proven) approach.
We considered this approach. For context, the software I'm working on is a commercial closed-source application library, containing only .so/.dylib/.dll files, delivered in a SDK+Runtime package. Our customers integrate our software into their application and that gets deployed to either the cloud or on-prem. Originally we planned to have 2 packages for Mac: 1 for Intel, 1 for Apple Silicon. But as we thought about the use case of deploying to Mac endpoints, it seemed like Universal binaries would be easier (ie. "One size fits all").
Your experience is interesting to me. Can you elaborate on the problems you've faced with Universal ("fat") binaries?
Regards,
Nick