unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* QtHaveModule
@ 2016-08-04 23:19 Andreas Enge
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Enge @ 2016-08-04 23:19 UTC (permalink / raw)
  To: guix-devel

Hello,

a little request for help, and a message to keep track of what I have tried
out...

The upgrade from Qt 5.5 to 5.6.1-1 broke owncloud-client and bitcoin-core.
Apparently qtwebkit was moved into its own, community released (whatever
this means) module. So I am trying to add a package for qtwebkit.

The configure phase ends with this message:
Encountered 2 configuration warning(s):
 ! QtQuick module not found, QML APIs will not be built
 ! Missing GStreamer or QtMultimedia, disabling HTML5 media element support
I added qtdeclarative (for the former) and qtmultimedia, but nothing changed.

The error messages come from
qtwebkit-opensource-src-5.6.1/Tools/qmake/mkspecs/features/features.prf:

    qtHaveModule(quick): WEBKIT_CONFIG += have_qtquick
    else: CONFIGURE_WARNINGS += "QtQuick module not found, QML APIs will not be built"
...
    # HTML5 Media Support for builds with GStreamer
    unix:!mac:!contains(QT_CONFIG, no-pkg-config) {
        packagesExist("glib-2.0 gio-2.0 gstreamer-1.0 gstreamer-plugins-base-1.0") {
            WEBKIT_CONFIG += video use_gstreamer
        } else: packagesExist("glib-2.0 gio-2.0 \'gstreamer-0.10 >= 0.10.30\' \'gstreamer-plugins-base-0.10 >= 0.10.30\'") {
            WEBKIT_CONFIG += video use_gstreamer use_gstreamer010
        }
        use?(gstreamer): WEBKIT_CONFIG += use_native_fullscreen_video
    }

    !enable?(video):qtHaveModule(multimediawidgets) {
        WEBKIT_CONFIG += video use_qt_multimedia
    }

    !enable?(video) {
        CONFIGURE_WARNINGS += "Missing GStreamer or QtMultimedia, disabling HTML5 media element support"
    }

This makes me think that "qtHaveModule" does not work; and I wonder whether
in our other Qt modules that have Qt modules as input, these are actually
detected correctly. Well, I tried qtsensors, and did not notice this problem.

I suspect that this is due to our installing the different modules into
separate output paths, which already caused problems, see commit
7972d8a2e98af6592050a37036c2c80a01358fcf. Nix should have the same problem;
they call a shell script "setup-hook.sh" that extends an environment variable
NIX_QT5_MODULES by the output path of each module. This is then used in a
complicated shell script setup-hook.sh of qtbase.

Assistance would be greatly appreciated!

Andreas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: QtHaveModule
@ 2016-08-09 19:04 David Craven
  2016-08-14  6:25 ` QtHaveModule 宋文武
  2016-08-14 17:41 ` QtHaveModule David Craven
  0 siblings, 2 replies; 6+ messages in thread
From: David Craven @ 2016-08-09 19:04 UTC (permalink / raw)
  To: guix-devel, Andreas Enge

Hi Andreas,

> This makes me think that "qtHaveModule" does not work; and I wonder whether
> in our other Qt modules that have Qt modules as input, these are actually
> detected correctly. Well, I tried qtsensors, and did not notice this problem.

Trying to package the missing qt modules I came to the same conclusion. I think
that the qt modules that we have packaged all share one thing in common. They
do not use the qtHaveModule macro. qtsensors for example does not [0].

> Nix should have the same problem;
> they call a shell script "setup-hook.sh" that extends an environment variable
> NIX_QT5_MODULES by the output path of each module. This is then used in a
> complicated shell script setup-hook.sh of qtbase.

I think that the magic happens in qt-env.nix [1], but I'm not sure. It
looks like
qt-env.nix takes all the qtInputs and turns it into what looks like a
guix profile
to me. Then it uses a qt.conf file to set the relevant paths.

> cat >"$out/bin/qt.conf" <<EOF
> [Paths]
> Prefix = $out
> Plugins = lib/qt5/plugins
> Imports = lib/qt5/imports
> Qml2Imports = lib/qt5/qml
> Documentation = share/doc/qt5
> EOF

I am not sure what the best way to proceed is, since $out should be
$GUIX_ENVIRONMENT,
but $GUIX_ENVIRONMENT isn't known when we build qtbase. What I think
needs to happen
for QtHaveModule to work is we need to generate a qt.conf file when a
guix environment is
created that has qtbase as a dependency and make sure it's symlinked
into the bin directory.

[0] https://github.com/qt/qtsensors/blob/dev/qtsensors.pro
[1] https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/qt-5/qt-env.nix

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: QtHaveModule
  2016-08-09 19:04 QtHaveModule David Craven
@ 2016-08-14  6:25 ` 宋文武
  2016-08-14 17:41 ` QtHaveModule David Craven
  1 sibling, 0 replies; 6+ messages in thread
From: 宋文武 @ 2016-08-14  6:25 UTC (permalink / raw)
  To: David Craven; +Cc: guix-devel

David Craven <david@craven.ch> writes:

> [...]
>
>> cat >"$out/bin/qt.conf" <<EOF
>> [Paths]
>> Prefix = $out
>> Plugins = lib/qt5/plugins
>> Imports = lib/qt5/imports
>> Qml2Imports = lib/qt5/qml
>> Documentation = share/doc/qt5
>> EOF
>
> I am not sure what the best way to proceed is, since $out should be
> $GUIX_ENVIRONMENT,
> but $GUIX_ENVIRONMENT isn't known when we build qtbase. What I think
> needs to happen
> for QtHaveModule to work is we need to generate a qt.conf file when a
> guix environment is
> created that has qtbase as a dependency and make sure it's symlinked
> into the bin directory.
>
> [0] https://github.com/qt/qtsensors/blob/dev/qtsensors.pro
> [1] https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/qt-5/qt-env.nix

Hi, I just sent a patch to add 'QMAKEPATH' as search-path, which should
fix this issue.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: QtHaveModule
  2016-08-09 19:04 QtHaveModule David Craven
  2016-08-14  6:25 ` QtHaveModule 宋文武
@ 2016-08-14 17:41 ` David Craven
  2016-08-16 18:49   ` QtHaveModule David Craven
  1 sibling, 1 reply; 6+ messages in thread
From: David Craven @ 2016-08-14 17:41 UTC (permalink / raw)
  To: guix-devel, Andreas Enge

> Hi, I just sent a patch to add 'QMAKEPATH' as search-path, which should
> fix this issue.

Thank you! Yes this fixes the issue and is a lot cleaner than what I
came up with...

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: QtHaveModule
  2016-08-14 17:41 ` QtHaveModule David Craven
@ 2016-08-16 18:49   ` David Craven
  2016-08-17 11:06     ` QtHaveModule 宋文武
  0 siblings, 1 reply; 6+ messages in thread
From: David Craven @ 2016-08-16 18:49 UTC (permalink / raw)
  To: guix-devel, Andreas Enge, iyzsong

Hi

>> Hi, I just sent a patch to add 'QMAKEPATH' as search-path, which should
>> fix this issue.

> Thank you! Yes this fixes the issue and is a lot cleaner than what I
> came up with...

I sent a couple of patches to the mailing list that will require the
qt and kde packages to be rebuilt (like the update to qt 5.7.0). Do
you mind if I apply your patch when I push mine, so that we can avoid
having unnecessary rebuilds?

David

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: QtHaveModule
  2016-08-16 18:49   ` QtHaveModule David Craven
@ 2016-08-17 11:06     ` 宋文武
  0 siblings, 0 replies; 6+ messages in thread
From: 宋文武 @ 2016-08-17 11:06 UTC (permalink / raw)
  To: David Craven; +Cc: guix-devel

David Craven <david@craven.ch> writes:

> Hi
>
>>> Hi, I just sent a patch to add 'QMAKEPATH' as search-path, which should
>>> fix this issue.
>
>> Thank you! Yes this fixes the issue and is a lot cleaner than what I
>> came up with...
>
> I sent a couple of patches to the mailing list that will require the
> qt and kde packages to be rebuilt (like the update to qt 5.7.0). Do
> you mind if I apply your patch when I push mine, so that we can avoid
> having unnecessary rebuilds?

That's great, yes please push!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-17 11:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-09 19:04 QtHaveModule David Craven
2016-08-14  6:25 ` QtHaveModule 宋文武
2016-08-14 17:41 ` QtHaveModule David Craven
2016-08-16 18:49   ` QtHaveModule David Craven
2016-08-17 11:06     ` QtHaveModule 宋文武
  -- strict thread matches above, loose matches on Subject: below --
2016-08-04 23:19 QtHaveModule Andreas Enge

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).