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

openssl3: fix build on macOS =<10.6 i386/PowerPC #27655

Merged

Conversation

aeiouaeiouaeiouaeiouaeiouaeiou
Copy link
Contributor

Closes: https://trac.macports.org/ticket/72055

Description

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS 10.6.8 10K549 x86_64
Xcode 4.2 4C199

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL in commit message?
  • checked your Portfile with port lint?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?
  • checked that the Portfile's most important variants haven't been broken?

@macportsbot
Copy link

Notifying maintainers:
@neverpanic for port openssl3.
@larryv for port openssl3.

@macportsbot macportsbot added the maintainer: open Affects an openmaintainer port label Feb 14, 2025
@aeiouaeiouaeiouaeiouaeiouaeiou
Copy link
Contributor Author

CC @jmroot @barracuda156 @rmottola

PowerPCs with GCC still needs this patch, but this PR is under discussion.

@fieryo
Copy link

fieryo commented Feb 18, 2025

This error in openssl3 v3.4.1 prevents compilation of wine-stable on macOS 10.14 (Mojave), that requires both i386 and x64 builds (+universal). Version 3.4.0 (openssl3 commit 14f956d from Dec 4, 2024) works fine.

@jmroot
Copy link
Member

jmroot commented Feb 18, 2025

@fieryo Do the changes in the PR fix it for you?

@barracuda156
Copy link
Contributor

CC @jmroot @barracuda156 @rmottola

PowerPCs with GCC still needs this patch, but this PR is under discussion.

@aeiouaeiouaeiouaeiouaeiouaeiou I think everything needed has been merged to upstream by now.

@aeiouaeiouaeiouaeiouaeiouaeiou aeiouaeiouaeiouaeiouaeiouaeiou changed the title openssl3: fix build on macOS =<10.6 i386 openssl3: fix build on macOS =<10.6 i386/PowerPC Feb 18, 2025
@aeiouaeiouaeiouaeiouaeiouaeiou
Copy link
Contributor Author

@fieryo @barracuda156

@neverpanic
Copy link
Member

neverpanic commented Feb 19, 2025

https://trac.macports.org/ticket/72055#comment:12 suggests this isn't sufficient yet? actually says "no further patches", so maybe they didn't actually test this PR.

@barracuda156
Copy link
Contributor

I cannot test anything now, but specifically this was building successfully: openssl/openssl#26740 (comment)

Modern gcc required manual linking to libatomic though (see another issue discussing this).

@rmottola
Copy link
Contributor

@neverpanic this patch worked on 10.11 64bit which was getting the same error, did not yet test on actual 32bit 10.5

@aeiouaeiouaeiouaeiouaeiouaeiou
Copy link
Contributor Author

@rmottola is this a normal build or with +universal variant?

@rmottola
Copy link
Contributor

@aeiouaeiouaeiouaeiouaeiouaeiou oh I checked, it is universal, that explains why I got 32bit issues. This means I have universal stuff going around and could also explain my libgmp/gcc issues. But I did not request ever anything explicitely universal. Is there a way to understand how it "crept in" ?

@rmottola
Copy link
Contributor

Patch fixes 10.6 build on pure 32bit

@aeiouaeiouaeiouaeiouaeiouaeiou
Copy link
Contributor Author

@neverpanic can it be merged now? i386 buildbot remains broken.

@RobK88
Copy link
Contributor

RobK88 commented Feb 22, 2025

I tested your PR on my Mac running High Sierra. I was able to successfully build the +universal variant. See below. When I have time, I will test your PR on my Mac running Mtn Lion.

bash-3.2$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.13.6
BuildVersion:	17G14042

bash-3.2$ port installed openssl3
The following ports are currently installed:
  openssl3 @3.1.4_1+universal
  openssl3 @3.1.5_1+universal
  openssl3 @3.1.6_0+universal
  openssl3 @3.3.1_1+universal
  openssl3 @3.3.2_0+universal
  openssl3 @3.3.2_1+universal
  openssl3 @3.4.0_0+universal
  openssl3 @3.4.0_1+universal
  openssl3 @3.4.0_2+universal (active)

bash-3.2$ sudo port clean openssl openssl3
--->  Cleaning openssl
--->  Cleaning openssl3

bash-3.2$ sudo port upgrade openssl3
--->  Computing dependencies for openssl3
--->  Fetching distfiles for openssl3
--->  Verifying checksums for openssl3
--->  Extracting openssl3
--->  Applying patches to openssl3
--->  Configuring openssl3
--->  Building openssl3                                  
--->  Staging openssl3 into destroot                     
--->  Installing openssl3 @3.4.1_0+universal             
--->  Cleaning openssl3
--->  Computing dependencies for openssl3
--->  Deactivating openssl3 @3.4.0_2+universal
--->  Cleaning openssl3                                  
--->  Activating openssl3 @3.4.1_0+universal
--->  Cleaning openssl3                                  
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.

bash-3.2$ openssl --version
OpenSSL 3.4.1 11 Feb 2025 (Library: OpenSSL 3.4.1 11 Feb 2025)
bash-3.2$ 

@RobK88
Copy link
Contributor

RobK88 commented Feb 22, 2025

The +universal variant also finally builds on Mountain Lion. See below.
It sure looks like your can merge this PR.

Cathys-iMac-2:~ grinch$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.8.5
BuildVersion:	12F2560

Cathys-iMac-2:~ grinch$ port installed openssl3
The following ports are currently installed:
  openssl3 @3.1.4_1+universal
  openssl3 @3.1.5_0+universal
  openssl3 @3.1.5_1+universal
  openssl3 @3.1.6_0+universal
  openssl3 @3.3.1_1+universal
  openssl3 @3.3.2_0+universal
  openssl3 @3.3.2_1+universal
  openssl3 @3.4.0_0+universal
  openssl3 @3.4.0_1+universal
  openssl3 @3.4.0_2+universal (active)

Cathys-iMac-2:~ grinch$ sudo port clean openssl openssl3
--->  Cleaning openssl
--->  Cleaning openssl3

Cathys-iMac-2:~ grinch$ sudo port upgrade openssl3
--->  Computing dependencies for openssl3
--->  Fetching distfiles for openssl3
--->  Attempting to fetch openssl-3.4.1.tar.gz from http://distfiles.macports.org/openssl3
--->  Verifying checksums for openssl3                                               
--->  Extracting openssl3
--->  Applying patches to openssl3
--->  Configuring openssl3
--->  Building openssl3                                  
--->  Staging openssl3 into destroot                     
--->  Installing openssl3 @3.4.1_0+universal             
--->  Cleaning openssl3
--->  Computing dependencies for openssl3
--->  Deactivating openssl3 @3.4.0_2+universal
--->  Cleaning openssl3                                  
--->  Activating openssl3 @3.4.1_0+universal
--->  Cleaning openssl3                                  
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.

Cathys-iMac-2:~ grinch$ openssl --version
OpenSSL 3.4.1 11 Feb 2025 (Library: OpenSSL 3.4.1 11 Feb 2025)
Cathys-iMac-2:~ grinch$ 

@RobK88
Copy link
Contributor

RobK88 commented Feb 22, 2025

P.S. I would change the title of this PR to "Fix builds on older macOS's". It not just a PPC issue.

@jmroot
Copy link
Member

jmroot commented Feb 22, 2025

Since we have confirmation that this helps on the affected platforms, and @neverpanic seems to be unavailable at the moment, I'm going to merge.

@jmroot jmroot merged commit 32dfc23 into macports:master Feb 22, 2025
3 checks passed
@aeiouaeiouaeiouaeiouaeiouaeiou aeiouaeiouaeiouaeiouaeiouaeiou deleted the openssl3-i386-fixes branch February 22, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer: open Affects an openmaintainer port
Development

Successfully merging this pull request may close these issues.

9 participants