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

[qt5-base] Fix for feature postgresqlplugin on Windows #32880

Merged
merged 3 commits into from
Aug 2, 2023

Conversation

jvbsl
Copy link
Contributor

@jvbsl jvbsl commented Aug 1, 2023

Fixes #30086.

  • Changes comply with the maintainer guide
  • SHA512s are updated for each updated download
  • The "supports" clause reflects platforms that may be fixed by this new version
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

I hope the way I did my changes is correct. But after these changes it did build for me in a VM and in a github action.

@jvbsl
Copy link
Contributor Author

jvbsl commented Aug 1, 2023

@microsoft-github-policy-service agree

@jvbsl
Copy link
Contributor Author

jvbsl commented Aug 1, 2023

It seems I didn't really understand the version stuff correctly, because the git-tree SHA seems to be wrong in versions/q-/qt5-base.json, despite the hash being set by vcpkg x-add-version --all. It is btw. the same value as git rev-parse HEAD:ports/qt5-base got me. I now tried to use the hash that was given by the CI build. Any tips for further reference how to do that correctly?

@Osyotr
Copy link
Contributor

Osyotr commented Aug 1, 2023

@jvbsl try vcpkg x-add-version qt5-base --overwrite-version

@jvbsl
Copy link
Contributor Author

jvbsl commented Aug 1, 2023

@Osyotr nope, unfortunately that gave me exactly the same hash

Edit:
What I did:

  1. increment port-version in ports/qt5-base/vcpkg.json by one
  2. Execute ./vcpkg x-add-version qt5-base --overwrite-version or ./vcpkg x-add-version --all

@jvbsl
Copy link
Contributor Author

jvbsl commented Aug 1, 2023

I don't see how my change caused the arm64-android build to fail. Could someone perhaps restart that? To me it seems that is caused by some CI runner problems...

@FrankXie05 FrankXie05 added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Aug 2, 2023
@FrankXie05
Copy link
Contributor

/azp run

@FrankXie05
Copy link
Contributor

Re-run CI.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Comment on lines +273 to +274
list(APPEND RELEASE_OPTIONS "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} ${ADDITIONAL_WINDOWS_LIBS} -lwldap32")
list(APPEND DEBUG_OPTIONS "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} ${ADDITIONAL_WINDOWS_LIBS} -lwldap32")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is a fix for Windows, shouldn't the option go to ADDITIONAL_WINDOWS_LIBS instead?

Copy link
Contributor Author

@jvbsl jvbsl Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about that as well, but then it would be part of MYSQL_LIBS, despite MySQL not needing to be linked with that library, and I don't think it should then be part of the MYSQL_LIBS, and even less if it is used for the linking of the sqldrivers dlls of QT(Edit: which I think it is used for in the QT build, but I'm not sure), as they are independent of each other.
That is the reason why I did it kinda analogous to linux and mac:

list(APPEND RELEASE_OPTIONS "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_TYPES_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread")

Of course one could argue, that it isn't really the same, because there is no ADDITIONAL_LINUX_LIBS variable, but it wasn't refactored to be like that yet. But I still think the reason above applies.

Does my reasoning make sense to you, or do you still think it should be part of ADDITIONAL_WINDOWS_LIBS, or perhaps even somewhere completely different?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I didn't notice that this is already guarded with VCPKG_TARGET_IS_WINDOWS. So it is okay as it is.

(I do think this should be done differently, based on pkgconfig, but this is too much for this simple PR.)

Comment on lines +273 to +274
list(APPEND RELEASE_OPTIONS "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} ${ADDITIONAL_WINDOWS_LIBS} -lwldap32")
list(APPEND DEBUG_OPTIONS "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} ${ADDITIONAL_WINDOWS_LIBS} -lwldap32")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I didn't notice that this is already guarded with VCPKG_TARGET_IS_WINDOWS. So it is okay as it is.

(I do think this should be done differently, based on pkgconfig, but this is too much for this simple PR.)

@jvbsl
Copy link
Contributor Author

jvbsl commented Aug 2, 2023

Btw. should I squash the last two commits and force push? As the SHA hash change could've been done in one commit, at least I hope that wouldn't influence the hash, but as I don't exactly get where the hash comes from anyway I'm not sure.

Apart from that do you think it is ready to be changed into a non-draft PR?

@dg0yt
Copy link
Contributor

dg0yt commented Aug 2, 2023

Just mark as ready for review.

@jvbsl jvbsl marked this pull request as ready for review August 2, 2023 08:06
@FrankXie05 FrankXie05 added the info:reviewed Pull Request changes follow basic guidelines label Aug 2, 2023
@JavierMatosD JavierMatosD merged commit 2dc5c32 into microsoft:master Aug 2, 2023
15 checks passed
@jvbsl
Copy link
Contributor Author

jvbsl commented Aug 2, 2023

Just wanted to thank you all for the help, the fast reviewing and merging.

@jvbsl jvbsl deleted the fix/qt5-base branch September 3, 2023 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[qt5-base] Static build error (postgreSQL config)
5 participants