-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
update qt5 to 5.12.4 #6956
update qt5 to 5.12.4 #6956
Conversation
qt5-declarative:x64-windows failing happens when compiling on 64 bit Windows here too. The Windows test failing is not really at all the expected behaviour of a LTS release. Lets hope it's not a hallmark of the quality of this release by Qt. |
@skychef yeah but I don't think it is Qt's fault. The port in vcpkg modifies nearly everything to get it to the format vcpkg needs. And sometimes stuff randomly breaks because a script doesn't work correctly anymore. Like now the qt5-declarative doesn't seem to find the qtmaind.lib inside the manual-link folder. |
Do the other qt5-* ports need updated too? |
since qt5-declarative is a dependency for most of the other ports I need to fix this one first before trying the rest |
thinking about changing the behaviour of the portfile with the manual-link folder. In my opinion this is not needed because if you really want to build an activex server you need to do more work and I don't think CMake supports that (https://doc.qt.io/qt-5/activeqt-server.html#). Then again there is a CMake target property to not link qtmain.lib automatically so you maybe could do it manually in CMake but even then the manual-link folder is superfluous. |
If Qt have changed the location of a file in a point release (in an LTS version,) then the term "Long term support" has utterly lost it's meaning on them. The understanding in the industry is that software is built via CI systems and the point in picking an LTS release is to among other things, ensure that time isn't wasted "fixing" a build chain broken by the event that a point release of a dependent piece of software becomes available. LTS point releases receive: security updates, bug fixes and minor optimisations. This includes backported patches (although Qt have backported very little in this point release from 5.13 - I've been watching their git repos these past few weeks.) The definition of LTS is pretty clear and universally understood. And we pick LTS releases so that we can have increased confidence that point releases are trustworthy and that we can pull them without issue. So, it is the guys at Qt's fault that this LTS point release does not build using the same build tool (vcpkg) as the previous point release. Because they changed something which was not at all appropriate for a Windows LTS release.
qt5-activeqt failed to build too. If it's an includes issue, then adding the include folder to the path after the archive has been extracted may do it. Just a guess though. I noticed that vcpkg doesn't add includes to the path by default. |
manual-link folder is required because of vcpkg autolink feature in the Visual Studio integration. (Has nothing to do with CMake) |
@Neumann-A the problem I now have is that qt5-declarative and possibly other packages don't find qtmain 🤔 wonder why this is suddenly a problem when all I changed was the version number |
You mean other ports than Qt? Than probably something is wrong in the Qt targets and must be fixed. |
I think he is referring to Qt plugins (such as QtSvg, for instance.) Various Qt plugins have dependencies upon one another and all plugins depend upon Qt's core. The common sense approach to this issue is to look at the git history between 5.12.3 and 5.12.4 and revert the commit(s) causing the mess using a patch, after archive extraction has been completed by the portfile.
I may have found it: |
Pulling from git might be a better approach than grabbing an official archive IMO. ## Pull the source from github
vcpkg_from_github(
## (https://github.com/qt/qtbase)
OUT_SOURCE_PATH SOURCE_PATH
REPO qt/qtbase
REF d8efc8d718e3b3a0464f321e740541f5b221a5d6
HEAD_REF 5.12.4
SHA512 someverylongsha512hashstringinsteadhere
)
## Obtain perl so that the includes folder can be created (only required if the sources have been acquired from git)
vcpkg_find_acquire_program(PERL)
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}")
## Run the syncqt.pl script to generate the includes directory (only required if the sources have been acquired from git)
vcpkg_execute_required_process(
# For packages other than qtbase
#COMMAND perl ${VCPKG_ROOT_DIR}/packages/qt5-base_x64-windows/tools/qt5/syncqt.pl -version ${FULL_VERSION}
COMMAND perl ${SOURCE_PATH}/bin/syncqt.pl -version ${FULL_VERSION}
WORKING_DIRECTORY ${SOURCE_PATH}
)
set(ENV{INCLUDEPATH} "${SOURCE_PATH}/include/;$ENV{INCLUDEPATH}")
Once syncqt.pl is run on the sources pulled from github, the generated include folder is added to the PATH before a build is started. Maybe a syncqt.pl function could be added to qt5-modularscripts? The path:
Should be changed to where syncqt.pl ends up when used in conjunction with other plugins. The variable escapes me right now. |
problem is that the manual-link folder is created after build to prevent issues with the activeqt server. Building the base is fine, everything else after that doesn't find qtmain because it is in the manual-link folder. Would it be easier to not use the manual-link folder and fix the autolink in another way? |
Try not to use manual links. |
According to appveyor/ci#2923 (comment)
Qt 5.12.3 in vcpkg is being built against Openssl 1.0.2. |
@heydojo source for OpenSSL 1.1.1a requirement is https://blog.qt.io/blog/2019/06/17/qt-5-12-4-released-support-openssl-1-1-1/ |
@TheScarfix getting rid of the manual-link folder and fix autolink another way makes sense to me. |
Thanks. And from your link:
The blog is talking about the pre-compiled binaries which Qt ship and not at all about the source code - as far as I can see. So :
Only applies to the applications you build against pre-compiled Qt binaries you obtain from Qt via their installer and not Qt binaries you build yourself - meaning that it is still possible to compile 5.12.4 against Openssl 1.0.2 and build application against that AFAIK. That aside, moving to OpenSSL 1.1.1 now rather than later is extremely important IMO. And if you are using cmake to build your Qt application, migrating appears to be fairly trivial. https://gitlab.com/TW3/bhawk/blob/staging/ports/vcpkg/openssl-windows/portfile.cmake#L3 |
Ug, I need to reverse my earlier recommendation. After discussing it with other members of the team I found out we have a (currently undocumented) policy to move all misbehaving libraries to a manual-links directory. A library is considered misbehaving if it defines main, defines symbols that are also defined in other libraries, or defines malloc. This is done because some build systems will attempt to link against everything in the libs directory. I am working on updating our documentation to make this policy clear. You can also see qt5-base\fixmake.py and scripts\cmake\vcpkg_build_qmake.cmake for more manual-links handling. |
so i took a look at it and would say it would be enough to patch winmain.pro and additionally change the install location somehow. (in the pro load(qt_installs) must be changed but maybe it is enough to change the generated makefiles.) qt_installs.prf is located in mkspecs\features. edit: no need to copy just insert after
|
Ok got qt-declaritve to compile the next trick was to change The next problem ist: so moving the latter one to debug should solve the problem. |
After looking at the Makefile in BuildFolder\tools\bootstrap, I found that |
@TheScarfix The last patch you commited is empty. |
@JackBoosY: |
@Neumann-A |
We can change the Qt5Bootstrap generation path to manual-link by modifying
Only changing DESTDIR does not work, this will only modify the build path without modifying the installation path. Since the Winmain.pro file contains the installation method of Qt5Core and other core libraries, the installation path of Qt5Core cannot be changed to manual-link separately, otherwise we can add @Neumann-A Can you provide a way to generate Qt5Bootstrap as debug/release? |
@JackBoosY I think
But we have to be careful here. Should QtBootstrap be a host or target library? From my feeling it is used to build host libraries and tools. So it should not be in |
@Neumann-A I agree with you. The |
@JackBoosY: with (configure_qt.cmake)
|
argh qt's buildsystem is totally messed up. So if I then setup the paths correctly into qt.conf like qt-base configured them to be I get in qt-activeqt: Moving those files into @JackBoosY is there a default folder for host tools? tools/qt5 is definitly wrong since this should be for target tools? |
@Neumann-A Nope, our default tool folder is only And how do you fix qt5bootstrap install path? just change the install path to |
@JackBoosY this basically removes 80% of the patches done in the configure and build scripts and links the external dependencies like ole32 and zlib correctly |
@Neumann-A Thanks, my home network is terrible, I will try it tomorrow. |
@JackBoosY details of what I did can be found in #7667. Dont know if it fully works yet due to qt's build time and i changed some paths but it is very close to working |
@Rastaban: Can you answer me the question where we should put tools build for the host system by a port? the tools folder is probably for tools build for the target system. I remember a discussion (ninja port) where such tools should not be build by a port but instead be downloaded as binaries which is something I don't see happening in the qt case. |
Currently we don't differentiate between the compiled tools that are meant for the host build and compiled tools that are part of the port output. @cbezault is adding the ability to differentiate between those with system tool ports but I don't know when that will be complete. If you are able to download pre-built binaries for the tools then it could be handled by adding it to the |
No description provided.