Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prebuilt binaries for Node 22 LTS #421

Open
ddolcimascolo opened this issue Nov 27, 2024 · 1 comment
Open

Add prebuilt binaries for Node 22 LTS #421

ddolcimascolo opened this issue Nov 27, 2024 · 1 comment

Comments

@ddolcimascolo
Copy link

Hi @JCMais,

As every year :)
I can try to help if that's useful, feel free to ask.

Thanks,
David

@ddolcimascolo
Copy link
Author

ddolcimascolo commented Nov 29, 2024

I've made a few tests, here's what I've found:

Dependencies

  • Node 22 has Brotoli 1.1.0 which dropped Autoconf support. See [1]. To build it we now have to run cmake directly, passing down all options. I've had success using this patch
--- a/scripts/ci/build-brotli.sh
+++ b/scripts/ci/build-brotli.sh
@@ -41,22 +41,28 @@ if [ "$(uname)" == "Darwin" ]; then
   export LDFLAGS=""
 fi
 
-../configure-cmake \
-  --prefix=$build_folder \
-  --disable-debug \
-  --pass-thru \
-  -DCMAKE_INSTALL_PREFIX:PATH=$build_folder \
-  -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=$build_folder/lib \
-  -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=$build_folder/lib
-
-make
+# Brotoli <= 1.0.9
+#
+#../configure-cmake \
+#  --prefix=$build_folder \
+#  --disable-debug \
+#  --pass-thru \
+#  -DCMAKE_INSTALL_PREFIX:PATH=$build_folder \
+#  -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=$build_folder/lib \
+#  -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=$build_folder/lib
+#
+#make
+cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$build_folder -DCMAKE_INSTALL_PREFIX:PATH=$build_folder -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=$build_folder/lib -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=$build_folder/lib ..
+cmake --build . --config Release --target install
 
 cp -r $2/source/$1/c/include $build_folder/include
 
+# Brotoli <= 1.0.9
+#
 # static libraries are built with -static suffix, remove it
 # also remove the dynamic ones, so they are not used
-for filename in $build_folder/lib/*.a; do
-  mv $filename $(echo "$filename" | sed "s/-static//g")
-done
+#for filename in $build_folder/lib/*.a; do
+#  mv $filename $(echo "$filename" | sed "s/-static//g")
+#done
 
 find $build_folder/lib/ -not -type d -not -name '*.a' -delete

Library

  • Lots of build errors with node-gyp
  • Upgrading to nan@2.22.0 and node-gyp@10.2.0 made the library build, with some warnings though

References

Cheers,
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant