Skip to contentSkip to conversation

python-imaging: Add patch to fix host sysroot fails

PATCH In review Andrei Gherzan 3 participants 3 messages Jul 8, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python-imaging: Add patch to fix host sysroot fails

---
 .../python/python-imaging/remove-host-libdir.patch | 25 ++++++++++++++++++++++
 .../python/python-imaging_1.1.7.bb                 |  3 ++-
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch
meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch new file +25 -0
new file mode 100644
index 0000000..028a51a
@@ -0,0 +1,25 @@
+Avoid getting host sysroot paths in the library paths to fix issue like:
+
+| /home/andrei/work/yocto/build-rpi-master/tmp/sysroots/x86_64-linux/usr/lib/libz.so: file not recognized: File format not recognized
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Andrei Gherzan <[email protected]>
+
+
+Index: Imaging-1.1.7/setup.py
+===================================================================
+--- Imaging-1.1.7.orig/setup.py
++++ Imaging-1.1.7/setup.py
+@@ -155,11 +155,6 @@ class pil_build_ext(build_ext):
+ 
+         # FIXME: check /opt/stuff directories here?
+ 
+-        prefix = sysconfig.get_config_var("prefix")
+-        if prefix:
+-            add_directory(library_dirs, os.path.join(prefix, "lib"))
+-            add_directory(include_dirs, os.path.join(prefix, "include"))
+-
+         #
+         # locate tkinter libraries
+ 
meta-python/recipes-devtools/python/python-imaging_1.1.7.bb +2 -1
index a678328..d2f1a8c 100644
@@ -9,7 +9,8 @@ PR = "r5"
 SRC_URI = "http://effbot.org/downloads/Imaging-${PV}.tar.gz \
            file://0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch \
            file://allow.to.disable.some.features.patch \
-           file://fix-freetype-includes.patch"
+           file://fix-freetype-includes.patch \
+           file://remove-host-libdir.patch"
 
 SRC_URI[md5sum] = "fc14a54e1ce02a0225be8854bfba478e"
 SRC_URI[sha256sum] = "895bc7c2498c8e1f9b99938f1a40dc86b3f149741f105cf7c7bd2e0725405211"
Signature · 1 line
2.9.0
Acked-by on v1 1/1
#1 lore raw

I built for beaglebone and saw the same error. I did not run-time test.

Since this recipe does not include -native support, this patch seems ok. I have a tingling "not quite the right fix" feeling about it, but...it does fix the error. I assume you have run-time tested?

PIL is really old, any chance pillow would work for your use case?

Quoted 71 lines · Andrei Gherzan
---
 .../python/python-imaging/remove-host-libdir.patch | 25
++++++++++++++++++++++
 .../python/python-imaging_1.1.7.bb                 |  3 ++-
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644

meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch

diff --git a/meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch b/meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch new file mode 100644
index 0000000..028a51a
--- /dev/null
+++
b/meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch

meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch new file +3 -0
@@ -0,0 +1,25 @@
+Avoid getting host sysroot paths in the library paths to fix issue like:
+
+|

/home/andrei/work/yocto/build-rpi-master/tmp/sysroots/x86_64-linux/usr/lib/libz.so:
file not recognized: File format not recognized

meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch new file +22 -0
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Andrei Gherzan <[email protected]>
+
+
+Index: Imaging-1.1.7/setup.py
+===================================================================
+--- Imaging-1.1.7.orig/setup.py
++++ Imaging-1.1.7/setup.py
+@@ -155,11 +155,6 @@ class pil_build_ext(build_ext):
+
+         # FIXME: check /opt/stuff directories here?
+
+-        prefix = sysconfig.get_config_var("prefix")
+-        if prefix:
+-            add_directory(library_dirs, os.path.join(prefix, "lib"))
+-            add_directory(include_dirs, os.path.join(prefix, "include"))
+-
+         #
+         # locate tkinter libraries
+
meta-python/recipes-devtools/python/python-imaging_1.1.7.bb +2 -1
index a678328..d2f1a8c 100644
@@ -9,7 +9,8 @@ PR = "r5"
 SRC_URI = "http://effbot.org/downloads/Imaging-${PV}.tar.gz \
 
 file://0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch \
            file://allow.to.disable.some.features.patch \
-           file://fix-freetype-includes.patch"
+           file://fix-freetype-includes.patch \
+           file://remove-host-libdir.patch"
 
 SRC_URI[md5sum] = "fc14a54e1ce02a0225be8854bfba478e"

SRC_URI[sha256sum] =
"895bc7c2498c8e1f9b99938f1a40dc86b3f149741f105cf7c7bd2e0725405211" --
2.9.0

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#2 lore raw
Quoted 4 lines · Tim Orling

I built for beaglebone and saw the same error. I did not run-time test.

Since this recipe does not include -native support, this patch seems ok.

Native should work fine too. We do capture prefix in environment for all classes of recipes

Quoted 1 line

I have a tingling "not quite the right fix" feeling about it, but...it

does

Quoted 16 lines

fix the error. I assume you have run-time tested?

PIL is really old, any chance pillow would work for your use case?

Quoted 8 lines · Andrei Gherzan
---
 .../python/python-imaging/remove-host-libdir.patch | 25
++++++++++++++++++++++
 .../python/python-imaging_1.1.7.bb                 |  3 ++-
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644

meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch

Quoted 3 lines
Quoted 3 lines

diff --git

a/meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch

Quoted 1 line
Quoted 1 line

b/meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch

Quoted 5 lines
Quoted 5 lines

new file mode 100644
index 0000000..028a51a
--- /dev/null
+++

b/meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch

Quoted 2 lines

Review line 1

Quoted 2 lines
(quoted diff) +1 -0
@@ -0,0 +1,25 @@
+Avoid getting host sysroot paths in the library paths to fix issue

like:

Quoted 3 lines

Review line 3

Quoted 3 lines
(quoted diff) +2 -0
+
+|

/home/andrei/work/yocto/build-rpi-master/tmp/sysroots/x86_64-linux/usr/lib/libz.so:

Quoted 11 lines
Quoted 11 lines

file not recognized: File format not recognized

meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch new file +10 -0
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Andrei Gherzan <[email protected]>
+
+
+Index: Imaging-1.1.7/setup.py
+===================================================================
+--- Imaging-1.1.7.orig/setup.py
++++ Imaging-1.1.7/setup.py
Quoted 8 lines

meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch

Quoted 8 lines

+@@ -155,11 +155,6 @@ class pil_build_ext(build_ext):

meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch new file +7 -0
+
+         # FIXME: check /opt/stuff directories here?
+
+-        prefix = sysconfig.get_config_var("prefix")
+-        if prefix:
+-            add_directory(library_dirs, os.path.join(prefix, "lib"))
+-            add_directory(include_dirs, os.path.join(prefix,

"include"))

Quoted 35 lines
Quoted 24 lines

+-

meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch new file +3 -0
+         #
+         # locate tkinter libraries
+
meta-python/recipes-devtools/python/python-imaging_1.1.7.bb +2 -1
index a678328..d2f1a8c 100644
@@ -9,7 +9,8 @@ PR = "r5"
 SRC_URI = "http://effbot.org/downloads/Imaging-${PV}.tar.gz \
 
 file://0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch \
            file://allow.to.disable.some.features.patch \
-           file://fix-freetype-includes.patch"
+           file://fix-freetype-includes.patch \
+           file://remove-host-libdir.patch"
 
 SRC_URI[md5sum] = "fc14a54e1ce02a0225be8854bfba478e"

SRC_URI[sha256sum] =
"895bc7c2498c8e1f9b99938f1a40dc86b3f149741f105cf7c7bd2e0725405211" --
2.9.0

Quoted 6 lines

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel