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

[libpq] Update to 12.2 and some feature fixes #10915

Merged
merged 7 commits into from May 18, 2020

Conversation

Neumann-A
Copy link
Contributor

should fix some issues mentioned in #10875 + and update to 12.2

fix some issues with features
feature combination client+nls does not compile with latest VS
due to libpq src's accessing an implementation detail (needs upstream fix)
@NancyLi1013
Copy link
Contributor

Hi @Neumann-A
Thanks for this PR.
Could you look into the regression on arm64-windows?
Unable to determine OpenSSL version: The openssl.exe command wasn't found. at C:\vsts\_work\4\s\buildtrees\libpq\arm64-windows-rel\src\tools\msvc/Mkvcbuild.pm line 147.

@NancyLi1013
Copy link
Contributor

Related issue #9866

@NancyLi1013
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

ports/libpq/portfile.cmake Outdated Show resolved Hide resolved
@JackBoosY JackBoosY added info:reviewed Pull Request changes follow basic guidelines requires:testing Needs tests added before merging and removed info:reviewed Pull Request changes follow basic guidelines labels Apr 22, 2020
@NancyLi1013
Copy link
Contributor

@Neumann-A
Could you please help confirm if the test results are as intended in current state?

On Windows:

  1. Error: Cannot find definition for package python, perl, pam, libedit, kerberos, openbsd.

  2. Feature readline, bonjour, systemd, llvm, not supported by configure script on the target platform.

  3. Feature tcl, uuid is not yet implement on the target platform.

When I run .\vcpkg.exe install libpq[openssl,zlib,nls,ldap,icu,xml,xslt,client]:x64-windows, I met the error:

F:\10915\vcpkg\buildtrees\libpq\x64-windows-rel\src\backend\utils\adt\pg_locale.c(995,51): error C2037: left of 'locale_name' specifies undefined struct/union '__crt_locale_data' [F:\10915\vcpkg\buildtrees\libpq\x64-windows-rel\postgres.vcxproj]
         F:\10915\vcpkg\buildtrees\libpq\x64-windows-rel\src\backend\utils\adt\pg_locale.c(996,36): error C2198: 'wchar2char': too few arguments for call [F:\10915\vcpkg\buildtrees\libpq\x64-windows-rel\postgres.vcxproj]

But if I remove client from the list, other features can build successfully.
After then, I rebuild client, there is no error.

It's so weird. On Visual Studio 2019, client still cannot be built successfully. I don't know why.

On Linux:

  1. Error: Cannot find definition for package python, perl, pam, libedit, kerberos, openbsd, openldp.

  2. Feature readline, bonjour, systemd, not supported by configure script on the target platform.

  3. Feature tcl, uuid , llvm is not yet implement on the target platform.

Current;y, feature openssl,zlib,nls,ldap,icu,xml,xslt,client have passed with the following triplets:

  • x86-winodows
  • x64-windows
  • x64-linux

Note: client seems to be conflict with other features on Windows. So it needs to be built
separately.

On x64-windows-static

  1. For client feature, some errors like this:
64>libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol __imp_FreeCredentialsHandle referenced in function pqDropConnection [F:\10915\vcpkg\buildtrees\libpq\x64-windows-static-rel\reindexdb.vcxproj]
    64>libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol __imp_DeleteSecurityContext referenced in function pqDropConnection [F:\10915\vcpkg\buildtrees\libpq\x64-windows-static-rel\reindexdb.vcxproj]
    64>libpq.lib(fe-auth.obj) : error LNK2019: unresolved external symbol AcquireCredentialsHandleA referenced in function pg_SSPI_startup [F:\10915\vcpkg\buildtrees\libpq\x64-windows-static-rel\reindexdb.vcxproj]
    64>libpq.lib(fe-auth.obj) : error LNK2019: unresolved external symbol InitializeSecurityContextA referenced in function pg_SSPI_continue [F:\10915\vcpkg\buildtrees\libpq\x64-windows-static-rel\reindexdb.vcxproj]
    64>libpq.lib(fe-auth.obj) : error LNK2019: unresolved external symbol FreeContextBuffer referenced in function pg_SSPI_continue [F:\10915\vcpkg\buildtrees\libpq\x64-windows-static-rel\reindexdb.vcxproj]
    64>libcrypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp_CertOpenStore referenced in function capi_open_store [F:\10915\vcpkg\buildtrees\libpq\x64-windows-static-rel\reindexdb.vcxproj]

  1. For openssl,zlib,nls,ldap,icu,xml,xslt features, there are no any errors.

Personally, it might be better to remove these features that are not supported or implemented currently. What do you think about this? @Neumann-A

I also have a question about the first kind of error:
Error: Cannot find definition for package python, perl, pam, libedit, kerberos, openbsd, openldp
When building these features, why do they show that these features cannot be defined?

@Neumann-A
Copy link
Contributor Author

  1. perl, pam, libedit, kerberos, openbsd

Missing vcpkg ports. Need to be added to make those work. Especially kerberos enables gssapi in libpq which should be added to get everything included into libpq. The other features mainly influence details or include other contributions.

Feature readline, bonjour, systemd, llvm, not supported by configure script on the target platform.

intentionally. Those features are not supported on Windows. Give me a Supports:-Field for features ;)

Feature tcl, uuid is not yet implement on the target platform.

means if somebody wants/needs to use these feature they need to implement it in the portfile.

When I run .\vcpkg.exe install libpq[openssl,zlib,nls,ldap,icu,xml,xslt,client]:x64-windows, I met the error:

Needs to be fixed upstream.
error C2037: left of 'locale_name' specifies undefined struct/union '__crt_locale_data'
postgres seems to have accessed a private (implementation detail) of a certain CRT struct which it cannot access any longer due to a change within the headers of the CRT runtime.
https://postgrespro.com/list/thread-id/1555397 seems like they still haven't fixed this.

Personally, it might be better to remove these features that are not supported or implemented currently. What do you think about this?

I personally don't like to remove work already done. Extracting the possible features of a port is always kind of a headache and that is why I personally always add all features which I can see even if they might not yet be supported by VCPKG. One way to deal with something like that would be to allow comments in the CONTROL file

For client feature, some errors like this: (x64-windows-static)

Looking through the perl scripts feature client is currently not supported on x64-windows-static. Requires a lot of changes to make it work

When building these features, why do they show that these features cannot be defined?

The ports do not exists. So they need to be added to vcpkg. python was just missing the version.

@JackBoosY
Copy link
Contributor

@Neumann-A Since vcpkg currently does not support the Supports field for features, I think we should add error information based on the selected feature and triplet in portfile.cmake.

@NancyLi1013 NancyLi1013 removed the requires:testing Needs tests added before merging label Apr 23, 2020
@NancyLi1013
Copy link
Contributor

@Neumann-A
Could you please resolve the conflict?

@NancyLi1013 NancyLi1013 added info:reviewed Pull Request changes follow basic guidelines needs-further-review labels May 14, 2020
@strega-nil strega-nil self-assigned this May 16, 2020
@strega-nil
Copy link
Contributor

Alright, this looks good to me! Thanks @Neumann-A :D

@strega-nil strega-nil merged commit 6b871df into microsoft:master May 18, 2020
@Neumann-A Neumann-A deleted the fix_some_libpq_features branch May 18, 2020 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants