Skip to content

[openssl] Fix dynamic build on OSX#24090

Merged
strega-nil-ms merged 6 commits intomicrosoft:masterfrom
Thomas1664:openssl-osx-fix
Apr 19, 2022
Merged

[openssl] Fix dynamic build on OSX#24090
strega-nil-ms merged 6 commits intomicrosoft:masterfrom
Thomas1664:openssl-osx-fix

Conversation

@Thomas1664
Copy link
Contributor

Describe the pull request

  • What does your PR fix?

    Fixes [openssl] Build error #24089

  • Which triplets are supported/not supported? Have you updated the CI baseline?

    Unchanged

  • Does your PR follow the maintainer guide?

    Yes

  • If you have added/updated a port: Have you run ./vcpkg x-add-version --all and committed the result?

    Yes

Although I can't test it because I don't have a Mac, I'm confident that this should fix the issue.

@Thomas1664
Copy link
Contributor Author

Thomas1664 commented Apr 11, 2022

@winterz Can you please test weither this PR solves your issue?

@FrankXie05 FrankXie05 added the category:port-bug The issue is with a library, which is something the port should already support label Apr 12, 2022
@winterz
Copy link

winterz commented Apr 12, 2022

@winterz Can you please test weither this PR solves your issue?

looks good.

@winterz
Copy link

winterz commented Apr 12, 2022

can you merge now?

@Thomas1664
Copy link
Contributor Author

can you merge now?

If @strega-nil-ms has time to review and merge today, it can be merged today, otherwise most likely tomorrow.

@FrankXie05
Copy link
Contributor

@Thomas1664 @winterz
I can't confirm this bug because I don't have the corresponding machine. 😢
I am worried that for the library libcrypto, directly changing version to 3.0 will affect the normal use of the 1.1 version.
References: https://www.openssl.org/docs/man3.0/man7/crypto.html

For openssl, the built-in crypto encryption library implements encryption algorithms, but for version maintenance, does it need to be manually changed for each version iteration?
Of course, I think we'll merge this PR, OpenSSL upstream pointed out that version 3.0 will be supported until 2026. :)
References: https://www.openssl.org/source/

@FrankXie05
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Thomas1664
Copy link
Contributor Author

Waiting for #24169 to be merged

@Thomas1664
Copy link
Contributor Author

@FrankXie05 CI is now green

@FrankXie05 FrankXie05 added the info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. label Apr 19, 2022
@strega-nil-ms
Copy link
Contributor

Thanks!

@strega-nil-ms strega-nil-ms merged commit be8bb99 into microsoft:master Apr 19, 2022
@Thomas1664 Thomas1664 deleted the openssl-osx-fix branch April 19, 2022 17:52
@daschuer
Copy link
Contributor

This probably does not completely fix the issue.
I am not able to install libpq see #22247
Any ideas to fix that?

@FrankXie05
Copy link
Contributor

@daschuer
For cross-compilation, CMake cannot link the correct C standard library normally, so that parameters like prinft cannot be passed to the mian function implementation definition, so this problem occurs.
Maybe use CMAKE_C_COMPILER_WORKS to skip checking, or CMake with CMAKE_TRY_COMPILE_TARGET_TYPE to compile static or dynamic libraries instead of exe files.
For community-triplet, we cannot guarantee that it will build successfully. Feel sorry. 😔

@daschuer
Copy link
Contributor

daschuer commented Jun 10, 2022

Does this Comment belongs to this PR?

The issue with building libpq is a native build, using Autotools. The error is

Reason: tried: '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file)

Does anyone have an idea to dril that down?

@Thomas1664
Copy link
Contributor Author

Does this Comment belongs to this PR?

The issue with building libpq is a native build, using Autotools. The error is

Reason: tried: '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file)

Does anyone have an idea to dril that down?

What is your problem?
Does openssl itself fail to build?
In this case make sure you have the latest catalogue.
Does libpq fail to link openssl?
In this case, I can have a look at it this weekend.

@daschuer
Copy link
Contributor

The problem is that libpq builds a test program during the configure step of auto tools.

This fails my original attempt already contains the patch merged here however I have just merged master again and add a patch that the config.log is preserved #21422

@Thomas1664
Copy link
Contributor Author

Your issue is not at all related to this PR or the openssl port itself. The issue is that libpq doesn't recognize openssl 3.

@daschuer
Copy link
Contributor

I can confirm that the build failure is different. Sorry for the noise.

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

Labels

category:port-bug The issue is with a library, which is something the port should already support info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[openssl] Build error

6 participants