* [PATCH] python3: Fix nativesdk build
@ 2015-08-04 14:52 Gary Thomas
2015-08-04 14:56 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2015-08-04 14:52 UTC (permalink / raw)
To: openembedded-core; +Cc: Gary Thomas
The nativesdk package is built without Py_DEBUG which causes some
compile errors. This patch fixes those errors allowing the nativesdk
package to build.
Signed-off-by: Gary Thomas <gary@mlbassoc.com>
---
.../python/python3/fix-nativesdk-build.patch | 28 ++++++++++++++++++++++
meta/recipes-devtools/python/python3_3.4.3.bb | 1 +
2 files changed, 29 insertions(+)
create mode 100644 meta/recipes-devtools/python/python3/fix-nativesdk-build.patch
diff --git a/meta/recipes-devtools/python/python3/fix-nativesdk-build.patch b/meta/recipes-devtools/python/python3/fix-nativesdk-build.patch
new file mode 100644
index 0000000..d0cba39
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/fix-nativesdk-build.patch
@@ -0,0 +1,28 @@
+Index: Python-3.4.3/Objects/unicodeobject.c
+===================================================================
+--- Python-3.4.3.orig/Objects/unicodeobject.c
++++ Python-3.4.3/Objects/unicodeobject.c
+@@ -418,6 +418,9 @@ _PyUnicode_CheckConsistency(PyObject *op
+ }
+ return 1;
+ }
++#else
++int
++_PyUnicode_CheckConsistency(PyObject *op, int check_content) { return 1; }
+ #endif
+
+ static PyObject*
+Index: Python-3.4.3/Objects/obmalloc.c
+===================================================================
+--- Python-3.4.3.orig/Objects/obmalloc.c
++++ Python-3.4.3/Objects/obmalloc.c
+@@ -2141,7 +2141,9 @@ _PyObject_DebugMallocStats(FILE *out)
+
+ if (p->ref.count == 0) {
+ /* currently unused */
++#ifdef Py_DEBUG
+ assert(pool_is_in_list(p, arenas[i].freepools));
++#endif
+ continue;
+ }
+ ++numpools[sz];
diff --git a/meta/recipes-devtools/python/python3_3.4.3.bb b/meta/recipes-devtools/python/python3_3.4.3.bb
index 6c2e21d..582f6b0 100644
--- a/meta/recipes-devtools/python/python3_3.4.3.bb
+++ b/meta/recipes-devtools/python/python3_3.4.3.bb
@@ -38,6 +38,7 @@ SRC_URI += "\
file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
file://setup.py-find-libraries-in-staging-dirs.patch \
"
+SRC_URI_append_class-nativesdk = "file://fix-nativesdk-build.patch"
SRC_URI[md5sum] = "7d092d1bba6e17f0d9bd21b49e441dd5"
SRC_URI[sha256sum] = "b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8"
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] python3: Fix nativesdk build
2015-08-04 14:52 [PATCH] python3: Fix nativesdk build Gary Thomas
@ 2015-08-04 14:56 ` Richard Purdie
2015-08-04 15:08 ` Gary Thomas
0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2015-08-04 14:56 UTC (permalink / raw)
To: Gary Thomas; +Cc: openembedded-core
On Tue, 2015-08-04 at 08:52 -0600, Gary Thomas wrote:
> The nativesdk package is built without Py_DEBUG which causes some
> compile errors. This patch fixes those errors allowing the nativesdk
> package to build.
>
> Signed-off-by: Gary Thomas <gary@mlbassoc.com>
> ---
> .../python/python3/fix-nativesdk-build.patch | 28 ++++++++++++++++++++++
> meta/recipes-devtools/python/python3_3.4.3.bb | 1 +
> 2 files changed, 29 insertions(+)
> create mode 100644 meta/recipes-devtools/python/python3/fix-nativesdk-build.patch
>
> diff --git a/meta/recipes-devtools/python/python3/fix-nativesdk-build.patch b/meta/recipes-devtools/python/python3/fix-nativesdk-build.patch
No description of the patch or Upstream-Status. I'm surprised python
would have this issue. Do they not recommend building in this
configuration or not support/test it?
I'm just worried what other issues we might run into as a result of
this.
Cheers,
Richard
> new file mode 100644
> index 0000000..d0cba39
> --- /dev/null
> +++ b/meta/recipes-devtools/python/python3/fix-nativesdk-build.patch
> @@ -0,0 +1,28 @@
> +Index: Python-3.4.3/Objects/unicodeobject.c
> +===================================================================
> +--- Python-3.4.3.orig/Objects/unicodeobject.c
> ++++ Python-3.4.3/Objects/unicodeobject.c
> +@@ -418,6 +418,9 @@ _PyUnicode_CheckConsistency(PyObject *op
> + }
> + return 1;
> + }
> ++#else
> ++int
> ++_PyUnicode_CheckConsistency(PyObject *op, int check_content) { return 1; }
> + #endif
> +
> + static PyObject*
> +Index: Python-3.4.3/Objects/obmalloc.c
> +===================================================================
> +--- Python-3.4.3.orig/Objects/obmalloc.c
> ++++ Python-3.4.3/Objects/obmalloc.c
> +@@ -2141,7 +2141,9 @@ _PyObject_DebugMallocStats(FILE *out)
> +
> + if (p->ref.count == 0) {
> + /* currently unused */
> ++#ifdef Py_DEBUG
> + assert(pool_is_in_list(p, arenas[i].freepools));
> ++#endif
> + continue;
> + }
> + ++numpools[sz];
> diff --git a/meta/recipes-devtools/python/python3_3.4.3.bb b/meta/recipes-devtools/python/python3_3.4.3.bb
> index 6c2e21d..582f6b0 100644
> --- a/meta/recipes-devtools/python/python3_3.4.3.bb
> +++ b/meta/recipes-devtools/python/python3_3.4.3.bb
> @@ -38,6 +38,7 @@ SRC_URI += "\
> file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
> file://setup.py-find-libraries-in-staging-dirs.patch \
> "
> +SRC_URI_append_class-nativesdk = "file://fix-nativesdk-build.patch"
> SRC_URI[md5sum] = "7d092d1bba6e17f0d9bd21b49e441dd5"
> SRC_URI[sha256sum] = "b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8"
>
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] python3: Fix nativesdk build
2015-08-04 14:56 ` Richard Purdie
@ 2015-08-04 15:08 ` Gary Thomas
2015-08-05 18:53 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2015-08-04 15:08 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
On 2015-08-04 08:56, Richard Purdie wrote:
> On Tue, 2015-08-04 at 08:52 -0600, Gary Thomas wrote:
>> The nativesdk package is built without Py_DEBUG which causes some
>> compile errors. This patch fixes those errors allowing the nativesdk
>> package to build.
>>
>> Signed-off-by: Gary Thomas <gary@mlbassoc.com>
>> ---
>> .../python/python3/fix-nativesdk-build.patch | 28 ++++++++++++++++++++++
>> meta/recipes-devtools/python/python3_3.4.3.bb | 1 +
>> 2 files changed, 29 insertions(+)
>> create mode 100644 meta/recipes-devtools/python/python3/fix-nativesdk-build.patch
>>
>> diff --git a/meta/recipes-devtools/python/python3/fix-nativesdk-build.patch b/meta/recipes-devtools/python/python3/fix-nativesdk-build.patch
>
> No description of the patch or Upstream-Status. I'm surprised python
> would have this issue. Do they not recommend building in this
> configuration or not support/test it?
I'm not sure - obviously it's not done often (as it breaks badly)
Maybe it would be cleaner just to let Py_DEBUG be set for the nativesdk
build but I couldn't see how/why this is not set in this case.
>
> I'm just worried what other issues we might run into as a result of
> this.
The changes only affect some asserts which the original code sometimes
protects with #ifdef Py_DEBUG but other times does not so I don't see
that it would have any detrimental side-effects.
>> new file mode 100644
>> index 0000000..d0cba39
>> --- /dev/null
>> +++ b/meta/recipes-devtools/python/python3/fix-nativesdk-build.patch
>> @@ -0,0 +1,28 @@
>> +Index: Python-3.4.3/Objects/unicodeobject.c
>> +===================================================================
>> +--- Python-3.4.3.orig/Objects/unicodeobject.c
>> ++++ Python-3.4.3/Objects/unicodeobject.c
>> +@@ -418,6 +418,9 @@ _PyUnicode_CheckConsistency(PyObject *op
>> + }
>> + return 1;
>> + }
>> ++#else
>> ++int
>> ++_PyUnicode_CheckConsistency(PyObject *op, int check_content) { return 1; }
>> + #endif
>> +
>> + static PyObject*
>> +Index: Python-3.4.3/Objects/obmalloc.c
>> +===================================================================
>> +--- Python-3.4.3.orig/Objects/obmalloc.c
>> ++++ Python-3.4.3/Objects/obmalloc.c
>> +@@ -2141,7 +2141,9 @@ _PyObject_DebugMallocStats(FILE *out)
>> +
>> + if (p->ref.count == 0) {
>> + /* currently unused */
>> ++#ifdef Py_DEBUG
>> + assert(pool_is_in_list(p, arenas[i].freepools));
>> ++#endif
>> + continue;
>> + }
>> + ++numpools[sz];
>> diff --git a/meta/recipes-devtools/python/python3_3.4.3.bb b/meta/recipes-devtools/python/python3_3.4.3.bb
>> index 6c2e21d..582f6b0 100644
>> --- a/meta/recipes-devtools/python/python3_3.4.3.bb
>> +++ b/meta/recipes-devtools/python/python3_3.4.3.bb
>> @@ -38,6 +38,7 @@ SRC_URI += "\
>> file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
>> file://setup.py-find-libraries-in-staging-dirs.patch \
>> "
>> +SRC_URI_append_class-nativesdk = "file://fix-nativesdk-build.patch"
>> SRC_URI[md5sum] = "7d092d1bba6e17f0d9bd21b49e441dd5"
>> SRC_URI[sha256sum] = "b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8"
>>
>> --
>> 1.9.1
>>
>
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] python3: Fix nativesdk build
2015-08-04 15:08 ` Gary Thomas
@ 2015-08-05 18:53 ` Richard Purdie
0 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2015-08-05 18:53 UTC (permalink / raw)
To: Gary Thomas; +Cc: openembedded-core
On Tue, 2015-08-04 at 09:08 -0600, Gary Thomas wrote:
> On 2015-08-04 08:56, Richard Purdie wrote:
> > On Tue, 2015-08-04 at 08:52 -0600, Gary Thomas wrote:
> >> The nativesdk package is built without Py_DEBUG which causes some
> >> compile errors. This patch fixes those errors allowing the nativesdk
> >> package to build.
> >>
> >> Signed-off-by: Gary Thomas <gary@mlbassoc.com>
> >> ---
> >> .../python/python3/fix-nativesdk-build.patch | 28 ++++++++++++++++++++++
> >> meta/recipes-devtools/python/python3_3.4.3.bb | 1 +
> >> 2 files changed, 29 insertions(+)
> >> create mode 100644 meta/recipes-devtools/python/python3/fix-nativesdk-build.patch
> >>
> >> diff --git a/meta/recipes-devtools/python/python3/fix-nativesdk-build.patch b/meta/recipes-devtools/python/python3/fix-nativesdk-build.patch
> >
> > No description of the patch or Upstream-Status. I'm surprised python
> > would have this issue. Do they not recommend building in this
> > configuration or not support/test it?
>
> I'm not sure - obviously it's not done often (as it breaks badly)
>
> Maybe it would be cleaner just to let Py_DEBUG be set for the nativesdk
> build but I couldn't see how/why this is not set in this case.
This is what really worries me. I think we likely should be setting this
and the question is therefore why isn't it set?
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-08-05 18:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-04 14:52 [PATCH] python3: Fix nativesdk build Gary Thomas
2015-08-04 14:56 ` Richard Purdie
2015-08-04 15:08 ` Gary Thomas
2015-08-05 18:53 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox