Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] python-pyqt: fix compile on x86
@ 2015-04-20 15:29 Gwenhael Goavec-Merou
  2015-04-20 15:29 ` [Buildroot] [PATCH 2/3] python-pyqt: fix install Gwenhael Goavec-Merou
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Gwenhael Goavec-Merou @ 2015-04-20 15:29 UTC (permalink / raw)
  To: buildroot

From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

fix :
http://autobuild.buildroot.net/results/e2a/e2ab7e2e61aaa5758a3a572ae25a047e802fdcc0/

According to configure-ng.py, PyQt_qreal_double must be disabled only for ARM
target.

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
 package/python-pyqt/python-pyqt.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/package/python-pyqt/python-pyqt.mk b/package/python-pyqt/python-pyqt.mk
index 2363f7d..808837e 100644
--- a/package/python-pyqt/python-pyqt.mk
+++ b/package/python-pyqt/python-pyqt.mk
@@ -33,13 +33,17 @@ endif
 # Turn off features that aren't available in QWS and current qt
 # configuration.
 PYTHON_PYQT_QTDETAIL_DISABLE_FEATURES = \
-	PyQt_Accessibility PyQt_SessionManager PyQt_qreal_double \
+	PyQt_Accessibility PyQt_SessionManager \
 	PyQt_Shortcut PyQt_RawFont
 
 ifeq ($(BR2_PACKAGE_QT_OPENSSL),)
 PYTHON_PYQT_QTDETAIL_DISABLE_FEATURES += PyQt_OpenSSL
 endif
 
+ifeq ($(BR2_arm)$(BR2_armeb),y)
+PYTHON_PYQT_QTDETAIL_DISABLE_FEATURES += PyQt_qreal_double
+endif
+
 define PYTHON_PYQT_QTDETAIL
 	echo $(1) >> $(2)/qtdetail.out
 endef
-- 
2.0.5

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

* [Buildroot] [PATCH 2/3] python-pyqt: fix install
  2015-04-20 15:29 [Buildroot] [PATCH 1/3] python-pyqt: fix compile on x86 Gwenhael Goavec-Merou
@ 2015-04-20 15:29 ` Gwenhael Goavec-Merou
  2015-04-20 15:37   ` Thomas Petazzoni
  2015-04-20 15:29 ` [Buildroot] [PATCH 3/3] qt: fix webkit dependencies Gwenhael Goavec-Merou
  2015-04-20 21:07 ` [Buildroot] [PATCH 1/3] python-pyqt: fix compile on x86 Thomas Petazzoni
  2 siblings, 1 reply; 7+ messages in thread
From: Gwenhael Goavec-Merou @ 2015-04-20 15:29 UTC (permalink / raw)
  To: buildroot

From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

PyQt4 provides two version for some py files: one for python2.x and one for
python3.x. This two versions are installed in TARGET_DIR.
After installing files, python is used to generate all .pyc files, but fails
like :
class ProxyBase(metaclass=ProxyMetaclass):
                             ^
							 SyntaxError: invalid syntax

This patch supdress directory for not targeted python version.

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
 package/python-pyqt/python-pyqt.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/python-pyqt/python-pyqt.mk b/package/python-pyqt/python-pyqt.mk
index 808837e..e7ab3a6 100644
--- a/package/python-pyqt/python-pyqt.mk
+++ b/package/python-pyqt/python-pyqt.mk
@@ -14,8 +14,10 @@ PYTHON_PYQT_DEPENDENCIES = python-sip host-python-sip qt
 
 ifeq ($(BR2_PACKAGE_PYTHON),y)
 PYTHON_PYQT_PYTHON_DIR = python$(PYTHON_VERSION_MAJOR)
+PYTHON_PYQT_RM_PORT_BASE = port_v3
 else ifeq ($(BR2_PACKAGE_PYTHON3),y)
 PYTHON_PYQT_PYTHON_DIR = python$(PYTHON3_VERSION_MAJOR)
+PYTHON_PYQT_RM_PORT_BASE = port_v2
 endif
 
 ifeq ($(BR2_PACKAGE_QT_EMBEDDED),y)
@@ -97,6 +99,7 @@ endef
 define PYTHON_PYQT_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) install
 	touch $(TARGET_DIR)/usr/lib/$(PYTHON_PYQT_PYTHON_DIR)/site-packages/PyQt4/__init__.py
+	$(RM) -rf $(TARGET_DIR)/usr/lib/$(PYTHON_PYQT_PYTHON_DIR)/site-packages/PyQt4/uic/$(PYTHON_PYQT_RM_PORT_BASE)
 	PYTHONPATH="$(PYTHON_PATH)" \
 		$(HOST_DIR)/usr/bin/python -c "import compileall; \
 		compileall.compile_dir('$(TARGET_DIR)/usr/lib/$(PYTHON_PYQT_PYTHON_DIR)/site-packages/PyQt4')"
-- 
2.0.5

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

* [Buildroot] [PATCH 3/3] qt: fix webkit dependencies
  2015-04-20 15:29 [Buildroot] [PATCH 1/3] python-pyqt: fix compile on x86 Gwenhael Goavec-Merou
  2015-04-20 15:29 ` [Buildroot] [PATCH 2/3] python-pyqt: fix install Gwenhael Goavec-Merou
@ 2015-04-20 15:29 ` Gwenhael Goavec-Merou
  2015-04-20 21:07 ` [Buildroot] [PATCH 1/3] python-pyqt: fix compile on x86 Thomas Petazzoni
  2 siblings, 0 replies; 7+ messages in thread
From: Gwenhael Goavec-Merou @ 2015-04-20 15:29 UTC (permalink / raw)
  To: buildroot

From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

qtwebkit includes qscript headers. 
For packages like python-pyqt if webkit is available but not qscript, the
compilation fails with :
buildroot/output/build/python-pyqt-4.11.3/sip/QtWebKit/qwebframe.sip:79:0:
../../../host/usr/i686-buildroot-linux-gnu/sysroot/usr/include/QtWebKit/qwebframe.h:28:36:
	fatal error: QtScript/qscriptengine.h: No such file or directory

This problem is not seen with Qt compilation because some relative include
directly from sources are added.

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
 package/qt/Config.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/qt/Config.in b/package/qt/Config.in
index 43f5a0f..f6ca054 100644
--- a/package/qt/Config.in
+++ b/package/qt/Config.in
@@ -417,6 +417,7 @@ config BR2_PACKAGE_QT_ARCH_SUPPORTS_WEBKIT
 
 config BR2_PACKAGE_QT_WEBKIT
 	bool "WebKit Module"
+	depends on BR2_PACKAGE_QT_SCRIPT
 	depends on BR2_PACKAGE_QT_SHARED
 	depends on BR2_PACKAGE_QT_GUI_MODULE
 	depends on BR2_PACKAGE_QT_NETWORK
@@ -427,7 +428,8 @@ config BR2_PACKAGE_QT_WEBKIT
 	  If unsure, say n.
 
 comment "WebKit needs shared library/NPTL toolchain/gui/network support"
-	depends on !(BR2_PACKAGE_QT_SHARED && BR2_PACKAGE_QT_GUI_MODULE && BR2_PACKAGE_QT_NETWORK)
+	depends on !(BR2_PACKAGE_QT_SCRIPT && BR2_PACKAGE_QT_SHARED && \
+		BR2_PACKAGE_QT_GUI_MODULE && BR2_PACKAGE_QT_NETWORK)
 	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	depends on BR2_PACKAGE_QT_ARCH_SUPPORTS_WEBKIT
 
-- 
2.0.5

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

* [Buildroot] [PATCH 2/3] python-pyqt: fix install
  2015-04-20 15:29 ` [Buildroot] [PATCH 2/3] python-pyqt: fix install Gwenhael Goavec-Merou
@ 2015-04-20 15:37   ` Thomas Petazzoni
  2015-04-20 15:45     ` gwenhael.goavec
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2015-04-20 15:37 UTC (permalink / raw)
  To: buildroot

Dear Gwenhael Goavec-Merou,

On Mon, 20 Apr 2015 17:29:18 +0200, Gwenhael Goavec-Merou wrote:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> 
> PyQt4 provides two version for some py files: one for python2.x and one for
> python3.x. This two versions are installed in TARGET_DIR.
> After installing files, python is used to generate all .pyc files, but fails
> like :
> class ProxyBase(metaclass=ProxyMetaclass):
>                              ^
> 							 SyntaxError: invalid syntax

I did not encounter this issue when testing. With which configuration
do you get this problem?

Thanks,

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

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

* [Buildroot] [PATCH 2/3] python-pyqt: fix install
  2015-04-20 15:37   ` Thomas Petazzoni
@ 2015-04-20 15:45     ` gwenhael.goavec
  2015-04-20 21:02       ` Arnout Vandecappelle
  0 siblings, 1 reply; 7+ messages in thread
From: gwenhael.goavec @ 2015-04-20 15:45 UTC (permalink / raw)
  To: buildroot

Dear Thomas Petazzoni,

On Mon, 20 Apr 2015 17:37:52 +0200
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:

> Dear Gwenhael Goavec-Merou,
> 
> On Mon, 20 Apr 2015 17:29:18 +0200, Gwenhael Goavec-Merou wrote:
> > From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> > 
> > PyQt4 provides two version for some py files: one for python2.x and one for
> > python3.x. This two versions are installed in TARGET_DIR.
> > After installing files, python is used to generate all .pyc files, but fails
> > like :
> > class ProxyBase(metaclass=ProxyMetaclass):
> >                              ^
> > 							 SyntaxError: invalid syntax
> 
> I did not encounter this issue when testing. With which configuration
> do you get this problem?
> 
I have used the defconfig provided by :
http://autobuild.buildroot.net/results/e2a/e2ab7e2e61aaa5758a3a572ae25a047e802fdcc0/

> Thanks,
> 
> Thomas

Regards,
Gwen

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

* [Buildroot] [PATCH 2/3] python-pyqt: fix install
  2015-04-20 15:45     ` gwenhael.goavec
@ 2015-04-20 21:02       ` Arnout Vandecappelle
  0 siblings, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle @ 2015-04-20 21:02 UTC (permalink / raw)
  To: buildroot

On 20/04/15 17:45, gwenhael.goavec wrote:
> Dear Thomas Petazzoni,
> 
> On Mon, 20 Apr 2015 17:37:52 +0200
> Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:
> 
>> Dear Gwenhael Goavec-Merou,
>>
>> On Mon, 20 Apr 2015 17:29:18 +0200, Gwenhael Goavec-Merou wrote:
>>> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
>>>
>>> PyQt4 provides two version for some py files: one for python2.x and one for
>>> python3.x. This two versions are installed in TARGET_DIR.
>>> After installing files, python is used to generate all .pyc files, but fails
>>> like :
>>> class ProxyBase(metaclass=ProxyMetaclass):
>>>                              ^
>>> 							 SyntaxError: invalid syntax
>>
>> I did not encounter this issue when testing. With which configuration
>> do you get this problem?
>>
> I have used the defconfig provided by :
> http://autobuild.buildroot.net/results/e2a/e2ab7e2e61aaa5758a3a572ae25a047e802fdcc0/

 When you submit a patch that fixes an autobuild failure, you should mention
that in the commit log, like:

Fixes:
http://autobuild.buildroot.net/results/e2a/e2ab7e2e61aaa5758a3a572ae25a047e802fdcc0/



 Regards,
 Arnout


> 
>> Thanks,
>>
>> Thomas
> 
> Regards,
> Gwen
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 
> 


-- 
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 1/3] python-pyqt: fix compile on x86
  2015-04-20 15:29 [Buildroot] [PATCH 1/3] python-pyqt: fix compile on x86 Gwenhael Goavec-Merou
  2015-04-20 15:29 ` [Buildroot] [PATCH 2/3] python-pyqt: fix install Gwenhael Goavec-Merou
  2015-04-20 15:29 ` [Buildroot] [PATCH 3/3] qt: fix webkit dependencies Gwenhael Goavec-Merou
@ 2015-04-20 21:07 ` Thomas Petazzoni
  2 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2015-04-20 21:07 UTC (permalink / raw)
  To: buildroot

Dear Gwenhael Goavec-Merou,

On Mon, 20 Apr 2015 17:29:17 +0200, Gwenhael Goavec-Merou wrote:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> 
> fix :
> http://autobuild.buildroot.net/results/e2a/e2ab7e2e61aaa5758a3a572ae25a047e802fdcc0/
> 
> According to configure-ng.py, PyQt_qreal_double must be disabled only for ARM
> target.

The situation seems unfortunately to be a bit more complicated. From
the configure-ng.py code:

#if defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) || defined(QT_ARCH_SYMBIAN) || defined(QT_ARCH_VXWORKS)
    out << "PyQt_qreal_double\\n";
#endif

We indeed don't care about Windows CE, Symbian or VxWorks. QT_ARCH_ARM
is handled by your patch. But not QT_NO_FPU. QT_NO_FPU is defined by Qt
in the following situation:

#if defined(QT_ARCH_ARM) || defined(QT_ARCH_ARMV6) || defined(QT_ARCH_AVR32) || (defined(QT_ARCH_MIPS) && (defined(Q_WS_QWS) || defined(Q_WS_QPA) || defined(Q_OS_WINCE))) || defined(QT_ARCH_SH) || defined(QT_ARCH_SH4A)
#define QT_NO_FPU
#endif

So it's not only ARM, but also SH, SH4A and MIPS in QWS apparently.

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

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

end of thread, other threads:[~2015-04-20 21:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-20 15:29 [Buildroot] [PATCH 1/3] python-pyqt: fix compile on x86 Gwenhael Goavec-Merou
2015-04-20 15:29 ` [Buildroot] [PATCH 2/3] python-pyqt: fix install Gwenhael Goavec-Merou
2015-04-20 15:37   ` Thomas Petazzoni
2015-04-20 15:45     ` gwenhael.goavec
2015-04-20 21:02       ` Arnout Vandecappelle
2015-04-20 15:29 ` [Buildroot] [PATCH 3/3] qt: fix webkit dependencies Gwenhael Goavec-Merou
2015-04-20 21:07 ` [Buildroot] [PATCH 1/3] python-pyqt: fix compile on x86 Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox