-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
- Loading branch information
Showing
5 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,29 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
set -x | ||
|
||
DEFAULT_LINUX_VERSION="cos7" | ||
NODE_VERSION="18.19.1" | ||
|
||
wget -O- https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.tar.gz | tar -zxf - | ||
pushd node-v${NODE_VERSION} | ||
|
||
# Workaround the following error that happens only on Azure build for Linux x86_64 | ||
# 2024-03-19T13:32:27.9240276Z 13:32:25 [32mBIOCONDA INFO[0m (OUT) ../src/debug_utils.cc:479:11: error: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)' declared with attribute 'warn_unused_result' [-Werror=unused-result][0m | ||
# 2024-03-19T13:32:27.9240731Z 13:32:25 [32mBIOCONDA INFO[0m (OUT) 479 | fwrite(str.data(), str.size(), 1, file);[0m | ||
# 2024-03-19T13:32:27.9241079Z 13:32:25 [32mBIOCONDA INFO[0m (OUT) | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m | ||
# 2024-03-19T13:32:27.9241412Z 13:32:27 [32mBIOCONDA INFO[0m (OUT) cc1plus: some warnings being treated as errors[0m | ||
patch -p0 < ${RECIPE_DIR}/nodejs-x86_64.patch | ||
|
||
./configure --without-node-snapshot --without-etw --without-npm --without-inspector --without-dtrace | ||
make -j3 | ||
popd | ||
|
||
# make it possible to point to the Node sources | ||
sed -i.bak 's/NODE_SRC=../NODE_SRC?=../' Makefile | ||
|
||
# Then compile k8 | ||
NODE_SRC=node-v${NODE_VERSION} make -j | ||
|
||
ls -laR | ||
mkdir -p $PREFIX/bin | ||
# cp k8-$(uname -m)-$(uname -s) $PREFIX/bin/k8 | ||
cp k8 $PREFIX/bin/k8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
c_stdlib_version: # [unix] | ||
- 2.17 # [linux and x86_64] | ||
- 2.17 # [linux and not x86_64] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- 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 = [&]() { | ||
// The return value is ignored because there's no good way to handle it. | ||
- fwrite(str.data(), str.size(), 1, file); | ||
+ size_t ret = fwrite(str.data(), str.size(), 1, file); | ||
+ if (ret != str.size()) { | ||
+ fprintf(stderr, "fwrite returned error : %lu\n", ret); | ||
+ } | ||
}; | ||
|
||
if (file != stderr && file != stdout) { |