All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] qt5webkit: host-python dependency issue in Python3 environment
@ 2016-10-14  7:53 Yegor Yefremov
  2016-10-14  7:56 ` Yegor Yefremov
  2016-10-14 13:57 ` Thomas Petazzoni
  0 siblings, 2 replies; 6+ messages in thread
From: Yegor Yefremov @ 2016-10-14  7:53 UTC (permalink / raw)
  To: buildroot

My project uses both Python3 and Qt5 including qt5webkit package. The
problem in this particular constellation is, that
output/target/usr/bin/python is a symlink to
output/host/usr/bin/python2. i.e. host-python2 will be also built.
This makes python usage on target impossible.

I think this happens because qt5webkit has host-python dependency
regardless of the selected Python flavor.

Can qt5webkit be also built with host-python3?

Regards,
Yegor

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

* [Buildroot] qt5webkit: host-python dependency issue in Python3 environment
  2016-10-14  7:53 [Buildroot] qt5webkit: host-python dependency issue in Python3 environment Yegor Yefremov
@ 2016-10-14  7:56 ` Yegor Yefremov
  2016-10-14  8:56   ` Yegor Yefremov
  2016-10-14 13:57 ` Thomas Petazzoni
  1 sibling, 1 reply; 6+ messages in thread
From: Yegor Yefremov @ 2016-10-14  7:56 UTC (permalink / raw)
  To: buildroot

On Fri, Oct 14, 2016 at 9:53 AM, Yegor Yefremov
<yegorslists@googlemail.com> wrote:
> My project uses both Python3 and Qt5 including qt5webkit package. The
> problem in this particular constellation is, that
> output/target/usr/bin/python is a symlink to
> output/host/usr/bin/python2. i.e. host-python2 will be also built.
> This makes python usage on target impossible.
>
> I think this happens because qt5webkit has host-python dependency
> regardless of the selected Python flavor.
>
> Can qt5webkit be also built with host-python3?

I've just seen that Johan Derycke encounters this issue too.

Yegor

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

* [Buildroot] qt5webkit: host-python dependency issue in Python3 environment
  2016-10-14  7:56 ` Yegor Yefremov
@ 2016-10-14  8:56   ` Yegor Yefremov
  2016-10-14 12:16     ` Johan Derycke
  0 siblings, 1 reply; 6+ messages in thread
From: Yegor Yefremov @ 2016-10-14  8:56 UTC (permalink / raw)
  To: buildroot

On Fri, Oct 14, 2016 at 9:56 AM, Yegor Yefremov
<yegorslists@googlemail.com> wrote:
> On Fri, Oct 14, 2016 at 9:53 AM, Yegor Yefremov
> <yegorslists@googlemail.com> wrote:
>> My project uses both Python3 and Qt5 including qt5webkit package. The
>> problem in this particular constellation is, that
>> output/target/usr/bin/python is a symlink to
>> output/host/usr/bin/python2. i.e. host-python2 will be also built.
>> This makes python usage on target impossible.
>>
>> I think this happens because qt5webkit has host-python dependency
>> regardless of the selected Python flavor.
>>
>> Can qt5webkit be also built with host-python3?
>
> I've just seen that Johan Derycke encounters this issue too.

I've removed output/build/host-python-2.7.12 and made following hack:

diff --git a/package/qt5/qt5webkit/qt5webkit.mk
b/package/qt5/qt5webkit/qt5webkit.mk
index a47a235..b2db756 100644
--- a/package/qt5/qt5webkit/qt5webkit.mk
+++ b/package/qt5/qt5webkit/qt5webkit.mk
@@ -9,7 +9,7 @@ QT5WEBKIT_VERSION = b889f460280ad98c89ede179bd3b9ce9cb02002b
 # The http://code.qt.io/cgit/qt/qtwebkit.git/ repo doesn't allow to do so.
 QT5WEBKIT_SITE = $(call github,qtproject,qtwebkit,$(QT5WEBKIT_VERSION))
 QT5WEBKIT_DEPENDENCIES = \
-       host-bison host-flex host-gperf host-python host-ruby \
+       host-bison host-flex host-gperf host-python3 host-ruby \
        qt5base sqlite
 QT5WEBKIT_INSTALL_STAGING = YES

@@ -37,11 +37,11 @@ endif
 # around this by forcing python2 early in the PATH, via a python->python2
 # symlink.
 QT5WEBKIT_ENV = PATH=$(@D)/bin:$(BR_PATH)
-define QT5WEBKIT_PYTHON2_SYMLINK
-       mkdir -p $(@D)/bin
-       ln -sf $(HOST_DIR)/usr/bin/python2 $(@D)/bin/python
-endef
-QT5WEBKIT_PRE_CONFIGURE_HOOKS += QT5WEBKIT_PYTHON2_SYMLINK
+#define QT5WEBKIT_PYTHON2_SYMLINK
+#      mkdir -p $(@D)/bin
+#      ln -sf $(HOST_DIR)/usr/bin/python2 $(@D)/bin/python
+#endef
+#QT5WEBKIT_PRE_CONFIGURE_HOOKS += QT5WEBKIT_PYTHON2_SYMLINK

 # Since we get the source from git, generated header files are not included.
 # qmake detects that header file generation (using the syncqt tool) must be

After this I've removed output/build/qt5webkit and rebuilt it. It worked.

@Johan, @Yann could you test this?

I've seen some commits regarding Python 3 build support. Even from
Samuel Martin.

Yegor

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

* [Buildroot] qt5webkit: host-python dependency issue in Python3 environment
  2016-10-14  8:56   ` Yegor Yefremov
@ 2016-10-14 12:16     ` Johan Derycke
  0 siblings, 0 replies; 6+ messages in thread
From: Johan Derycke @ 2016-10-14 12:16 UTC (permalink / raw)
  To: buildroot

Works for me.
It adds another dependency to my project (host-python3) but I can live with
that.

Johan

On Fri, 14 Oct 2016 at 10:57 Yegor Yefremov <yegorslists@googlemail.com>
wrote:

> On Fri, Oct 14, 2016 at 9:56 AM, Yegor Yefremov
> <yegorslists@googlemail.com> wrote:
> > On Fri, Oct 14, 2016 at 9:53 AM, Yegor Yefremov
> > <yegorslists@googlemail.com> wrote:
> >> My project uses both Python3 and Qt5 including qt5webkit package. The
> >> problem in this particular constellation is, that
> >> output/target/usr/bin/python is a symlink to
> >> output/host/usr/bin/python2. i.e. host-python2 will be also built.
> >> This makes python usage on target impossible.
> >>
> >> I think this happens because qt5webkit has host-python dependency
> >> regardless of the selected Python flavor.
> >>
> >> Can qt5webkit be also built with host-python3?
> >
> > I've just seen that Johan Derycke encounters this issue too.
>
> I've removed output/build/host-python-2.7.12 and made following hack:
>
> diff --git a/package/qt5/qt5webkit/qt5webkit.mk
> b/package/qt5/qt5webkit/qt5webkit.mk
> index a47a235..b2db756 100644
> --- a/package/qt5/qt5webkit/qt5webkit.mk
> +++ b/package/qt5/qt5webkit/qt5webkit.mk
> @@ -9,7 +9,7 @@ QT5WEBKIT_VERSION =
> b889f460280ad98c89ede179bd3b9ce9cb02002b
>  # The http://code.qt.io/cgit/qt/qtwebkit.git/ repo doesn't allow to do
> so.
>  QT5WEBKIT_SITE = $(call github,qtproject,qtwebkit,$(QT5WEBKIT_VERSION))
>  QT5WEBKIT_DEPENDENCIES = \
> -       host-bison host-flex host-gperf host-python host-ruby \
> +       host-bison host-flex host-gperf host-python3 host-ruby \
>         qt5base sqlite
>  QT5WEBKIT_INSTALL_STAGING = YES
>
> @@ -37,11 +37,11 @@ endif
>  # around this by forcing python2 early in the PATH, via a python->python2
>  # symlink.
>  QT5WEBKIT_ENV = PATH=$(@D)/bin:$(BR_PATH)
> -define QT5WEBKIT_PYTHON2_SYMLINK
> -       mkdir -p $(@D)/bin
> -       ln -sf $(HOST_DIR)/usr/bin/python2 $(@D)/bin/python
> -endef
> -QT5WEBKIT_PRE_CONFIGURE_HOOKS += QT5WEBKIT_PYTHON2_SYMLINK
> +#define QT5WEBKIT_PYTHON2_SYMLINK
> +#      mkdir -p $(@D)/bin
> +#      ln -sf $(HOST_DIR)/usr/bin/python2 $(@D)/bin/python
> +#endef
> +#QT5WEBKIT_PRE_CONFIGURE_HOOKS += QT5WEBKIT_PYTHON2_SYMLINK
>
>  # Since we get the source from git, generated header files are not
> included.
>  # qmake detects that header file generation (using the syncqt tool) must
> be
>
> After this I've removed output/build/qt5webkit and rebuilt it. It worked.
>
> @Johan, @Yann could you test this?
>
> I've seen some commits regarding Python 3 build support. Even from
> Samuel Martin.
>
> Yegor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20161014/3cc6d169/attachment.html>

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

* [Buildroot] qt5webkit: host-python dependency issue in Python3 environment
  2016-10-14  7:53 [Buildroot] qt5webkit: host-python dependency issue in Python3 environment Yegor Yefremov
  2016-10-14  7:56 ` Yegor Yefremov
@ 2016-10-14 13:57 ` Thomas Petazzoni
  2016-10-14 14:04   ` Arnout Vandecappelle
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2016-10-14 13:57 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 14 Oct 2016 09:53:53 +0200, Yegor Yefremov wrote:
> My project uses both Python3 and Qt5 including qt5webkit package. The
> problem in this particular constellation is, that
> output/target/usr/bin/python is a symlink to
> output/host/usr/bin/python2.

Hu? target/usr/bin/python is a symlink to host/usr/bin/python2 ? Are
you sure ? If so, this is the problem, not the qt5webkit dependency on
host-python.

If you have a Python 3 enabled system, and qt5webkit is enabled, you
should have the following situation:

 - target/usr/bin/python -> target/usr/bin/python3
 - host/usr/bin/python -> host/usr/bin/python3
 - host/usr/bin/python2

I.e, Python 3 is the "default" version, but Python 2 for the host is
also available, if called explicitly using host/usr/bin/python2.

So, I don't understand your original problem.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] qt5webkit: host-python dependency issue in Python3 environment
  2016-10-14 13:57 ` Thomas Petazzoni
@ 2016-10-14 14:04   ` Arnout Vandecappelle
  0 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2016-10-14 14:04 UTC (permalink / raw)
  To: buildroot



On 14-10-16 15:57, Thomas Petazzoni wrote:
> Hello,
> 
> On Fri, 14 Oct 2016 09:53:53 +0200, Yegor Yefremov wrote:
>> My project uses both Python3 and Qt5 including qt5webkit package. The
>> problem in this particular constellation is, that
>> output/target/usr/bin/python is a symlink to
>> output/host/usr/bin/python2.
> 
> Hu? target/usr/bin/python is a symlink to host/usr/bin/python2 ? Are
> you sure ? If so, this is the problem, not the qt5webkit dependency on
> host-python.
> 
> If you have a Python 3 enabled system, and qt5webkit is enabled, you
> should have the following situation:
> 
>  - target/usr/bin/python -> target/usr/bin/python3
>  - host/usr/bin/python -> host/usr/bin/python3
>  - host/usr/bin/python2
> 
> I.e, Python 3 is the "default" version, but Python 2 for the host is
> also available, if called explicitly using host/usr/bin/python2.
> 
> So, I don't understand your original problem.

 As reported by Johan Derycke in a different thread:

> I think there is an issue with this patch.
> 
> We make a link in $(@D)/bin/python:
> 
> define QT5WEBKIT_PYTHON2_SYMLINK
>   echo  $(@D)
>   mkdir -p $(@D)/bin
>   ln -sf $(HOST_DIR)/usr/bin/python2 $(@D)/bin/python
> endef
> 
> 
> But QT5WEBKIT_INSTALL_TARGET_CMDS copies $(@D)/bin/python to the target dir:
> 
> define QT5WEBKIT_INSTALL_TARGET_CMDS
>   cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebKit*.so.* $(TARGET_DIR)/usr/lib
>   cp -dpf $(@D)/bin/* $(TARGET_DIR)/usr/bin/
>   $(QT5WEBKIT_INSTALL_TARGET_QMLS)
> endef
> 
> This overwrites the target python link with a bogus one.
> 
> The bin folder only contains 'jsc' which don't need. So removing the cp solves it for me.

 jsc is a command-line standalone javascript executor, which is used for webkit
tests. It's not really meant for anything else though it _could_ be used to do
some kind of simplified node.js. So we could either copy just jsc, or not copy
anything from the bin directory at all. Alternatively, use a different subdir of
$(@D), e.g. $(@D)/host-python-bin.

 Yegor or Johan, care to submit a patch that takes either of these approaches?


 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

end of thread, other threads:[~2016-10-14 14:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-14  7:53 [Buildroot] qt5webkit: host-python dependency issue in Python3 environment Yegor Yefremov
2016-10-14  7:56 ` Yegor Yefremov
2016-10-14  8:56   ` Yegor Yefremov
2016-10-14 12:16     ` Johan Derycke
2016-10-14 13:57 ` Thomas Petazzoni
2016-10-14 14:04   ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.