diff options
| -rw-r--r-- | recipes-extended/ceph/ceph/0001-fix-host-library-paths-were-used.patch | 96 | ||||
| -rw-r--r-- | recipes-extended/ceph/ceph_15.2.0.bb | 3 |
2 files changed, 99 insertions, 0 deletions
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 00000000..310bfa47 --- /dev/null +++ b/recipes-extended/ceph/ceph/0001-fix-host-library-paths-were-used.patch | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | From bbf1cba8feb0e43492a1f6a6b31d024117cad262 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | Date: Mon, 13 Apr 2020 23:35:41 -0700 | ||
| 4 | Subject: [PATCH] fix host library paths were used | ||
| 5 | |||
| 6 | Test the existence of recipe-sysrooot, add it back if lost | ||
| 7 | |||
| 8 | Upstream-Status: Inappropriate [oe specific] | ||
| 9 | |||
| 10 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 11 | --- | ||
| 12 | src/pybind/cephfs/setup.py | 6 +++++- | ||
| 13 | src/pybind/rados/setup.py | 6 +++++- | ||
| 14 | src/pybind/rbd/setup.py | 6 +++++- | ||
| 15 | src/pybind/rgw/setup.py | 6 +++++- | ||
| 16 | 4 files changed, 20 insertions(+), 4 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/src/pybind/cephfs/setup.py b/src/pybind/cephfs/setup.py | ||
| 19 | index c9a25ccf..972f936c 100755 | ||
| 20 | --- a/src/pybind/cephfs/setup.py | ||
| 21 | +++ b/src/pybind/cephfs/setup.py | ||
| 22 | @@ -63,9 +63,13 @@ def get_python_flags(libs): | ||
| 23 | distutils.sysconfig.get_config_vars('LIBS', 'SYSLIBS')), []) | ||
| 24 | compiler = new_compiler() | ||
| 25 | distutils.sysconfig.customize_compiler(compiler) | ||
| 26 | + libpl = distutils.sysconfig.get_config_var('LIBPL') | ||
| 27 | + sysroot = os.environ.get('STAGING_DIR_HOST') | ||
| 28 | + if not libpl.startswith(sysroot): | ||
| 29 | + libpl = sysroot + libpl | ||
| 30 | return dict( | ||
| 31 | include_dirs=[distutils.sysconfig.get_python_inc()], | ||
| 32 | - library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), | ||
| 33 | + library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl], | ||
| 34 | libraries=libs + [lib.replace('-l', '') for lib in py_libs], | ||
| 35 | extra_compile_args=filter_unsupported_flags( | ||
| 36 | compiler.compiler[0], | ||
| 37 | diff --git a/src/pybind/rados/setup.py b/src/pybind/rados/setup.py | ||
| 38 | index 4e99d267..de24f766 100755 | ||
| 39 | --- a/src/pybind/rados/setup.py | ||
| 40 | +++ b/src/pybind/rados/setup.py | ||
| 41 | @@ -66,9 +66,13 @@ def get_python_flags(libs): | ||
| 42 | distutils.sysconfig.get_config_vars('LIBS', 'SYSLIBS')), []) | ||
| 43 | compiler = new_compiler() | ||
| 44 | distutils.sysconfig.customize_compiler(compiler) | ||
| 45 | + libpl = distutils.sysconfig.get_config_var('LIBPL') | ||
| 46 | + sysroot = os.environ.get('STAGING_DIR_HOST') | ||
| 47 | + if not libpl.startswith(sysroot): | ||
| 48 | + libpl = sysroot + libpl | ||
| 49 | return dict( | ||
| 50 | include_dirs=[distutils.sysconfig.get_python_inc()], | ||
| 51 | - library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), | ||
| 52 | + library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl], | ||
| 53 | libraries=libs + [lib.replace('-l', '') for lib in py_libs], | ||
| 54 | extra_compile_args=filter_unsupported_flags( | ||
| 55 | compiler.compiler[0], | ||
| 56 | diff --git a/src/pybind/rbd/setup.py b/src/pybind/rbd/setup.py | ||
| 57 | index f5bbbdab..a1f70e1d 100755 | ||
| 58 | --- a/src/pybind/rbd/setup.py | ||
| 59 | +++ b/src/pybind/rbd/setup.py | ||
| 60 | @@ -63,9 +63,13 @@ def get_python_flags(libs): | ||
| 61 | distutils.sysconfig.get_config_vars('LIBS', 'SYSLIBS')), []) | ||
| 62 | compiler = new_compiler() | ||
| 63 | distutils.sysconfig.customize_compiler(compiler) | ||
| 64 | + libpl = distutils.sysconfig.get_config_var('LIBPL') | ||
| 65 | + sysroot = os.environ.get('STAGING_DIR_HOST') | ||
| 66 | + if not libpl.startswith(sysroot): | ||
| 67 | + libpl = sysroot + libpl | ||
| 68 | return dict( | ||
| 69 | include_dirs=[distutils.sysconfig.get_python_inc()], | ||
| 70 | - library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), | ||
| 71 | + library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl], | ||
| 72 | libraries=libs + [lib.replace('-l', '') for lib in py_libs], | ||
| 73 | extra_compile_args=filter_unsupported_flags( | ||
| 74 | compiler.compiler[0], | ||
| 75 | diff --git a/src/pybind/rgw/setup.py b/src/pybind/rgw/setup.py | ||
| 76 | index b9f2428c..f5119f73 100755 | ||
| 77 | --- a/src/pybind/rgw/setup.py | ||
| 78 | +++ b/src/pybind/rgw/setup.py | ||
| 79 | @@ -64,9 +64,13 @@ def get_python_flags(libs): | ||
| 80 | distutils.sysconfig.get_config_vars('LIBS', 'SYSLIBS')), []) | ||
| 81 | compiler = new_compiler() | ||
| 82 | distutils.sysconfig.customize_compiler(compiler) | ||
| 83 | + libpl = distutils.sysconfig.get_config_var('LIBPL') | ||
| 84 | + sysroot = os.environ.get('STAGING_DIR_HOST') | ||
| 85 | + if not libpl.startswith(sysroot): | ||
| 86 | + libpl = sysroot + libpl | ||
| 87 | return dict( | ||
| 88 | include_dirs=[distutils.sysconfig.get_python_inc()], | ||
| 89 | - library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), | ||
| 90 | + library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl], | ||
| 91 | libraries=libs + [lib.replace('-l', '') for lib in py_libs], | ||
| 92 | extra_compile_args=filter_unsupported_flags( | ||
| 93 | compiler.compiler[0], | ||
| 94 | -- | ||
| 95 | 2.21.0 | ||
| 96 | |||
diff --git a/recipes-extended/ceph/ceph_15.2.0.bb b/recipes-extended/ceph/ceph_15.2.0.bb index 18930868..8ab58eb9 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 | |||
| 10 | 10 | ||
| 11 | SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \ | 11 | SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \ |
| 12 | file://0001-ceph-fix-build-errors-for-cross-compile.patch \ | 12 | file://0001-ceph-fix-build-errors-for-cross-compile.patch \ |
| 13 | file://0001-fix-host-library-paths-were-used.patch \ | ||
| 13 | file://ceph.conf \ | 14 | file://ceph.conf \ |
| 14 | " | 15 | " |
| 15 | 16 | ||
| @@ -66,6 +67,8 @@ EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \ | |||
| 66 | -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \ | 67 | -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \ |
| 67 | " | 68 | " |
| 68 | 69 | ||
| 70 | export STAGING_DIR_HOST | ||
| 71 | |||
| 69 | do_configure_prepend () { | 72 | do_configure_prepend () { |
| 70 | echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake | 73 | echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake |
| 71 | echo "set( CMAKE_DESTDIR \"${D}\" )" >> ${WORKDIR}/toolchain.cmake | 74 | echo "set( CMAKE_DESTDIR \"${D}\" )" >> ${WORKDIR}/toolchain.cmake |
