Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 733656 - >=sys-devel/llvm-10.0.1, >=sys-devel/clang-10.0.1: Make dependency on dev-python/sphinx optional
Summary: >=sys-devel/llvm-10.0.1, >=sys-devel/clang-10.0.1: Make dependency on dev-pyt...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal with 4 votes (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
: 743757 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-07-23 18:15 UTC by Vasco Gervasi
Modified: 2021-01-07 09:05 UTC (History)
11 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Move man-page building and dependencies behind USE="doc" (llvmebuild.patch,2.13 KB, patch)
2020-09-23 04:42 UTC, Hypoon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vasco Gervasi 2020-07-23 18:15:36 UTC
Hi,
Updating llvm form 10.0.0 to 10.0.1 leads to install dev-python/sphinx:

[ebuild     U ] sys-devel/llvm-common-10.0.1 [10.0.0]
[ebuild  N    ] dev-python/namespace-sphinxcontrib-1.0  PYTHON_TARGETS="python3_8 -pypy3 -python2_7 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/idna-2.10  PYTHON_TARGETS="python3_8 -pypy3 -python2_7 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/alabaster-0.7.12  PYTHON_TARGETS="python3_8 -pypy3 -python2_7 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/imagesize-1.1.0  USE="-test" PYTHON_TARGETS="python3_8 -pypy3 -python2_7 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/snowballstemmer-2.0.0  PYTHON_TARGETS="python3_8 -pypy3 -python2_7 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/chardet-3.0.4  USE="-test" PYTHON_TARGETS="python3_8 -pypy3 -python2_7 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/PySocks-1.7.1  PYTHON_TARGETS="python3_8 -pypy3 -python2_7 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/pytz-2020.1  PYTHON_TARGETS="python3_8 -pypy3 -python2_7 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/Babel-2.8.0-r1  USE="-doc -test" PYTHON_TARGETS="python3_8 -pypy3 -python2_7 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/packaging-20.4  USE="-test" PYTHON_TARGETS="python3_8 -pypy3 -python2_7 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/cryptography-3.0  USE="-idna -libressl -test" PYTHON_TARGETS="python3_8 -pypy3 -python2_7 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/pyopenssl-19.1.0  USE="-doc -test" PYTHON_TARGETS="python3_8 -pypy3 -python2_7 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/urllib3-1.25.10  USE="-brotli -doc -test" PYTHON_TARGETS="python3_8 -pypy3 -python2_7 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/requests-2.24.0  USE="ssl -socks5 -test" PYTHON_TARGETS="python3_8 -pypy3 -python2_7 -python3_6 -python3_7 -python3_9"
[ebuild     U ] media-video/ffmpeg-4.3.1 [4.3-r1] USE="alsa bzip2 dav1d encode gnutls gpl iconv mp3 network openssl postproc pulseaudio svg theora threads vaapi vorbis vpx x264 xvid zlib -X -amr -amrenc (-appkit)-bluray -bs2b -cdio -chromaprint -chromium -codec2 -cpudetection -cuda -debug -doc -fdk -flite -fontconfig -frei0r -fribidi -gcrypt -gme -gmp -gsm -hardcoded-tables -iec61883 -ieee1394 -jack -jpeg2k -kvazaar -ladspa -libaom -libaribb24 -libass -libcaca -libdrm -libilbc -libressl -librtmp -libsoxr -libtesseract -libv4l -libxml2 -lv2 -lzma (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -modplug -openal -opencl -opengl -openh264 -opus -oss -pic -rav1e -rubberband -samba -sdl -snappy -speex -srt -ssh -static-libs -test -truetype -twolame -v4l -vdpau -vidstab -vulkan -wavpack -webp -x265 -zeromq -zimg -zvbi" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow -3dnowext -fma4 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher" VIDEO_CARDS="-nvidia"
[ebuild  N    ] dev-python/sphinxcontrib-applehelp-1.0.2  USE="-test" PYTHON_TARGETS="python3_8 -pypy3 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/sphinxcontrib-devhelp-1.0.2  USE="-test" PYTHON_TARGETS="python3_8 -pypy3 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/sphinxcontrib-jsmath-1.0.1-r1  USE="-test" PYTHON_TARGETS="python3_8 -pypy3 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/sphinxcontrib-htmlhelp-1.0.3  USE="-test" PYTHON_TARGETS="python3_8 -pypy3 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/sphinxcontrib-serializinghtml-1.1.4  USE="-test" PYTHON_TARGETS="python3_8 -pypy3 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/sphinxcontrib-qthelp-1.0.3  USE="-test" PYTHON_TARGETS="python3_8 -pypy3 -python3_6 -python3_7 -python3_9"
[ebuild  N    ] dev-python/sphinx-3.1.2  USE="-doc -latex -test" PYTHON_TARGETS="python3_8 -pypy3 -python3_6 -python3_7 -python3_9"
[ebuild     U ] sys-devel/llvm-10.0.1 [10.0.0] USE

Seems due to the fact that sphinx has been moved out of the "doc" flags in 10.0.1.
Is there a specific reason for this?
Is is quite annoying for a minimal system to install so many, maybe, unnececesary packages.

Thanks




Reproducible: Always
Comment 1 Arfrever Frehtes Taifersar Arahesis 2020-07-23 18:47:20 UTC
I suggest to add IUSE="man".
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-07-23 19:19:21 UTC
Not gonna happen.  Sphinx is far too common these days.
Comment 3 Vasco Gervasi 2020-07-23 19:32:54 UTC
Seems that there is a "-DLLVM_ENABLE_SPHINX" flag that is disabled by default.
Comment 4 Dmitry Derevyanko 2020-07-25 21:37:42 UTC
Also noticed this in 2 chroots and host machine. Added to package.provided but need to install all this just to update llvm.
Comment 5 Sven E. 2020-08-18 20:08:11 UTC
(In reply to Vasco Gervasi from comment #3)
> Seems that there is a "-DLLVM_ENABLE_SPHINX" flag that is disabled by
> default.

Doesn't help, the build insists on sphinx for manpages anyway.
Comment 6 Daniel M. Weeks 2020-08-19 13:17:53 UTC
(In reply to Michał Górny from comment #2)
> Not gonna happen.  Sphinx is far too common these days.

Your arrogance isn't helpful and this isn't a real reason.

A short explanation for other users:

llvm doesn't ship pre-generated manpages, so for llvm, they were being pre-generated for cases where IUSE=-doc. Man pages aren't being pre-generated anymore but since QA decided that manpages always have to be installed sphinx is required now.
Comment 7 Vasco Gervasi 2020-08-19 13:28:40 UTC
So can the -doc flag disable also the manpages creation?
Comment 8 Daniel M. Weeks 2020-08-19 13:37:59 UTC
(In reply to Vasco Gervasi from comment #7)
> So can the -doc flag disable also the manpages creation?

USE=doc now only controls generation of HTML man pages.
Comment 9 Vasco Gervasi 2020-08-19 13:40:26 UTC
Adding a "man" flag?
Comment 10 Daniel M. Weeks 2020-08-19 13:53:42 UTC
(In reply to Vasco Gervasi from comment #9)
> Adding a "man" flag?

Giving users the choice would be the Gentoo way but from my observation, Gentoo QA demands conformity instead.
Comment 11 Andreas Sturmlechner gentoo-dev 2020-09-20 16:16:26 UTC
*** Bug 743757 has been marked as a duplicate of this bug. ***
Comment 12 Simon 2020-09-20 20:29:44 UTC
Can this bug be reopened or is there a more generic bug to discuss what to do about this?

From reading the forum and bug reports I think it's pretty clear that the users want to be in control of their system and the current changes to for example LLVM prevent them from being in control over a frankly pretty large amount of dependencies all to generate some man pages they might not ever read (or read elsewhere).

IMHO the simple solution, that we had in the past as far as I know, is a "man" USE flag to enable building of man pages, this can be enabled by default in the profiles but it would allow the user control over packages like LLVM and prevent having to install a bunch of pointless dependencies without any additional maintenance/development overhead.
Comment 13 Ionen Wolkens gentoo-dev 2020-09-20 20:59:59 UTC
Is there an official QA stance on how this should be handled, or just left to each maintainers? The only thing I know of is this proposal from last year:

> """
> Packages must not disable installing manpages via USE flags (e.g.
> USE=man or USE=doc). If upstream does not ship prebuilt manpages
> and building them requires additional dependencies, the maintainer
> should build them and ship along with the package.
> """
https://archives.gentoo.org/gentoo-dev/message/a6a8e840773da77ee6008ac23b4f89e1

In this case, if don't want to lock them behind a USE=man then shipping man pages along with llvm/clang would be an option (few other ebuilds do this, like dev-vcs/git to avoid asciidoc dep). I understand it is extra work for maintainers, but it's improved user experience -- especially for packages used by many people that they often can't opt-out from.
Comment 14 Hypoon 2020-09-21 22:29:02 UTC
I'll second this issue. I don't even use LLVM directly. It's pulled in as a dependency for rust, another thing I don't use directly, but which is pulled in as a dependency for librsvg. In the process of a normal system update, I suddenly have 16 new packages being installed, all of which are for sphinx.

I'm not a fan.

I see that this is the new QA policy, so I'll add a comment there as well if I can.
Comment 15 phkb 2020-09-21 22:53:31 UTC
Yes, this is ridiculous. Why can't we have the choice to not have man pages if that avoids installing 20 packages?

Please add a use flag for this. I don't mind if it's enabled by default, as long as I can disable it.
Comment 16 Hypoon 2020-09-22 01:11:43 UTC
Ok, I've done some homework, and read over the QA proposal (and comments) from last year that was linked a few comments above.

FIRST: Was it a just a proposal, or was that proposal approved somewhere? There was quite a bit of backlash and not a lot of support for that proposal, at least not in the way it was worded at that time. What's the point of a request for comments if all of the dissenting opinions are disregarded?

SECOND: Michał Górny responded to one of those comments as follows [1]:
> Could you please read the proposed policy? It explicitly says you are
> *not* supposed to force extra deps on users but build manpages for them.
to which I'd say that 16 additional dependencies (for my system at least) certainly counts as "extra deps". Therefore, by his words, that proposal says that these dependencies should be removed entirely, and the maintainer is responsible for generating the man pages and shipping them with LLVM.

and THIRD, (In reply to Michał Górny from comment #2):
> Not gonna happen.  Sphinx is far too common these days.
Would you like a copy of my world file? It's 188 lines and I haven't needed Sphinx before now. Maybe it's common in your world, but it's not common in mine. This is a general-purpose desktop system (although without Gnome or KDE).

[1] https://archives.gentoo.org/gentoo-dev/message/1edb88fd58e44e33c5f6ac0ce6fa11fe
Comment 17 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-09-22 06:33:19 UTC
I'm sorry but this thread is just ridiculous.  You don't mind building huge packages such as Rust or LLVM but you do mind a few tiny Python packages.  This just makes no sense.

And yes, the proposal wasn't accepted by other developers who rejected the idea of building manpages for users (it's too much work!).  Hence, I've also stopped putting an effort to do it, for a few tiny dependencies (it's not like it needs pandoc).
Comment 18 Arfrever Frehtes Taifersar Arahesis 2020-09-22 06:48:25 UTC
IUSE="+man" would be good compromise.

(I have several systems and if I ever needed to read LLVM / Clang man pages, then having LLVM / Clang installed with USE="man" in one system would be enough...)
Comment 19 Kunszt Arpad 2020-09-22 17:05:46 UTC
> I'm sorry but this thread is just ridiculous.  You don't mind building huge
> packages such as Rust or LLVM but you do mind a few tiny Python packages.  This 
> just makes no sense.

I don't build Rust and LLVM because I want to build them. I build them because they're needed by Firefox/Mesa/other softwares.

Installing and updating 14 extra Python packages - while I'm not using Python at all for my own works - just to generate text files during compile time which I'll never read is a big overhead.

> Not gonna happen.  Sphinx is far too common these days.

I never used Sphinx before and I don't want to use it in the future either. It doesn't carry any value to my system. Especially that it's not needed for LLVM to operate at all.

I really loved in Gentoo that I can configure my system as I wish. No man pages, no documentation, no unneeded dependencies. This is why I started to use it since... nearly for 20 years. I'm old... Please don't change the course. We love and use Gentoo because it's Gentoo, we can and sometimes we have to hack it, get under the hood where we can configure it extremely well to suit or crazy needs. If we want to use a pre-packaged desktop OS then we can choose Ubuntu or Fedora. Forcing a barely used software as a mandatory requirement just to generate text files once is not what Gentoo is. Was.
Comment 20 phkb 2020-09-22 17:11:19 UTC
(In reply to Michał Górny from comment #17)
> I'm sorry but this thread is just ridiculous.  You don't mind building huge
> packages such as Rust or LLVM but you do mind a few tiny Python packages. 
> This just makes no sense.
> 
I do mind building rust and llvm, except it's actually used by some packages I need. I don't want llvm man pages, so why force building them and adding lots of dependencies for that? Especially considering that a use flag is easy to add, since upstream provides a way to disable doc. It's just a matter of making the sphinx dependency a conditional one, and pass the appropriate cmake option.

Many people in this thread are in favor of a man use flag. There hasn't been any counter argument for this solution. So why is it rejected without any justification?
Comment 21 Patrick ALLAERT 2020-09-22 17:17:03 UTC
(In reply to Michał Górny from comment #17)
> I'm sorry but this thread is just ridiculous.  You don't mind building huge
> packages such as Rust or LLVM but you do mind a few tiny Python packages. 
> This just makes no sense.
> 
> And yes, the proposal wasn't accepted by other developers who rejected the
> idea of building manpages for users (it's too much work!).  Hence, I've also
> stopped putting an effort to do it, for a few tiny dependencies (it's not
> like it needs pandoc).

Indeed, we don't mind those because of the **strict necessity** of having them.

The changes made here are breaking Gentoo's philosophy of control and possibility of being as lightweight as possible.

Upstream's default is DLLVM_ENABLE_SPHINX=OFF, not really Gentoo's philosophy either to divert from upstream's default, even if it happens frequently.

> Not gonna happen.  Sphinx is far too common these days.

So common that it's not present on any of the 5 boxes I control.

QA wise, it is very surprising that that kind of change may happen between a 10.0.0 version and a 10.0.1 one. It's totally against SEMVER.
Comment 22 Hypoon 2020-09-23 01:42:31 UTC
(In reply to Michał Górny from comment #17)
> I'm sorry but this thread is just ridiculous.  You don't mind building huge
> packages such as Rust or LLVM but you do mind a few tiny Python packages. 
> This just makes no sense.

Like others have already said, yes, I did mind building Rust and LLVM.

I dismissed Rust as a fad until high-profile people started taking it seriously. When librsvg pulled it in as a dependency during an update, I figured this may be the first of a lot of packages which will start depending on Rust, so I'll accept it as a necessary dependency.

When Rust pulled in LLVM, I googled to see whether I could use GCC instead of LLVM. Due to the risks associated with running a nonstandard Rust toolchain, I had to accept LLVM if I was going to accept Rust.

I wasn't happy about Rust or LLVM, but I begrudgingly accepted them *because* they are fundamentally necessary dependencies. Sphinx is not.

(In reply to Michał Górny from comment #17)
> And yes, the proposal wasn't accepted by other developers who rejected the
> idea of building manpages for users (it's too much work!).  Hence, I've also
> stopped putting an effort to do it, for a few tiny dependencies (it's not
> like it needs pandoc).

If the proposal wasn't accepted, then a USE flag is acceptable and you don't have to build manpages for users anyway. If it's so important to you, then use profiles/base/package.use.mask to make people think twice about not installing the man pages.

I would like to be convinced that I really must install the man pages. I have a lot of respect for you, but we're not seeing eye-to-eye yet. I'm open to doing some reading if you've already discussed your motivation for this somewhere else. The proposal started from the assumption that requiring man pages to be installed universally was a good idea, but I'd like to see the discussion about that, to see if you'll persuade me to share your perspective.
Comment 23 Hypoon 2020-09-23 04:42:32 UTC
Created attachment 662047 [details, diff]
Move man-page building and dependencies behind USE="doc"

I've edited the ebuild to exclude building/installing the man pages unless USE="doc".

I'm uploading it as a patch instead of an ebuild to encourage others to review my work, since I'm not an experienced ebuild author. This patch is not thoroughly tested, but it works for me. Use at your own risk.

This is intended as a stopgap measure until a better solution is determined.

I'd include a GCO sign-off, but I'm disinclined to disclose my real name.
Comment 24 Patrick ALLAERT 2020-10-22 11:14:34 UTC
Anything wrong in accepting Hypoon's patch?

Can this be re-opened?
Comment 25 Enne Eziarc 2020-10-24 03:00:03 UTC
I've put dev-python/sphinx-9999 in package.provided but can't figure out the cmake equivalent of EXTRA_ECONF; trying to emerge >llvm-10.0.0 dies with "No Python implementation found for the build". Is there any way to circumvent this developer that doesn't involve invasive surgery on a toolchain package?
Comment 26 Ionen Wolkens gentoo-dev 2020-10-26 18:17:02 UTC
Note that this was fixed anyway in commits:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a338e5ac4f704a03ac8ba0fb905c0f9011bf9eb5
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a4012cee7e7860adbdb80ddd54e707393959f08
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ed38fe356eb6729a4fec7578c2c775af91755bc
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8f1720f74fcf5f619c66c23e17b124d2efd6fbd
By going back to pregenerated man pages again (thus are still available with USE=-doc).

And thanks for bothering, that let me depclean 24 packages on my desktop and 28 on my server (may be small python packages but still feels like a lot when there's 28, especially when it's just for man pages I've never used and wouldn't mind if were missing).
Comment 28 Vasco Gervasi 2020-10-27 14:30:31 UTC
Thanks very much.
Comment 29 Tomasz Golinski 2021-01-07 09:05:43 UTC
It seems we are back to square 1 with sys-devel/llvm-11.0.1. It depends on Sphinx again and pulls 16 additional unnecessary packages...