fun fact about ICU +universal

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

fun fact about ICU +universal

Ken Cunningham
If you just strip all the muniversal shenanigans out of the Portfile, it builds just fine universal on BigSur Intel without any fuss.

K

% uname -a

Darwin MacBookPro-2012.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64



% port -v installed icu

The following ports are currently installed:

  icu @67.1_3+universal (active) platform='darwin 20' archs='arm64 x86_64' date='2021-02-14T13:33:16-0800'


% file /opt/local/lib/libicudata.dylib

/opt/local/lib/libicudata.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64]

/opt/local/lib/libicudata.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64

/opt/local/lib/libicudata.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64


Reply | Threaded
Open this post in threaded view
|

Re: fun fact about ICU +universal

Ken Cunningham
The i386/x86_64 universal build looks fine too, so far, with all the muniveral stuff out.

Now -- have to see why it was ever put in there in the first place, I guess.

K

On Sun, Feb 14, 2021 at 1:35 PM Ken Cunningham <[hidden email]> wrote:
If you just strip all the muniversal shenanigans out of the Portfile, it builds just fine universal on BigSur Intel without any fuss.

K

% uname -a

Darwin MacBookPro-2012.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64



% port -v installed icu

The following ports are currently installed:

  icu @67.1_3+universal (active) platform='darwin 20' archs='arm64 x86_64' date='2021-02-14T13:33:16-0800'


% file /opt/local/lib/libicudata.dylib

/opt/local/lib/libicudata.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64]

/opt/local/lib/libicudata.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64

/opt/local/lib/libicudata.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64


Reply | Threaded
Open this post in threaded view
|

Re: fun fact about ICU +universal

Fred Wright

On Sun, 14 Feb 2021, Ken Cunningham wrote:

> The i386/x86_64 universal build looks fine too, so far, with all the
> muniveral stuff out.
>
> Now -- have to see why it was ever put in there in the first place, I guess.

One of the typical sources of trouble with "natural universal" builds is
architecture-dependent configure checks, whose results are inherently
forced to be single-valued across architectures.  Since arm64 and x86_64
have both the same bitness and the same endianness, it might be a
non-issue for that combination in many cases, even while being technically
incorrect.  If i386/x86_64 also works, that suggests that bitness isn't an
issue, but endianness would be if ppc were included.  Alignment is another
potential issue, but less likely to be in these cases.

Though another problem with this sort of issue is that merely building
successfully doesn't verify that the code actually works correctly.
Remember Apple was shipping Intel Macs to end users before they'd fixed
all the endian bugs.

Fred Wright
Reply | Threaded
Open this post in threaded view
|

Re: fun fact about ICU +universal

Ken Cunningham
In reply to this post by Ken Cunningham
If i386/x86_64 also works, that suggests that bitness isn't an issue, but endianness would be if ppc were included. Alignment is another potential issue, but less likely to be in these cases.

Things have become a little simpler there -- as we have no compiler in MacPorts at present that can cross-compile c++11 code between Intel and PPC architectures, and as so many things, including ICU, need c++11 now, that is not happening.

Ken

On Sun, Feb 14, 2021 at 4:48 PM Ken Cunningham <[hidden email]> wrote:
The i386/x86_64 universal build looks fine too, so far, with all the muniveral stuff out.

Now -- have to see why it was ever put in there in the first place, I guess.

K

On Sun, Feb 14, 2021 at 1:35 PM Ken Cunningham <[hidden email]> wrote:
If you just strip all the muniversal shenanigans out of the Portfile, it builds just fine universal on BigSur Intel without any fuss.

K

% uname -a

Darwin MacBookPro-2012.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64



% port -v installed icu

The following ports are currently installed:

  icu @67.1_3+universal (active) platform='darwin 20' archs='arm64 x86_64' date='2021-02-14T13:33:16-0800'


% file /opt/local/lib/libicudata.dylib

/opt/local/lib/libicudata.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64]

/opt/local/lib/libicudata.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64

/opt/local/lib/libicudata.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64


Reply | Threaded
Open this post in threaded view
|

Re: fun fact about ICU +universal

ryandesign2
Administrator
In reply to this post by Fred Wright


On Feb 14, 2021, at 20:11, Fred Wright wrote:

> On Sun, 14 Feb 2021, Ken Cunningham wrote:
>
>> The i386/x86_64 universal build looks fine too, so far, with all the
>> muniveral stuff out.
>>
>> Now -- have to see why it was ever put in there in the first place, I guess.
>
> One of the typical sources of trouble with "natural universal" builds is architecture-dependent configure checks, whose results are inherently forced to be single-valued across architectures.  Since arm64 and x86_64 have both the same bitness and the same endianness, it might be a non-issue for that combination in many cases, even while being technically incorrect.  If i386/x86_64 also works, that suggests that bitness isn't an issue, but endianness would be if ppc were included.  Alignment is another potential issue, but less likely to be in these cases.
>
> Though another problem with this sort of issue is that merely building successfully doesn't verify that the code actually works correctly. Remember Apple was shipping Intel Macs to end users before they'd fixed all the endian bugs.

Thank you, Fred, you said everything I was going to say.

Reply | Threaded
Open this post in threaded view
|

Re: fun fact about ICU +universal

Ken Cunningham
In reply to this post by Ken Cunningham
Yeah, the real downside of the muniversal  PG is that once it has been chucked in to fix a build, for whatever reason it may have been once upon a time, convincing everyone you DON'T need it after that is much harder than if you never used it in the first place.

K
Reply | Threaded
Open this post in threaded view
|

Re: fun fact about ICU +universal

ryandesign2
Administrator
On Feb 15, 2021, at 07:42, Ken Cunningham wrote:

> Yeah, the real downside of the muniversal  PG is that once it has been chucked in to fix a build, for whatever reason it may have been once upon a time, convincing everyone you DON'T need it after that is much harder than if you never used it in the first place.

Ken, I don't like all this complaining. You brought up this thread because apparently you believe this portgroup is no longer needed in this port. If so, remove it, and take responsibility for fixing anything that breaks as a result. You already know this would cause an i386/ppc universal build to be wrong. You claim such a build is no longer possible anyway. In that case, ensure that the universal variant is not offered (or emits an error) in that situation.

Reply | Threaded
Open this post in threaded view
|

Re: fun fact about ICU +universal

Ken Cunningham
It's not complaining, it's irony.

I spent hours trying to fix a many-years-broken problem with ICU building universal .... only to find out that it actually builds universal trivially easily.

I'll get around to fixing the small bits of that soonishly, once I have a bit of spare time.

And yes, c++11 cross-arch-cross-compiling is broken with respect to PPC (and with gcc arm/Intel) ... although I have been working on that too.

Thanks for the encouragement!

Ken
Reply | Threaded
Open this post in threaded view
|

Re: fun fact about ICU +universal

Nils Breunese
Ken Cunningham <[hidden email]> wrote:

> It's not complaining, it's irony.

I’ve learned that irony doesn’t work very well via e-mail, because irony usually requires knowing the author well when communicating via a text-only medium, and it is often interpreted as complaining otherwise. I’m sorry to say that I also interpreted some of your recent messages as complaining. I think your work on MacPorts is greatly appreciated though.

Cheers, Nils.