Skip to content

Qt: add options to disable docs and gui#20078

Merged
michaelkuhn merged 3 commits intospack:developfrom
sethrj:qt-doc
Nov 29, 2020
Merged

Qt: add options to disable docs and gui#20078
michaelkuhn merged 3 commits intospack:developfrom
sethrj:qt-doc

Conversation

@sethrj
Copy link
Copy Markdown
Contributor

@sethrj sethrj commented Nov 25, 2020

  • Add ~gui option for minimal build
  • Add +doc option to install docs, and attempt to disable the implicit
    llvm dependency if not
  • Removes the 'freetype' option which hasn't worked reliably in qt5, as
    many of the gui components implicitly rely on freetype.
  • Add and test version 5.15 (and skip qtlocation if disabling opengl)
  • Refactor some of the dependency logic

I've tested this on linux with 5.15.2 and 4.8.7 in a couple of different
configurations.

- Add `~gui` option for minimal build
- Add `+doc` option to install docs, and attempt to disable the implicit
  llvm dependency if not
- Removes the 'freetype' option which hasn't worked reliably in qt5, as
  many of the gui components implicitly rely on freetype.
- Add and test version 5.15 (and skip qtlocation if disabling opengl)
- Refactor some of the dependency logic

I've tested this on linux with 5.15.2 and 4.8.7 in a couple of different
configurations.
@adamjstewart
Copy link
Copy Markdown
Member

Should we disable the gui by default to reduce the number of deps?

@sethrj
Copy link
Copy Markdown
Contributor Author

sethrj commented Nov 25, 2020

Should we disable the gui by default to reduce the number of deps?

No, most packages that depend on qt do so for the GUI so their recipes would all have to change. Using qt for the non GUI components is the exception, not the rule.

@michaelkuhn
Copy link
Copy Markdown
Member

Thanks for this! I actually gave [email protected] a try a few days ago but couldn't get it to build (probably the qtlocation problem). [email protected] builds fine for me, let me try it with cube (which probably also needs the qt+gui treatment).

@michaelkuhn
Copy link
Copy Markdown
Member

Just gave this another try. When I build with +doc, I get errors like this and the build fails:

make[4]: .../opt/spack/linux-ubuntu18.04-x86_64/gcc-10.2.0/qt-5.15.2-aawjt6mlcbihiljmczi6jtis5sgsvfy6/bin/qtattributionsscanner: Command not found
Makefile.qmake-aux:233: recipe for target 'qtattributionsscanner' failed
make[4]: *** [qtattributionsscanner] Error 127

Any idea?

@sethrj
Copy link
Copy Markdown
Contributor Author

sethrj commented Nov 28, 2020

Just gave this another try. When I build with +doc, I get errors like this and the build fails:

make[4]: .../opt/spack/linux-ubuntu18.04-x86_64/gcc-10.2.0/qt-5.15.2-aawjt6mlcbihiljmczi6jtis5sgsvfy6/bin/qtattributionsscanner: Command not found
Makefile.qmake-aux:233: recipe for target 'qtattributionsscanner' failed
make[4]: *** [qtattributionsscanner] Error 127

Any idea?

Are you building with ~tools? If so I might need to add a conflict for '+doc', when='~tools', because qdoc and its associates are under the tools directory, which is skipped with ~tools.

@michaelkuhn
Copy link
Copy Markdown
Member

Nope, all variants are set to the defaults (except for +doc).

I think I figured it out: qt seems to try to call qtattributionsscanner from the prefix before it has been installed. If I make the following change, it works for me:

--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -584,10 +584,9 @@ def configure(self, spec, prefix):
 
     def build(self, spec, prefix):
         make()
-        if '+doc' in spec:
-            make('docs')
 
     def install(self, spec, prefix):
         make("install")
         if '+doc' in spec:
+            make('docs')
             make('install_docs')

Copy link
Copy Markdown
Member

@michaelkuhn michaelkuhn left a comment

Choose a reason for hiding this comment

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

LGTM

@michaelkuhn michaelkuhn merged commit 58babe8 into spack:develop Nov 29, 2020
@sethrj sethrj deleted the qt-doc branch November 30, 2020 14:42
bollig pushed a commit to bollig/spack that referenced this pull request Jan 12, 2021
* Qt: add options to disable docs and gui

- Add `~gui` option for minimal build
- Add `+doc` option to install docs, and attempt to disable the implicit
  llvm dependency if not
- Removes the 'freetype' option which hasn't worked reliably in qt5, as
  many of the gui components implicitly rely on freetype.
- Add and test version 5.15 (and skip qtlocation if disabling opengl)
- Refactor some of the dependency logic

I've tested this on linux with 5.15.2 and 4.8.7 in a couple of different
configurations.

* Address reviewer feedback and correctly disable llvm

* Fix qt doc generation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants