All of lore.kernel.org
 help / color / mirror / Atom feed
From: "hongxu" <hongxu.jia@windriver.com>
To: <meta-virtualization@lists.yoctoproject.org>
Subject: [meta-virtualization][PATCH 2/2] ceph: fix host library paths were used
Date: Mon, 13 Apr 2020 23:52:54 -0700	[thread overview]
Message-ID: <20200414065254.64863-2-hongxu.jia@windriver.com> (raw)
In-Reply-To: <20200414065254.64863-1-hongxu.jia@windriver.com>

...
|ERROR: ceph-15.2.0-r0 do_package_qa: QA Issue: ceph: The compile
log indicates that host include and/or library paths were used.
|         Please check the log 'tmp-glibc/work/corei7-64-wrs-linux/
ceph/15.2.0-r0/temp/log.do_compile' for more information. [compile-host-path]
|ERROR: ceph-15.2.0-r0 do_package_qa: QA Issue: ceph: The install
log indicates that host include and/or library paths were used.
|         Please check the log 'tmp-glibc/work/corei7-64-wrs-linux/
ceph/15.2.0-r0/temp/log.do_install' for more information. [install-host-path]
...

While python setup, test var-LIBPL contains recipe-sysrooot prefix,
add it back if lost

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 ...001-fix-host-library-paths-were-used.patch | 96 +++++++++++++++++++
 recipes-extended/ceph/ceph_15.2.0.bb          |  3 +
 2 files changed, 99 insertions(+)
 create mode 100644 recipes-extended/ceph/ceph/0001-fix-host-library-paths-were-used.patch

diff --git a/recipes-extended/ceph/ceph/0001-fix-host-library-paths-were-used.patch b/recipes-extended/ceph/ceph/0001-fix-host-library-paths-were-used.patch
new file mode 100644
index 0000000..310bfa4
--- /dev/null
+++ b/recipes-extended/ceph/ceph/0001-fix-host-library-paths-were-used.patch
@@ -0,0 +1,96 @@
+From bbf1cba8feb0e43492a1f6a6b31d024117cad262 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 13 Apr 2020 23:35:41 -0700
+Subject: [PATCH] fix host library paths were used
+
+Test the existence of recipe-sysrooot, add it back if lost
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/pybind/cephfs/setup.py | 6 +++++-
+ src/pybind/rados/setup.py  | 6 +++++-
+ src/pybind/rbd/setup.py    | 6 +++++-
+ src/pybind/rgw/setup.py    | 6 +++++-
+ 4 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/src/pybind/cephfs/setup.py b/src/pybind/cephfs/setup.py
+index c9a25ccf..972f936c 100755
+--- a/src/pybind/cephfs/setup.py
++++ b/src/pybind/cephfs/setup.py
+@@ -63,9 +63,13 @@ def get_python_flags(libs):
+                    distutils.sysconfig.get_config_vars('LIBS', 'SYSLIBS')), [])
+     compiler = new_compiler()
+     distutils.sysconfig.customize_compiler(compiler)
++    libpl = distutils.sysconfig.get_config_var('LIBPL')
++    sysroot = os.environ.get('STAGING_DIR_HOST')
++    if not libpl.startswith(sysroot):
++        libpl = sysroot + libpl
+     return dict(
+         include_dirs=[distutils.sysconfig.get_python_inc()],
+-        library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'),
++        library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl],
+         libraries=libs + [lib.replace('-l', '') for lib in py_libs],
+         extra_compile_args=filter_unsupported_flags(
+             compiler.compiler[0],
+diff --git a/src/pybind/rados/setup.py b/src/pybind/rados/setup.py
+index 4e99d267..de24f766 100755
+--- a/src/pybind/rados/setup.py
++++ b/src/pybind/rados/setup.py
+@@ -66,9 +66,13 @@ def get_python_flags(libs):
+                    distutils.sysconfig.get_config_vars('LIBS', 'SYSLIBS')), [])
+     compiler = new_compiler()
+     distutils.sysconfig.customize_compiler(compiler)
++    libpl = distutils.sysconfig.get_config_var('LIBPL')
++    sysroot = os.environ.get('STAGING_DIR_HOST')
++    if not libpl.startswith(sysroot):
++        libpl = sysroot + libpl
+     return dict(
+         include_dirs=[distutils.sysconfig.get_python_inc()],
+-        library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'),
++        library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl],
+         libraries=libs + [lib.replace('-l', '') for lib in py_libs],
+         extra_compile_args=filter_unsupported_flags(
+             compiler.compiler[0],
+diff --git a/src/pybind/rbd/setup.py b/src/pybind/rbd/setup.py
+index f5bbbdab..a1f70e1d 100755
+--- a/src/pybind/rbd/setup.py
++++ b/src/pybind/rbd/setup.py
+@@ -63,9 +63,13 @@ def get_python_flags(libs):
+                    distutils.sysconfig.get_config_vars('LIBS', 'SYSLIBS')), [])
+     compiler = new_compiler()
+     distutils.sysconfig.customize_compiler(compiler)
++    libpl = distutils.sysconfig.get_config_var('LIBPL')
++    sysroot = os.environ.get('STAGING_DIR_HOST')
++    if not libpl.startswith(sysroot):
++        libpl = sysroot + libpl
+     return dict(
+         include_dirs=[distutils.sysconfig.get_python_inc()],
+-        library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'),
++        library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl],
+         libraries=libs + [lib.replace('-l', '') for lib in py_libs],
+         extra_compile_args=filter_unsupported_flags(
+             compiler.compiler[0],
+diff --git a/src/pybind/rgw/setup.py b/src/pybind/rgw/setup.py
+index b9f2428c..f5119f73 100755
+--- a/src/pybind/rgw/setup.py
++++ b/src/pybind/rgw/setup.py
+@@ -64,9 +64,13 @@ def get_python_flags(libs):
+                    distutils.sysconfig.get_config_vars('LIBS', 'SYSLIBS')), [])
+     compiler = new_compiler()
+     distutils.sysconfig.customize_compiler(compiler)
++    libpl = distutils.sysconfig.get_config_var('LIBPL')
++    sysroot = os.environ.get('STAGING_DIR_HOST')
++    if not libpl.startswith(sysroot):
++        libpl = sysroot + libpl
+     return dict(
+         include_dirs=[distutils.sysconfig.get_python_inc()],
+-        library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'),
++        library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl],
+         libraries=libs + [lib.replace('-l', '') for lib in py_libs],
+         extra_compile_args=filter_unsupported_flags(
+             compiler.compiler[0],
+-- 
+2.21.0
+
diff --git a/recipes-extended/ceph/ceph_15.2.0.bb b/recipes-extended/ceph/ceph_15.2.0.bb
index 1893086..8ab58eb 100644
--- a/recipes-extended/ceph/ceph_15.2.0.bb
+++ b/recipes-extended/ceph/ceph_15.2.0.bb
@@ -10,6 +10,7 @@ inherit cmake python3native python3-dir systemd
 
 SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \
            file://0001-ceph-fix-build-errors-for-cross-compile.patch \
+           file://0001-fix-host-library-paths-were-used.patch \
            file://ceph.conf \
 "
 
@@ -66,6 +67,8 @@ EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \
                  -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \
 "
 
+export STAGING_DIR_HOST
+
 do_configure_prepend () {
 	echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake
 	echo "set( CMAKE_DESTDIR \"${D}\" )" >> ${WORKDIR}/toolchain.cmake
-- 
2.21.0


  reply	other threads:[~2020-04-14  6:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14  6:52 [meta-virtualization][PATCH 1/2] ceph: fix installed-vs-shipped QA issue hongxu
2020-04-14  6:52 ` hongxu [this message]
2020-04-14 21:06 ` Bruce Ashfield

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200414065254.64863-2-hongxu.jia@windriver.com \
    --to=hongxu.jia@windriver.com \
    --cc=meta-virtualization@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.