From b6f61c252329ed222fcf7a254b4e83beb78fa0ce Mon Sep 17 00:00:00 2001 From: Andreas Fankhauser hiddenalpha.ch Date: Wed, 8 Nov 2023 00:56:53 +0100 Subject: Add some notes about jssc build (but see github jssc) --- doc/note/qemu/build-jssc.txt | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 doc/note/qemu/build-jssc.txt diff --git a/doc/note/qemu/build-jssc.txt b/doc/note/qemu/build-jssc.txt new file mode 100644 index 0000000..3acdf6e --- /dev/null +++ b/doc/note/qemu/build-jssc.txt @@ -0,0 +1,41 @@ + +This is only another copy. Likely we should use the one at +https://github.com/hiddenalpha/jssc/blob/master/contrib/hiddenalpha-buildEnv-one +. + +true `# Configure for debian 9` \ + && CXX="g++" \ + && CFLAGS="-fPIC -Wall -pedantic -Werror \ + -Wno-error=long-long \ + -Wno-error=sign-compare \ + -Wno-error=variadic-macros \ + -Wno-long-long" \ + && targets="linux_64" \ + && SUDO= \ + && true + +true `# Setup` \ + && $SUDO apt install -y --no-install-recommends \ + git openjdk-8-jdk-headless g++ maven \ + && true + +true `# Make` \ + && cat contrib/hiddenalpha-buildEnv-one/res/pom.patch | git apply \ + && mvn clean \ + && mvn -PnoCmake compile \ + && printf '%s "%s"\n' "#define JSSC_VERSION" "$(git describe --tags|sed 's,^v,,')" \ + > src/main/cpp/version.h \ + && mkdir -p src/main/resources-precompiled/natives/linux_64 \ + && g++ $CFLAGS -shared \ + -o src/main/resources-precompiled/natives/linux_64/libjssc.so \ + src/main/cpp/_nix_based/jssc.cpp \ + -I/usr/lib/jvm/java-1.8.0-openjdk-amd64/include \ + -I/usr/lib/jvm/java-1.8.0-openjdk-amd64/include/linux \ + -Isrc/main/cpp \ + && for T in ${targets:?}; do + && mvn -PnoCmake -PnoJavah -PnativeJar -P"${T:?}" package \ + ;done \ + && mvn -PnoCmake -PnoJavah -PnoNatives -PwithTestClasspath verify \ + && true + + -- cgit v1.1