[vcpkg-make] new script port#33198
Conversation
dg0yt
left a comment
There was a problem hiding this comment.
I wonder if we could let the configure step generate a special Makefile (or a set of such files).
This file would contain the common environment variable setup, the call to configure including all options, etc.
It could serve as a pseudo log file in failure logs.
It could enable parallel configuration which would reduce build time.
ports/vcpkg-make/vcpkg-make.cmake
Outdated
| cmake_parse_arguments(PARSE_ARGV 0 arg | ||
| "AUTOCONFIG;COPY_SOURCE;USE_WRAPPERS;NO_WRAPPERS;NO_CPP;DETERMINE_BUILD_TRIPLET" | ||
| "SOURCE_PATH;CONFIGURE_SUBPATH;BUILD_TRIPLET" | ||
| "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;CONFIGURE_ENVIRONMENT_VARIABLES;CONFIG_DEPENDENT_ENVIRONMENT;ADDITIONAL_MSYS_PACKAGES" |
There was a problem hiding this comment.
I would like to add a CONFIGURE_COMMAND option, to invoke stuff like openssl's python script.
Maybe this idea needs more work to filter/substitute parameters.
There was a problem hiding this comment.
Why does it use vcpkg_configure_make then? (But I think this is too port specific, you probably want to have the same environment/options setup as vcpkg_configure_make but actually want to do it a little different.)
There was a problem hiding this comment.
It is a configure script which is similar enough to not duplicate 95% of the code.
…vcpkg-make # Conflicts: # ports/vcpkg-make/vcpkg-make-common.cmake # ports/vcpkg-make/vcpkg-make.cmake
|
@JavierMatosD: Did I miss something to be removed?
|
Can we migrate enough ports to use |
|
CI errors here are baseline regressions: #38509
The whole idea here was not to port that many ports and keep it focused on the script. I could add the options unnecessarily to an already updated port. |
Can we remove it for now then? We can always add it on later when it's needed. |
I can remove it from the top level but not from the lower level functions since it is basically this: |
|
|
| "PACKAGES" | ||
| ) | ||
| z_vcpkg_unparsed_args(FATAL_ERROR) | ||
| list(APPEND msys_require_packages autoconf-wrapper automake-wrapper binutils libtool make which) |
There was a problem hiding this comment.
IMO Windows/msys should behave more like other platforms. We have several ports which need and either have or have not
vcpkg/ports/icu/portfile.cmake
Lines 1 to 14 in 47364fb
IMO this should be very much centralized to this script port, for
autoconf (incl. autoconf-archive), automake, make libtool.
Ideally, the port would also check for the presence of the required tools, and not print warnings if everything is installed.
With that perspective, it must be discussed if these packages can be requested unconditionally, or if it should be subject to input parameters (AUTOCONFIG, SYSTEM_PACKAGES).
| cmake_parse_arguments(PARSE_ARGV 0 arg | ||
| "AUTOCONFIG;COPY_SOURCE;DISABLE_MSVC_WRAPPERS;NO_CPPFLAGS;NO_DEFAULT_OPTIONS;NO_MSVC_FLAG_ESCAPING;USE_RESPONSE_FILES" | ||
| "SOURCE_PATH" | ||
| "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;PRE_CONFIGURE_CMAKE_COMMANDS;LANGUAGES" |
There was a problem hiding this comment.
I notice that ADDITIONAL_MSYS_PACKAGES is gone, but I don't see how to pass an extended msys environment.
There was a problem hiding this comment.
Option SHELL was removed with a94f56b since it was not used yet by any port. @JavierMatosD made me remove it so feel free to argue with him
There was a problem hiding this comment.
SHELL was not used, maybe it didn't work.
SKIP_CONFIGURE didn't work most of the time, the workaround aren't visible.
ADDITIONAL_MSYS_PACKAGES is used, and it is gone nevertheless.
There was a problem hiding this comment.
SHELL was not used, maybe it didn't work.
SHELL works since it is used internally. Was just an option passed down and otherwise defaulted to the internal msys shell.
ADDITIONAL_MSYS_PACKAGES is used, and it is gone nevertheless.
Its gone due to: #33198 (comment)
There was a problem hiding this comment.
The proposal was to USE_MSYS_ROOT which is fine from my POV.
You wrote "replaced with SHELL" but this was removed for not being used before it became the alternative for ADDITIONAL_MSYS_PACKAGES.
And that's why there is a gap now.
There was a problem hiding this comment.
(But I want a generic ADDITIONAL PACKAGES.)
There was a problem hiding this comment.
I replaced it with shell since that is more universal and what is actual required by the scripts to run. (and is not limited to windows.)
not being used before
No that is not the reason why it got removed. It got removed because no port using vcpkg-make here in this PR is yet using it. You can add whatever further options to vcpkg-make later if you have changes in ports requiring it. Yeah its a bit annoying however it is better to move forward instead of forcing and delaying the script port longer.
Consider what they said about your changes to vcpkg_configure_make and why they were blocked. This is a script port so you can change it however you like later. So the question for you right know should be: Is it a good basis to build upon later even if you right now don't get all the features you would like to have?
There was a problem hiding this comment.
This is a script port so you can change it however you like later.
No. We can only make changes which don't break existing packages. Because only one version can be installed, and user mix consuming ports in arbitrary ways.
Is it a good basis to build upon later even if you right now don't get all the features you would like to have?
I can't tell.
What I can do if I'm not happy with it is to create another port. Or suggest an "API level" switch like vcpkg_make_minimum_required(VERSION 2.0) or vcpkg_minimum_required(vcpkg-make 2.0).
There was a problem hiding this comment.
user mix consuming ports in arbitrary ways.
Problem of the user currently if they are not following a baseline.
Later it might be on the tool to inject the vcpkg-scriptport which is on the same baseline as the port requesting it but that is currently not on the discussion table.
Or suggest an "API level" switch.
Quite easy to implement
function(vcpkg_configre_make)
cmake_parse_arguments (arg ... ... "VERSION" ...)
cmake_language(CALL vcpkg_configre_make_${arg_VERSION} ${arg_UNPARSED_ARGUMENTS})
endfunction(vcpkg_configre_make)
but only really required if there is a breaking change.
I think all tools should be moved to |
There are other places to discuss why it must be (And hey, you invented |
I think you misunderstood. I mean
Regarding *-config scripts. Those should probably really be kept in |
|
Okay, then let's say that
And this is
It feels like three years and one month with #17607. Not counting #13649. |
| list(APPEND arg_OPTIONS_DEBUG ${VCPKG_MAKE_OPTIONS_DEBUG}) | ||
| endif() | ||
|
|
||
| if(WIN32) |
There was a problem hiding this comment.
Host or target? Ambiguous variable, please replace.
There was a problem hiding this comment.
Waiting for JavierMatosD before applying changes. (you know there is this other PR where he seems to be testing stuff.)
There was a problem hiding this comment.
Watching every detail ;-)
(you know there is this other PR about catching ambiguous variables.)
|
Now I remember why |
I think I changed that to just not use a |
|
We still need some transformation between |
|
@JavierMatosD Should I close this PR? |
Your call :) I've added a test port with some unit tests for various functions and cleaned up some of the code (removing comments, extracting functions, etc). I was going to try and figure out the |
|
Nah just lets take #39050. Migrating the changes back here is just extra work and time. Please integrate #33198 (comment) into #39050 (change the line to use
Can be added in a later PR. |
Just initial thoughts.
@dg0yt: Do you have more ideas for make related functions which might be useful?