Skip to content

Commit

Permalink
Rebuild k8 on macOS (#52560)
Browse files Browse the repository at this point in the history
* Rebuild k8 on macOS

* Update nodejs-x86_64.patch

* Update build.sh

* Update conda_build_config.yaml

* Update conda_build_config.yaml

* Update build.sh

* Update meta.yaml

* Update meta.yaml

* Update build.sh

* Update build.sh

* bump build number

* add -fno-define-target-os-macros
  • Loading branch information
mencian authored Dec 17, 2024
1 parent e2ee35f commit a3fac57
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions recipes/k8/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ 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.5"
export LDFLAGS="${LDFLAGS} -Wl,-rpath,${PREFIX}/lib"
export CFLAGS="${CFLAGS} -fno-define-target-os-macros"
else
NODE_VERSION="18.19.1"
fi
Expand Down Expand Up @@ -47,8 +48,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"
2 changes: 1 addition & 1 deletion recipes/k8/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
c_stdlib_version: # [unix]
- 2.17 # [linux and x86_64]
- 2.17 # [linux and not x86_64]
- 2.17 # [linux and not x86_64]
4 changes: 2 additions & 2 deletions recipes/k8/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ source:
sha256: 4157aa86066eb0a7874de194893c4544ac772d009cc1148377c9c346f9fc6d07

build:
number: 3
skip: True # [osx and x86_64]
number: 5
run_exports:
- {{ pin_subpackage('k8', max_pin="x") }}

requirements:
build:
- {{ compiler('cxx') }}
- make
- clangdev # [osx]
- sysroot_linux-64 >=2.17 # [linux and x86_64]
host:
- python >=3.8
Expand Down

0 comments on commit a3fac57

Please sign in to comment.