* issues with Python 3.8
@ 2019-06-03 21:53 YOUNG, MICHAEL A.
2019-06-03 21:53 ` [Xen-devel] " YOUNG, MICHAEL A.
0 siblings, 1 reply; 2+ messages in thread
From: YOUNG, MICHAEL A. @ 2019-06-03 21:53 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 838 bytes --]
Fedora rawhide is about to to update to Python 3.8 (in beta I think) and
there are two issues with compiling xen with it (see
https://bugzilla.redhat.com/show_bug.cgi?id=1704807 ).
It seems that in 3.8 python3-config --libs no longer includes -lpython3.8
by default which causes tools/configure to fail. You can get -lpython3.8
back by adding --embed , but this option isn't recognized in earlier
versions of python.
It also seems python 3.8 adds the options -Wno-unused-result
-Wsign-compare to the compilations in tools/python (though I am not sure
how this happens) and -Wsign-compare gives some build warnings which the
Fedora build treats as errors.
I have attached the patch I used to get xen-4.12.0 to build with python
3.8 and also the build warnings it fixes in case they are useful.
Michael Young
[-- Attachment #2: xen.python38.patch --]
[-- Type: text/plain, Size: 3062 bytes --]
--- xen-4.12.0/m4/python_devel.m4.orig 2019-05-31 23:30:42.489738121 +0100
+++ xen-4.12.0/m4/python_devel.m4 2019-06-01 17:02:38.886934441 +0100
@@ -24,7 +24,8 @@
dnl If python-config is found use it
CPPFLAGS="$CFLAGS `$PYTHON-config --cflags`"
LDFLAGS="$LDFLAGS `$PYTHON-config --ldflags`"
- LIBS="$LIBS `$PYTHON-config --libs`"
+ LIBSTMP="`$PYTHON-config --libs --embed`" || LIBSTMP="`$PYTHON-config --libs`"
+ LIBS="$LIBS $LIBSTMP"
])
AC_CHECK_HEADER([Python.h], [],
--- xen-4.12.0/tools/configure.orig 2019-05-31 23:30:42.498738452 +0100
+++ xen-4.12.0/tools/configure 2019-06-01 17:08:26.100727658 +0100
@@ -7482,7 +7482,8 @@
CPPFLAGS="$CFLAGS `$PYTHON-config --cflags`"
LDFLAGS="$LDFLAGS `$PYTHON-config --ldflags`"
- LIBS="$LIBS `$PYTHON-config --libs`"
+ LIBSTMP="`$PYTHON-config --libs --embed`" || LIBSTMP="`$PYTHON-config --libs`"
+ LIBS="$LIBS $LIBSTMP"
fi
--- xen-4.12.0/tools/python/xen/lowlevel/xc/xc.c.orig 2019-04-01 12:03:23.000000000 +0100
+++ xen-4.12.0/tools/python/xen/lowlevel/xc/xc.c 2019-06-01 17:58:39.567729630 +0100
@@ -118,7 +118,8 @@
PyObject *kwds)
{
uint32_t dom = 0, target = 0;
- int ret, i;
+ int ret;
+ unsigned int i;
PyObject *pyhandle = NULL;
struct xen_domctl_createdomain config = {
.handle = {
@@ -296,7 +297,7 @@
static PyObject *pyxc_domain_sethandle(XcObject *self, PyObject *args)
{
- int i;
+ unsigned int i;
uint32_t dom;
PyObject *pyhandle;
xen_domain_handle_t handle;
@@ -337,7 +338,8 @@
PyObject *list, *info_dict, *pyhandle;
uint32_t first_dom = 0;
- int max_doms = 1024, nr_doms, i, j;
+ int max_doms = 1024, nr_doms, i;
+ unsigned int j;
xc_dominfo_t *info;
static char *kwd_list[] = { "first_dom", "max_doms", NULL };
@@ -632,7 +634,8 @@
{
uint32_t sbdf;
uint32_t max_sdevs, num_sdevs;
- int domid, seg, bus, dev, func, rc, i;
+ int domid, seg, bus, dev, func, rc;
+ unsigned int i;
PyObject *Pystr;
char *group_str;
char dev_str[9];
@@ -972,7 +975,7 @@
{
xc_physinfo_t pinfo;
char cpu_cap[128], virt_caps[128], *p;
- int i;
+ unsigned int i;
const char *virtcap_names[] = { "hvm", "hvm_directio" };
if ( xc_physinfo(self->xc_handle, &pinfo) != 0 )
--- xen-4.12.0/tools/python/xen/lowlevel/xs/xs.c.orig 2019-04-01 12:03:23.000000000 +0100
+++ xen-4.12.0/tools/python/xen/lowlevel/xs/xs.c 2019-06-01 18:59:46.316760561 +0100
@@ -186,7 +186,7 @@
Py_END_ALLOW_THREADS
if (xsval) {
- int i;
+ unsigned int i;
PyObject *val = PyList_New(xsval_n);
for (i = 0; i < xsval_n; i++)
#if PY_MAJOR_VERSION >= 3
@@ -276,7 +276,7 @@
struct xs_handle *xh = xshandle(self);
struct xs_permissions *perms;
unsigned int perms_n = 0;
- int i;
+ unsigned int i;
xs_transaction_t th;
char *thstr;
[-- Attachment #3: warnings.fixed.txt --]
[-- Type: text/plain, Size: 2393 bytes --]
BUILDSTDERR: xen/lowlevel/xc/xc.c: In function âpyxc_domain_createâ:
BUILDSTDERR: xen/lowlevel/xc/xc.c:148:24: warning: comparison of integer expressions of different signedness: âintâ and âlong unsigned intâ [-Wsign-compare]
BUILDSTDERR: for ( i = 0; i < sizeof(xen_domain_handle_t); i++ )
BUILDSTDERR: ^
BUILDSTDERR: xen/lowlevel/xc/xc.c: In function âpyxc_domain_sethandleâ:
BUILDSTDERR: xen/lowlevel/xc/xc.c:313:20: warning: comparison of integer expressions of different signedness: âintâ and âlong unsigned intâ [-Wsign-compare]
BUILDSTDERR: for ( i = 0; i < sizeof(xen_domain_handle_t); i++ )
BUILDSTDERR: ^
BUILDSTDERR: xen/lowlevel/xc/xc.c: In function âpyxc_domain_getinfoâ:
BUILDSTDERR: xen/lowlevel/xc/xc.c:392:24: warning: comparison of integer expressions of different signedness: âintâ and âlong unsigned intâ [-Wsign-compare]
BUILDSTDERR: for ( j = 0; j < sizeof(xen_domain_handle_t); j++ )
BUILDSTDERR: ^
BUILDSTDERR: xen/lowlevel/xc/xc.c: In function âpyxc_get_device_groupâ:
BUILDSTDERR: xen/lowlevel/xc/xc.c:678:20: warning: comparison of integer expressions of different signedness: âintâ and âuint32_tâ {aka âunsigned intâ} [-Wsign-compare]
BUILDSTDERR: for ( i = 0; i < num_sdevs; i++ )
BUILDSTDERR: ^
BUILDSTDERR: xen/lowlevel/xc/xc.c: In function âpyxc_physinfoâ:
BUILDSTDERR: xen/lowlevel/xc/xc.c:983:20: warning: comparison of integer expressions of different signedness: âintâ and âlong unsigned intâ [-Wsign-compare]
BUILDSTDERR: for ( i = 0; i < sizeof(pinfo.hw_cap)/4; i++ )
BUILDSTDERR: ^
BUILDSTDERR: xen/lowlevel/xs/xs.c: In function âxspy_lsâ:
BUILDSTDERR: xen/lowlevel/xs/xs.c:191:23: warning: comparison of integer expressions of different signedness: âintâ and âunsigned intâ [-Wsign-compare]
BUILDSTDERR: for (i = 0; i < xsval_n; i++)
BUILDSTDERR: ^
BUILDSTDERR: xen/lowlevel/xs/xs.c: In function âxspy_get_permissionsâ:
BUILDSTDERR: xen/lowlevel/xs/xs.c:297:23: warning: comparison of integer expressions of different signedness: âintâ and âunsigned intâ [-Wsign-compare]
BUILDSTDERR: for (i = 0; i < perms_n; i++) {
BUILDSTDERR: ^
[-- Attachment #4: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Xen-devel] issues with Python 3.8
2019-06-03 21:53 issues with Python 3.8 YOUNG, MICHAEL A.
@ 2019-06-03 21:53 ` YOUNG, MICHAEL A.
0 siblings, 0 replies; 2+ messages in thread
From: YOUNG, MICHAEL A. @ 2019-06-03 21:53 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 838 bytes --]
Fedora rawhide is about to to update to Python 3.8 (in beta I think) and
there are two issues with compiling xen with it (see
https://bugzilla.redhat.com/show_bug.cgi?id=1704807 ).
It seems that in 3.8 python3-config --libs no longer includes -lpython3.8
by default which causes tools/configure to fail. You can get -lpython3.8
back by adding --embed , but this option isn't recognized in earlier
versions of python.
It also seems python 3.8 adds the options -Wno-unused-result
-Wsign-compare to the compilations in tools/python (though I am not sure
how this happens) and -Wsign-compare gives some build warnings which the
Fedora build treats as errors.
I have attached the patch I used to get xen-4.12.0 to build with python
3.8 and also the build warnings it fixes in case they are useful.
Michael Young
[-- Attachment #2: xen.python38.patch --]
[-- Type: text/plain, Size: 3062 bytes --]
--- xen-4.12.0/m4/python_devel.m4.orig 2019-05-31 23:30:42.489738121 +0100
+++ xen-4.12.0/m4/python_devel.m4 2019-06-01 17:02:38.886934441 +0100
@@ -24,7 +24,8 @@
dnl If python-config is found use it
CPPFLAGS="$CFLAGS `$PYTHON-config --cflags`"
LDFLAGS="$LDFLAGS `$PYTHON-config --ldflags`"
- LIBS="$LIBS `$PYTHON-config --libs`"
+ LIBSTMP="`$PYTHON-config --libs --embed`" || LIBSTMP="`$PYTHON-config --libs`"
+ LIBS="$LIBS $LIBSTMP"
])
AC_CHECK_HEADER([Python.h], [],
--- xen-4.12.0/tools/configure.orig 2019-05-31 23:30:42.498738452 +0100
+++ xen-4.12.0/tools/configure 2019-06-01 17:08:26.100727658 +0100
@@ -7482,7 +7482,8 @@
CPPFLAGS="$CFLAGS `$PYTHON-config --cflags`"
LDFLAGS="$LDFLAGS `$PYTHON-config --ldflags`"
- LIBS="$LIBS `$PYTHON-config --libs`"
+ LIBSTMP="`$PYTHON-config --libs --embed`" || LIBSTMP="`$PYTHON-config --libs`"
+ LIBS="$LIBS $LIBSTMP"
fi
--- xen-4.12.0/tools/python/xen/lowlevel/xc/xc.c.orig 2019-04-01 12:03:23.000000000 +0100
+++ xen-4.12.0/tools/python/xen/lowlevel/xc/xc.c 2019-06-01 17:58:39.567729630 +0100
@@ -118,7 +118,8 @@
PyObject *kwds)
{
uint32_t dom = 0, target = 0;
- int ret, i;
+ int ret;
+ unsigned int i;
PyObject *pyhandle = NULL;
struct xen_domctl_createdomain config = {
.handle = {
@@ -296,7 +297,7 @@
static PyObject *pyxc_domain_sethandle(XcObject *self, PyObject *args)
{
- int i;
+ unsigned int i;
uint32_t dom;
PyObject *pyhandle;
xen_domain_handle_t handle;
@@ -337,7 +338,8 @@
PyObject *list, *info_dict, *pyhandle;
uint32_t first_dom = 0;
- int max_doms = 1024, nr_doms, i, j;
+ int max_doms = 1024, nr_doms, i;
+ unsigned int j;
xc_dominfo_t *info;
static char *kwd_list[] = { "first_dom", "max_doms", NULL };
@@ -632,7 +634,8 @@
{
uint32_t sbdf;
uint32_t max_sdevs, num_sdevs;
- int domid, seg, bus, dev, func, rc, i;
+ int domid, seg, bus, dev, func, rc;
+ unsigned int i;
PyObject *Pystr;
char *group_str;
char dev_str[9];
@@ -972,7 +975,7 @@
{
xc_physinfo_t pinfo;
char cpu_cap[128], virt_caps[128], *p;
- int i;
+ unsigned int i;
const char *virtcap_names[] = { "hvm", "hvm_directio" };
if ( xc_physinfo(self->xc_handle, &pinfo) != 0 )
--- xen-4.12.0/tools/python/xen/lowlevel/xs/xs.c.orig 2019-04-01 12:03:23.000000000 +0100
+++ xen-4.12.0/tools/python/xen/lowlevel/xs/xs.c 2019-06-01 18:59:46.316760561 +0100
@@ -186,7 +186,7 @@
Py_END_ALLOW_THREADS
if (xsval) {
- int i;
+ unsigned int i;
PyObject *val = PyList_New(xsval_n);
for (i = 0; i < xsval_n; i++)
#if PY_MAJOR_VERSION >= 3
@@ -276,7 +276,7 @@
struct xs_handle *xh = xshandle(self);
struct xs_permissions *perms;
unsigned int perms_n = 0;
- int i;
+ unsigned int i;
xs_transaction_t th;
char *thstr;
[-- Attachment #3: warnings.fixed.txt --]
[-- Type: text/plain, Size: 2393 bytes --]
BUILDSTDERR: xen/lowlevel/xc/xc.c: In function âpyxc_domain_createâ:
BUILDSTDERR: xen/lowlevel/xc/xc.c:148:24: warning: comparison of integer expressions of different signedness: âintâ and âlong unsigned intâ [-Wsign-compare]
BUILDSTDERR: for ( i = 0; i < sizeof(xen_domain_handle_t); i++ )
BUILDSTDERR: ^
BUILDSTDERR: xen/lowlevel/xc/xc.c: In function âpyxc_domain_sethandleâ:
BUILDSTDERR: xen/lowlevel/xc/xc.c:313:20: warning: comparison of integer expressions of different signedness: âintâ and âlong unsigned intâ [-Wsign-compare]
BUILDSTDERR: for ( i = 0; i < sizeof(xen_domain_handle_t); i++ )
BUILDSTDERR: ^
BUILDSTDERR: xen/lowlevel/xc/xc.c: In function âpyxc_domain_getinfoâ:
BUILDSTDERR: xen/lowlevel/xc/xc.c:392:24: warning: comparison of integer expressions of different signedness: âintâ and âlong unsigned intâ [-Wsign-compare]
BUILDSTDERR: for ( j = 0; j < sizeof(xen_domain_handle_t); j++ )
BUILDSTDERR: ^
BUILDSTDERR: xen/lowlevel/xc/xc.c: In function âpyxc_get_device_groupâ:
BUILDSTDERR: xen/lowlevel/xc/xc.c:678:20: warning: comparison of integer expressions of different signedness: âintâ and âuint32_tâ {aka âunsigned intâ} [-Wsign-compare]
BUILDSTDERR: for ( i = 0; i < num_sdevs; i++ )
BUILDSTDERR: ^
BUILDSTDERR: xen/lowlevel/xc/xc.c: In function âpyxc_physinfoâ:
BUILDSTDERR: xen/lowlevel/xc/xc.c:983:20: warning: comparison of integer expressions of different signedness: âintâ and âlong unsigned intâ [-Wsign-compare]
BUILDSTDERR: for ( i = 0; i < sizeof(pinfo.hw_cap)/4; i++ )
BUILDSTDERR: ^
BUILDSTDERR: xen/lowlevel/xs/xs.c: In function âxspy_lsâ:
BUILDSTDERR: xen/lowlevel/xs/xs.c:191:23: warning: comparison of integer expressions of different signedness: âintâ and âunsigned intâ [-Wsign-compare]
BUILDSTDERR: for (i = 0; i < xsval_n; i++)
BUILDSTDERR: ^
BUILDSTDERR: xen/lowlevel/xs/xs.c: In function âxspy_get_permissionsâ:
BUILDSTDERR: xen/lowlevel/xs/xs.c:297:23: warning: comparison of integer expressions of different signedness: âintâ and âunsigned intâ [-Wsign-compare]
BUILDSTDERR: for (i = 0; i < perms_n; i++) {
BUILDSTDERR: ^
[-- Attachment #4: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-03 21:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 21:53 issues with Python 3.8 YOUNG, MICHAEL A.
2019-06-03 21:53 ` [Xen-devel] " YOUNG, MICHAEL A.
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 NNTP newsgroup(s).