summaryrefslogtreecommitdiffstats
path: root/recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch')
-rw-r--r--recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch143
1 files changed, 74 insertions, 69 deletions
diff --git a/recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch b/recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch
index 4d54549f..9686becb 100644
--- a/recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch
+++ b/recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch
@@ -24,11 +24,11 @@ Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
24 src/pybind/rgw/setup.py | 8 -------- 24 src/pybind/rgw/setup.py | 8 --------
25 7 files changed, 8 insertions(+), 55 deletions(-) 25 7 files changed, 8 insertions(+), 55 deletions(-)
26 26
27diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake 27Index: ceph-18.2.0/cmake/modules/Distutils.cmake
28index 5fe929499d..802eb37e32 100644 28===================================================================
29--- a/cmake/modules/Distutils.cmake 29--- ceph-18.2.0.orig/cmake/modules/Distutils.cmake
30+++ b/cmake/modules/Distutils.cmake 30+++ ceph-18.2.0/cmake/modules/Distutils.cmake
31@@ -18,17 +18,8 @@ function(distutils_install_module name) 31@@ -29,17 +29,10 @@
32 cmake_parse_arguments(DU "" "INSTALL_SCRIPT" "" ${ARGN}) 32 cmake_parse_arguments(DU "" "INSTALL_SCRIPT" "" ${ARGN})
33 install(CODE " 33 install(CODE "
34 set(options --prefix=${CMAKE_INSTALL_PREFIX}) 34 set(options --prefix=${CMAKE_INSTALL_PREFIX})
@@ -39,25 +39,25 @@ index 5fe929499d..802eb37e32 100644
39- list(APPEND options 39- list(APPEND options
40- --root=\$ENV{DESTDIR} 40- --root=\$ENV{DESTDIR}
41- --single-version-externally-managed) 41- --single-version-externally-managed)
42- if(NOT \"${DU_INSTALL_SCRIPT}\" STREQUAL \"\") 42- endif()
43- list(APPEND options --install-script=${DU_INSTALL_SCRIPT}) 43 if(NOT \"${DU_INSTALL_SCRIPT}\" STREQUAL \"\")
44- endif() 44 list(APPEND options --install-script=${DU_INSTALL_SCRIPT})
45- endif() 45- endif()
46+ list(APPEND options --root=${CMAKE_DESTDIR}) 46+ list(APPEND options --root=${CMAKE_DESTDIR})
47+ list(APPEND options --install-lib=${PYTHON_SITEPACKAGES_DIR}) 47+ list(APPEND options --install-lib=${PYTHON_SITEPACKAGES_DIR})
48 execute_process( 48 execute_process(
49 COMMAND ${Python3_EXECUTABLE} 49 COMMAND ${Python3_EXECUTABLE}
50 setup.py install \${options} 50 setup.py install \${options}
51@@ -50,7 +41,7 @@ function(distutils_add_cython_module target name src) 51@@ -65,7 +58,7 @@
52 # Note: no quotes, otherwise distutils will execute "/usr/bin/ccache gcc" 52 if(DU_DISABLE_VTA AND HAS_VTA)
53 # CMake's implicit conversion between strings and lists is wonderful, isn't it? 53 list(APPEND PY_CFLAGS -fno-var-tracking-assignments)
54 string(REPLACE " " ";" cflags ${CMAKE_C_FLAGS}) 54 endif()
55- list(APPEND cflags -iquote${CMAKE_SOURCE_DIR}/src/include -w) 55- list(APPEND PY_CPPFLAGS -iquote${CMAKE_SOURCE_DIR}/src/include -w)
56+ list(APPEND cflags -iquote${CMAKE_SOURCE_DIR}/src/include -w --sysroot=${CMAKE_SYSROOT}) 56+ list(APPEND PY_CPPFLAGS -iquote${CMAKE_SOURCE_DIR}/src/include -w --sysroot=${CMAKE_SYSROOT})
57 # This little bit of magic wipes out __Pyx_check_single_interpreter() 57 # This little bit of magic wipes out __Pyx_check_single_interpreter()
58 # Note: this is reproduced in distutils_install_cython_module 58 # Note: this is reproduced in distutils_install_cython_module
59 list(APPEND cflags -D'void0=dead_function\(void\)') 59 list(APPEND PY_CPPFLAGS -D'void0=dead_function\(void\)')
60@@ -108,14 +99,8 @@ function(distutils_install_cython_module name) 60@@ -135,14 +128,8 @@
61 set(ENV{CEPH_LIBDIR} \"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\") 61 set(ENV{CEPH_LIBDIR} \"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\")
62 62
63 set(options --prefix=${CMAKE_INSTALL_PREFIX}) 63 set(options --prefix=${CMAKE_INSTALL_PREFIX})
@@ -74,10 +74,10 @@ index 5fe929499d..802eb37e32 100644
74 execute_process( 74 execute_process(
75 COMMAND 75 COMMAND
76 ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py 76 ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py
77diff --git a/cmake/modules/FindRocksDB.cmake b/cmake/modules/FindRocksDB.cmake 77Index: ceph-18.2.0/cmake/modules/FindRocksDB.cmake
78index c5dd3dfaf6..be38597af2 100644 78===================================================================
79--- a/cmake/modules/FindRocksDB.cmake 79--- ceph-18.2.0.orig/cmake/modules/FindRocksDB.cmake
80+++ b/cmake/modules/FindRocksDB.cmake 80+++ ceph-18.2.0/cmake/modules/FindRocksDB.cmake
81@@ -9,9 +9,9 @@ 81@@ -9,9 +9,9 @@
82 # ROCKSDB_VERSION_MINOR 82 # ROCKSDB_VERSION_MINOR
83 # ROCKSDB_VERSION_PATCH 83 # ROCKSDB_VERSION_PATCH
@@ -90,95 +90,100 @@ index c5dd3dfaf6..be38597af2 100644
90 90
91 if(ROCKSDB_INCLUDE_DIR AND EXISTS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h") 91 if(ROCKSDB_INCLUDE_DIR AND EXISTS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h")
92 foreach(ver "MAJOR" "MINOR" "PATCH") 92 foreach(ver "MAJOR" "MINOR" "PATCH")
93diff --git a/src/compressor/zstd/CMakeLists.txt b/src/compressor/zstd/CMakeLists.txt 93Index: ceph-18.2.0/src/pybind/cephfs/setup.py
94index a5ebdaf538..a234068150 100644 94===================================================================
95--- a/src/compressor/zstd/CMakeLists.txt 95--- ceph-18.2.0.orig/src/pybind/cephfs/setup.py
96+++ b/src/compressor/zstd/CMakeLists.txt 96+++ ceph-18.2.0/src/pybind/cephfs/setup.py
97@@ -9,7 +9,7 @@ ExternalProject_Add(zstd_ext 97@@ -135,20 +135,6 @@
98 CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
99 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
100 -DCMAKE_C_FLAGS=${ZSTD_C_FLAGS}
101- -DCMAKE_AR=${CMAKE_AR}
102+ -DCMAKE_SYSROOT=${CMAKE_SYSROOT}
103 -DCMAKE_POSITION_INDEPENDENT_CODE=${ENABLE_SHARED}
104 -G${CMAKE_GENERATOR}
105 BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/libzstd
106diff --git a/src/pybind/cephfs/setup.py b/src/pybind/cephfs/setup.py
107index 19ae6c329a..c9a25ccfff 100755
108--- a/src/pybind/cephfs/setup.py
109+++ b/src/pybind/cephfs/setup.py
110@@ -135,14 +135,6 @@ def check_sanity():
111 finally: 98 finally:
112 shutil.rmtree(tmp_dir) 99 shutil.rmtree(tmp_dir)
113 100
114- 101-
115-if 'BUILD_DOC' in os.environ.keys(): 102-if 'BUILD_DOC' in os.environ or 'READTHEDOCS' in os.environ:
116- pass 103- ext_args = {}
104- cython_constants = dict(BUILD_DOC=True)
105- cythonize_args = dict(compile_time_env=cython_constants)
117-elif check_sanity(): 106-elif check_sanity():
118- pass 107- ext_args = get_python_flags(['cephfs'])
108- cython_constants = dict(BUILD_DOC=False)
109- include_path = [os.path.join(os.path.dirname(__file__), "..", "rados")]
110- cythonize_args = dict(compile_time_env=cython_constants,
111- include_path=include_path)
119-else: 112-else:
120- sys.exit(1) 113- sys.exit(1)
121- 114-
122 cmdclass = {} 115 cmdclass = {}
123 try: 116 try:
124 from Cython.Build import cythonize 117 from Cython.Build import cythonize
125diff --git a/src/pybind/rados/setup.py b/src/pybind/rados/setup.py 118Index: ceph-18.2.0/src/pybind/rados/setup.py
126index e2c5696404..4e99d26721 100755 119===================================================================
127--- a/src/pybind/rados/setup.py 120--- ceph-18.2.0.orig/src/pybind/rados/setup.py
128+++ b/src/pybind/rados/setup.py 121+++ ceph-18.2.0/src/pybind/rados/setup.py
129@@ -134,14 +134,6 @@ def check_sanity(): 122@@ -130,17 +130,6 @@
130 finally: 123 finally:
131 shutil.rmtree(tmp_dir) 124 shutil.rmtree(tmp_dir)
132 125
133- 126-
134-if 'BUILD_DOC' in os.environ.keys(): 127-if 'BUILD_DOC' in os.environ or 'READTHEDOCS' in os.environ:
135- pass 128- ext_args = {}
129- cython_constants = dict(BUILD_DOC=True)
136-elif check_sanity(): 130-elif check_sanity():
137- pass 131- ext_args = get_python_flags(['rados'])
132- cython_constants = dict(BUILD_DOC=False)
138-else: 133-else:
139- sys.exit(1) 134- sys.exit(1)
140- 135-
141 cmdclass = {} 136-cmdclass = {}
142 try: 137 try:
143 from Cython.Build import cythonize 138 from Cython.Build import cythonize
144diff --git a/src/pybind/rbd/setup.py b/src/pybind/rbd/setup.py 139 from Cython.Distutils import build_ext
145index 634484f140..f5bbbdab4f 100755 140Index: ceph-18.2.0/src/pybind/rbd/setup.py
146--- a/src/pybind/rbd/setup.py 141===================================================================
147+++ b/src/pybind/rbd/setup.py 142--- ceph-18.2.0.orig/src/pybind/rbd/setup.py
148@@ -133,14 +133,6 @@ def check_sanity(): 143+++ ceph-18.2.0/src/pybind/rbd/setup.py
144@@ -133,20 +133,6 @@
149 finally: 145 finally:
150 shutil.rmtree(tmp_dir) 146 shutil.rmtree(tmp_dir)
151 147
152- 148-
153-if 'BUILD_DOC' in os.environ.keys(): 149-if 'BUILD_DOC' in os.environ or 'READTHEDOCS' in os.environ:
154- pass 150- ext_args = {}
151- cython_constants = dict(BUILD_DOC=True)
152- cythonize_args = dict(compile_time_env=cython_constants)
155-elif check_sanity(): 153-elif check_sanity():
156- pass 154- ext_args = get_python_flags(['rados', 'rbd'])
155- cython_constants = dict(BUILD_DOC=False)
156- include_path = [os.path.join(os.path.dirname(__file__), "..", "rados")]
157- cythonize_args = dict(compile_time_env=cython_constants,
158- include_path=include_path)
157-else: 159-else:
158- sys.exit(1) 160- sys.exit(1)
159- 161-
160 cmdclass = {} 162 cmdclass = {}
161 try: 163 try:
162 from Cython.Build import cythonize 164 from Cython.Build import cythonize
163diff --git a/src/pybind/rgw/setup.py b/src/pybind/rgw/setup.py 165Index: ceph-18.2.0/src/pybind/rgw/setup.py
164index eb1591a460..b9f2428cf9 100755 166===================================================================
165--- a/src/pybind/rgw/setup.py 167--- ceph-18.2.0.orig/src/pybind/rgw/setup.py
166+++ b/src/pybind/rgw/setup.py 168+++ ceph-18.2.0/src/pybind/rgw/setup.py
167@@ -134,14 +134,6 @@ def check_sanity(): 169@@ -134,20 +134,6 @@
168 finally: 170 finally:
169 shutil.rmtree(tmp_dir) 171 shutil.rmtree(tmp_dir)
170 172
171- 173-
172-if 'BUILD_DOC' in os.environ.keys(): 174-if 'BUILD_DOC' in os.environ or 'READTHEDOCS' in os.environ:
173- pass 175- ext_args = {}
176- cython_constants = dict(BUILD_DOC=True)
177- cythonize_args = dict(compile_time_env=cython_constants)
174-elif check_sanity(): 178-elif check_sanity():
175- pass 179- ext_args = get_python_flags(['rados', 'rgw'])
180- cython_constants = dict(BUILD_DOC=False)
181- include_path = [os.path.join(os.path.dirname(__file__), "..", "rados")]
182- cythonize_args = dict(compile_time_env=cython_constants,
183- include_path=include_path)
176-else: 184-else:
177- sys.exit(1) 185- sys.exit(1)
178- 186-
179 cmdclass = {} 187 cmdclass = {}
180 try: 188 try:
181 from Cython.Build import cythonize 189 from Cython.Build import cythonize
182--
1832.20.1
184