Skip to content

[vcpkg] Add missing autoconf dependencies to osx provisioning#17227

Closed
dg0yt wants to merge 4 commits intomicrosoft:masterfrom
dg0yt:osx-provisioning
Closed

[vcpkg] Add missing autoconf dependencies to osx provisioning#17227
dg0yt wants to merge 4 commits intomicrosoft:masterfrom
dg0yt:osx-provisioning

Conversation

@dg0yt
Copy link
Contributor

@dg0yt dg0yt commented Apr 12, 2021

@JackBoosY JackBoosY self-assigned this Apr 12, 2021
@JackBoosY JackBoosY requested a review from BillyONeal April 12, 2021 06:46
@JackBoosY JackBoosY added depends:vm-update PR contains changes to the VM provisioning scripts info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. labels Apr 12, 2021
@JackBoosY JackBoosY added requires:author-response and removed info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. labels Apr 12, 2021
@JackBoosY JackBoosY added info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. and removed requires:author-response labels Apr 13, 2021
@JackBoosY JackBoosY requested a review from strega-nil April 13, 2021 01:28
@dg0yt
Copy link
Contributor Author

dg0yt commented Apr 13, 2021

I added gettext also to osx, as suggest in #17057. So similar changes are done to linux and osx now

I would like to add that wile gettext/autopoint don't have significant dependencies (m4 on linux), gtk-doc-tools/gtk-doc come with a longer list on Ubuntu and macOS.

And for gettext, there is also a port.

@strega-nil
Copy link
Contributor

You may want to split out linux and osx, since osx is a lot easier to update (and I can personally do it).

The changes for linux will go to a separate PR.
@dg0yt
Copy link
Contributor Author

dg0yt commented Apr 14, 2021

You may want to split out linux and osx, since osx is a lot easier to update (and I can personally do it).

This PR is now reduced to osx (matching my initial branch naming). Linux is in #17278.

Looing forward to see the autoconf backlog being resolved.

@dg0yt dg0yt changed the title Add missing autoconf dependencies to provisioning Add missing autoconf dependencies to osx provisioning Apr 14, 2021
@strega-nil
Copy link
Contributor

cool, thanks @dg0yt. I will try this out soon.

@PhoebeHui
Copy link
Contributor

@Neumann-A, I noticed that you have already added feature 'tools' which contains autopoint to gettext port by PR #17278, is it possible to replace 'brew install gettext' on osx or linux?

@Neumann-A
Copy link
Contributor

@PhoebeHui You can try it but I don't exactly know how it interacts which the whole m4 stuff which is normally needed. Just put the corresponding binary on PATH and it should be found. Be aware that building gettext[tools] is also a bit time consuming.

@dg0yt
Copy link
Contributor Author

dg0yt commented Apr 15, 2021

On Linux, the gettext port is empty at the moment:

if(VCPKG_TARGET_IS_LINUX)
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
if (NOT EXISTS "/usr/include/libintl.h")
message(FATAL_ERROR "Please use command \"sudo apt-get install gettext\" to install gettext on linux.")
endif()
return()
else()

Regarding build time, it might be possible to create a separate feature for autotoolsautopoint. It is a script file which has its own target in make. Maybe its enough to satisfy the autoconf.

@dg0yt
Copy link
Contributor Author

dg0yt commented Apr 15, 2021

... for autotools ...

"for autopoint"

@PhoebeHui
Copy link
Contributor

Verified it on macOS platform, and it works. however, the gettext doesn't work on linux, and building gettext[tools] is also a bit time consuming, we may consider to install gettext on pipeline test machines?

@strega-nil, what do you think?

Verified:

  1. ./vcpkg install 'gettext[tools]'
  2. Add 'vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/tools/gettext/bin")' to fontconfig portfile.
  3. ./vcpkg install fontconfig
  4. fontconfig:x64-osx successfully installed.

@PhoebeHui PhoebeHui self-assigned this Apr 15, 2021
@Neumann-A
Copy link
Contributor

vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/tools/gettext/bin")
should be
vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/gettext/bin")

@dg0yt
Copy link
Contributor Author

dg0yt commented Apr 15, 2021

I'm playing with the gettext port on Linux, but it is relevant for osx as well:

I was able to establish an pure "autopoint" feature, running configure in /gettext-tools (slow) and running install in /gettext-tools/misc (fast). At the end, the package is just the autopoint script and a compressed tarball.

Given that this "build" just consists of configuring the autopoint.in script template (with @variable@ placeholders) and compressing a tarball, the slow configure step could be eliminated by using a small cmake script instead of using configure + make. The script has to fill in some paths and platform details, and install the script and tarball.

@dg0yt
Copy link
Contributor Author

dg0yt commented Apr 16, 2021

a small cmake script instead of using configure + make

Works for me, for windows/linux/osx/mingw.

Looking at the gtkdocize: I don't know about the build times, but brew install gtk-doc takes some time and disk space when it pulls in "docbook"

The autopoint solution pattern could work for gtkdocize, too: it is a script which runs during autoconf and doesn't come with direct dependencies. However there is no gtk-doc port yet, for adding a feature. Creating a full port with all dependencies is a much bigger task.

@dg0yt
Copy link
Contributor Author

dg0yt commented Apr 16, 2021

a small cmake script instead of using configure + make

Works for me, for windows/linux/osx/mingw.

#17317

@autoantwort
Copy link
Contributor

Looking at the gtkdocize: I don't know about the build times, but brew install gtk-doc takes some time and disk space when it pulls in "docbook"

Huh on my machine it is as fast as installing other packages. It needs 10 seconds to install the package and dependencies.

@dg0yt
Copy link
Contributor Author

dg0yt commented Apr 16, 2021

Huh on my machine it is as fast as installing other packages. It needs 10 seconds to install the package and dependencies.

I need to do this in Azure Pipelines, and it takes more than one minute:

2021-04-16T07:16:19.8328510Z ==> Installing dependencies for gtk-doc: docbook, docbook-xsl, libxml2, boost and source-highlight
...
2021-04-16T07:17:24.8477650Z   /usr/local/etc/bash_completion.d

And now I see that it also pulls in boost. This takes some time, and generates /usr/local/Cellar/boost/1.75.0_2: 15,058 files, 524.2MB.

@PhoebeHui
Copy link
Contributor

Installing dependencies for gtk-doc: docbook, docbook-xsl, libxml2, boost and source-highlight

Yes, I concerned to install gtk-doc on osx test machines, I'm not sure if it would cause conflicts with these packages which installed by vcpkg.

@PhoebeHui PhoebeHui changed the title Add missing autoconf dependencies to osx provisioning [vcpkg] Add missing autoconf dependencies to osx provisioning Apr 19, 2021
@autoantwort
Copy link
Contributor

Yes, I concerned to install gtk-doc on osx test machines, I'm not sure if it would cause conflicts with these packages which installed by vcpkg.

It is already installed on some machines. Otherwise the pipelines would not fail randomly based on the machine they run on.

@dg0yt
Copy link
Contributor Author

dg0yt commented Apr 19, 2021

I have no clue if there is any interest in offering a lightweight gtk-doc[gtkdocize] feature (without the rest of gtk-doc), similar to the lightweight gettext[autopoint] feature. I decided to not start work on it until I see interest in such contributions.

@strega-nil
Copy link
Contributor

I think this is good; however, I'd prefer to roll this into PR #17376

@dg0yt
Copy link
Contributor Author

dg0yt commented Apr 20, 2021

Thanks.
I think the main decision is still whether the autoconf dependencies are a user/CI responsibility, or if vcpkg includes (at least minimimal) ports to be used by port maintainers as host dependencies. It might be helpful to add a note to vcpkg_configure_make documentation.

@dg0yt
Copy link
Contributor Author

dg0yt commented Apr 21, 2021

Assuming that autopoint and gtkdocize are maintainer tools which are rarely actually needed for vcpkg ports, I offer one more alternative proposal to updating CI provisioning, now in #17406: Replace the calls to the missing maintainer tools by no-op calls to true (i.e. /usr/bin/true).

  • This is the fastest solution for vcpkg ports which don't really need to update to these parts of the build systems.
  • It solves the issue both for CI and for vcpkg users.
  • It is entirely implemented in vcpkg_configure_make.
  • It will still make use of the tools when (made) available.

Copy link
Contributor

@ras0219-msft ras0219-msft left a comment

Choose a reason for hiding this comment

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

LGTM, though this will be blocked until we reprovision OSX.

I also do very much like fast solutions :) and if we can get effectively identical results while doing less work I'm all for it.

Finally, if gettext tools can be made fast enough, building our own copies of the tools would be better than needing the system copies.

@dg0yt
Copy link
Contributor Author

dg0yt commented Apr 24, 2021

Today I would rather propose to not merge this. It solves issues in CI but not for users, and better solutions start to get merged.

@JackBoosY
Copy link
Contributor

@dg0yt So please close this issue or change it to draft.

@dg0yt dg0yt closed this Apr 24, 2021
@dg0yt dg0yt deleted the osx-provisioning branch December 12, 2021 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

depends:vm-update PR contains changes to the VM provisioning scripts 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.

7 participants