From 992d4e37cae74332fabb6a28b7a046a2a39abeee Mon Sep 17 00:00:00 2001 From: mencian Date: Tue, 3 Dec 2024 16:02:46 -0600 Subject: [PATCH 01/12] Rebuild k8 on macOS --- recipes/k8/build.sh | 9 ++++----- recipes/k8/conda_build_config.yaml | 2 +- recipes/k8/meta.yaml | 3 +-- recipes/k8/nodejs-x86_64.patch | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/recipes/k8/build.sh b/recipes/k8/build.sh index 96edeaf676cde..92ed4bd738f8c 100644 --- a/recipes/k8/build.sh +++ b/recipes/k8/build.sh @@ -18,7 +18,7 @@ fi case $(uname -m) in x86_64) - THREADS="-j2" + THREADS='-j"${CPU_COUNT}"' ;; *) THREADS="-j3" @@ -47,8 +47,7 @@ sed -i.bak 's/LIBS=/LIBS?=/' Makefile rm -rf *.bak # Then compile k8 -NODE_SRC="node-v${NODE_VERSION}" CXXFLAGS="${CXXFLAGS} -std=c++17 -g -O3 -Wall" LIBS="${LDFLAGS} -pthread" make +NODE_SRC="node-v${NODE_VERSION}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS} -std=c++17 -g -O3 -Wall" LIBS="${LDFLAGS} -pthread" make -j"${CPU_COUNT}" -mkdir -p $PREFIX/bin -chmod 0755 k8 -cp -f k8 $PREFIX/bin/ +install -d "${PREFIX}/bin" +install -v -m 0755 k8 "${PREFIX}/bin" diff --git a/recipes/k8/conda_build_config.yaml b/recipes/k8/conda_build_config.yaml index 7fe48bce70acc..2b7e3622fbd60 100644 --- a/recipes/k8/conda_build_config.yaml +++ b/recipes/k8/conda_build_config.yaml @@ -1,3 +1,3 @@ c_stdlib_version: # [unix] - 2.17 # [linux and x86_64] - - 2.17 # [linux and not x86_64] \ No newline at end of file + - 2.17 # [linux and not x86_64] diff --git a/recipes/k8/meta.yaml b/recipes/k8/meta.yaml index 98f026709acd1..c1967c2cff22c 100644 --- a/recipes/k8/meta.yaml +++ b/recipes/k8/meta.yaml @@ -10,8 +10,7 @@ source: sha256: 4157aa86066eb0a7874de194893c4544ac772d009cc1148377c9c346f9fc6d07 build: - number: 3 - skip: True # [osx and x86_64] + number: 4 run_exports: - {{ pin_subpackage('k8', max_pin="x") }} diff --git a/recipes/k8/nodejs-x86_64.patch b/recipes/k8/nodejs-x86_64.patch index ff5a091f47f9f..385769d97ec89 100644 --- a/recipes/k8/nodejs-x86_64.patch +++ b/recipes/k8/nodejs-x86_64.patch @@ -1,5 +1,5 @@ ---- src/debug_utils.cc.orig 2024-03-19 15:40:50.492023297 +0200 -+++ src/debug_utils.cc 2024-03-19 15:44:34.032276878 +0200 +--- a/src/debug_utils.cc 2024-03-19 15:40:50.492023297 +0200 ++++ b/src/debug_utils.cc 2024-03-19 15:44:34.032276878 +0200 @@ -476,7 +476,10 @@ void FWrite(FILE* file, const std::string& str) { auto simple_fwrite = [&]() { From 0ff5ea515617f602aaa3efa86adfa39969b51369 Mon Sep 17 00:00:00 2001 From: Joshua Zhuang <71105179+mencian@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:09:41 -0600 Subject: [PATCH 02/12] Update nodejs-x86_64.patch --- recipes/k8/nodejs-x86_64.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/k8/nodejs-x86_64.patch b/recipes/k8/nodejs-x86_64.patch index 385769d97ec89..ff5a091f47f9f 100644 --- a/recipes/k8/nodejs-x86_64.patch +++ b/recipes/k8/nodejs-x86_64.patch @@ -1,5 +1,5 @@ ---- a/src/debug_utils.cc 2024-03-19 15:40:50.492023297 +0200 -+++ b/src/debug_utils.cc 2024-03-19 15:44:34.032276878 +0200 +--- src/debug_utils.cc.orig 2024-03-19 15:40:50.492023297 +0200 ++++ src/debug_utils.cc 2024-03-19 15:44:34.032276878 +0200 @@ -476,7 +476,10 @@ void FWrite(FILE* file, const std::string& str) { auto simple_fwrite = [&]() { From c1c6a261fd4a4af02c21648fac282e7c3117af41 Mon Sep 17 00:00:00 2001 From: Joshua Zhuang <71105179+mencian@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:20:54 -0600 Subject: [PATCH 03/12] Update build.sh --- recipes/k8/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/k8/build.sh b/recipes/k8/build.sh index 92ed4bd738f8c..5d26ad0127060 100644 --- a/recipes/k8/build.sh +++ b/recipes/k8/build.sh @@ -18,7 +18,7 @@ fi case $(uname -m) in x86_64) - THREADS='-j"${CPU_COUNT}"' + THREADS="-j2" ;; *) THREADS="-j3" From a1758ac23885f59671f00a6fdcaab51b1ae08614 Mon Sep 17 00:00:00 2001 From: Joshua Zhuang <71105179+mencian@users.noreply.github.com> Date: Tue, 3 Dec 2024 18:24:09 -0600 Subject: [PATCH 04/12] Update conda_build_config.yaml --- recipes/k8/conda_build_config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/k8/conda_build_config.yaml b/recipes/k8/conda_build_config.yaml index 2b7e3622fbd60..1285379e54654 100644 --- a/recipes/k8/conda_build_config.yaml +++ b/recipes/k8/conda_build_config.yaml @@ -1,3 +1,7 @@ c_stdlib_version: # [unix] - 2.17 # [linux and x86_64] - 2.17 # [linux and not x86_64] +MACOSX_DEPLOYMENT_TARGET: # [osx] + - "10.13" # [osx] +MACOSX_SDK_VERSION: # [osx] + - "10.13" # [osx] From 246c548726979011185d69442cfe2bfcb477cda9 Mon Sep 17 00:00:00 2001 From: Joshua Zhuang <71105179+mencian@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:24:29 -0600 Subject: [PATCH 05/12] Update conda_build_config.yaml --- recipes/k8/conda_build_config.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/recipes/k8/conda_build_config.yaml b/recipes/k8/conda_build_config.yaml index 1285379e54654..2b7e3622fbd60 100644 --- a/recipes/k8/conda_build_config.yaml +++ b/recipes/k8/conda_build_config.yaml @@ -1,7 +1,3 @@ c_stdlib_version: # [unix] - 2.17 # [linux and x86_64] - 2.17 # [linux and not x86_64] -MACOSX_DEPLOYMENT_TARGET: # [osx] - - "10.13" # [osx] -MACOSX_SDK_VERSION: # [osx] - - "10.13" # [osx] From 91c80f24ea1fabae70bb8ff38110e740db8347e8 Mon Sep 17 00:00:00 2001 From: Joshua Zhuang <71105179+mencian@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:25:49 -0600 Subject: [PATCH 06/12] Update build.sh --- recipes/k8/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/k8/build.sh b/recipes/k8/build.sh index 5d26ad0127060..8a6659f2ce9d1 100644 --- a/recipes/k8/build.sh +++ b/recipes/k8/build.sh @@ -10,7 +10,7 @@ DEFAULT_LINUX_VERSION="cos7" # * node-18.20.x can be compiled on MacOS but not on CentOS 7 because it # includes an updated c-ares library which is incompatible with glibc on CentOS 7 if [[ "$(uname)" == "Darwin" ]]; then - NODE_VERSION="18.20.4" + NODE_VERSION="18.20.3" export LDFLAGS="${LDFLAGS} -Wl,-rpath,${PREFIX}/lib" else NODE_VERSION="18.19.1" From 20096615455cf3f53db96b36c73c2bfa005bc293 Mon Sep 17 00:00:00 2001 From: Joshua Zhuang <71105179+mencian@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:26:34 -0600 Subject: [PATCH 07/12] Update meta.yaml --- recipes/k8/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/k8/meta.yaml b/recipes/k8/meta.yaml index c1967c2cff22c..3e3c321a95603 100644 --- a/recipes/k8/meta.yaml +++ b/recipes/k8/meta.yaml @@ -18,10 +18,12 @@ requirements: build: - {{ compiler('cxx') }} - make + - clangdev # [osx] - sysroot_linux-64 >=2.17 # [linux and x86_64] host: - python >=3.8 - setuptools + - pip - zlib - wget - tar From d9d54f16d3a1b34596c10a59f5b75b46e05a62b7 Mon Sep 17 00:00:00 2001 From: Joshua Zhuang <71105179+mencian@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:47:53 -0600 Subject: [PATCH 08/12] Update meta.yaml --- recipes/k8/meta.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/k8/meta.yaml b/recipes/k8/meta.yaml index 3e3c321a95603..e6ac832835212 100644 --- a/recipes/k8/meta.yaml +++ b/recipes/k8/meta.yaml @@ -23,7 +23,6 @@ requirements: host: - python >=3.8 - setuptools - - pip - zlib - wget - tar From eaa62c7a6e1545a4d043b99922fe2d87b7d26a1d Mon Sep 17 00:00:00 2001 From: Joshua Zhuang <71105179+mencian@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:49:01 -0600 Subject: [PATCH 09/12] Update build.sh --- recipes/k8/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/k8/build.sh b/recipes/k8/build.sh index 8a6659f2ce9d1..ff1a8a6534cbb 100644 --- a/recipes/k8/build.sh +++ b/recipes/k8/build.sh @@ -10,7 +10,7 @@ DEFAULT_LINUX_VERSION="cos7" # * node-18.20.x can be compiled on MacOS but not on CentOS 7 because it # includes an updated c-ares library which is incompatible with glibc on CentOS 7 if [[ "$(uname)" == "Darwin" ]]; then - NODE_VERSION="18.20.3" + NODE_VERSION="18.20.5" export LDFLAGS="${LDFLAGS} -Wl,-rpath,${PREFIX}/lib" else NODE_VERSION="18.19.1" @@ -37,7 +37,7 @@ patch -p0 < ${RECIPE_DIR}/nodejs-x86_64.patch # The provided configure script is a sh/python hybrid which boils down to one line of Python python -c "import configure" --without-node-snapshot --without-etw --without-npm --without-inspector --without-dtrace -make "${THREADS}" +make "${THREADS}" CXXFLAGS="${CXXFLAGS} -std=c++14 -O3" popd # make it possible to set conda build's CXXFLAGS and point to the Node sources From 7053da2dc1fd9809ae96804a23aa9dd280fbbd61 Mon Sep 17 00:00:00 2001 From: Joshua Zhuang <71105179+mencian@users.noreply.github.com> Date: Tue, 3 Dec 2024 20:13:03 -0600 Subject: [PATCH 10/12] Update build.sh --- recipes/k8/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/k8/build.sh b/recipes/k8/build.sh index ff1a8a6534cbb..70007143543b3 100644 --- a/recipes/k8/build.sh +++ b/recipes/k8/build.sh @@ -37,7 +37,7 @@ patch -p0 < ${RECIPE_DIR}/nodejs-x86_64.patch # The provided configure script is a sh/python hybrid which boils down to one line of Python python -c "import configure" --without-node-snapshot --without-etw --without-npm --without-inspector --without-dtrace -make "${THREADS}" CXXFLAGS="${CXXFLAGS} -std=c++14 -O3" +make "${THREADS}" popd # make it possible to set conda build's CXXFLAGS and point to the Node sources From 67f22a00fb9292c960e9e0ff76121784eb39611a Mon Sep 17 00:00:00 2001 From: Joshua Zhuang <71105179+mencian@users.noreply.github.com> Date: Mon, 16 Dec 2024 20:45:29 -0600 Subject: [PATCH 11/12] bump build number --- recipes/k8/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/k8/meta.yaml b/recipes/k8/meta.yaml index e6ac832835212..29fe858653da9 100644 --- a/recipes/k8/meta.yaml +++ b/recipes/k8/meta.yaml @@ -10,7 +10,7 @@ source: sha256: 4157aa86066eb0a7874de194893c4544ac772d009cc1148377c9c346f9fc6d07 build: - number: 4 + number: 5 run_exports: - {{ pin_subpackage('k8', max_pin="x") }} From a093f99dc817fda046d123bd814d93dad03f5542 Mon Sep 17 00:00:00 2001 From: Joshua Zhuang <71105179+mencian@users.noreply.github.com> Date: Mon, 16 Dec 2024 20:46:47 -0600 Subject: [PATCH 12/12] add -fno-define-target-os-macros --- recipes/k8/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/k8/build.sh b/recipes/k8/build.sh index 70007143543b3..70f9d6db5c325 100644 --- a/recipes/k8/build.sh +++ b/recipes/k8/build.sh @@ -12,6 +12,7 @@ DEFAULT_LINUX_VERSION="cos7" if [[ "$(uname)" == "Darwin" ]]; then NODE_VERSION="18.20.5" export LDFLAGS="${LDFLAGS} -Wl,-rpath,${PREFIX}/lib" + export CFLAGS="${CFLAGS} -fno-define-target-os-macros" else NODE_VERSION="18.19.1" fi