-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Support alpine images for arm32v7/armhf #141
Comments
We have Alpine builds for x86-64 |
@sxa did you by chance mean |
@sxa we have same situation with |
@mrdziuban Yep sorry for the confusion - have done a strikethrough on aarch64 in my earlier comment. We don't currently have the testing infrasdtructure set up to do Alpine on aarch64 but given that this particular issue was a request for arm32v7 rather than aarch64 could you raise a separate issue to cover aarch64 please? |
No problem! Created #158 to track aarch64 support |
I see. Well then maybe you can start collecting requests here and once there's sufficient demand, it might become a thing? :) |
I need it, that's for sure. I have tons of arm32 machines, and they do need this arm32 version. |
I built an Alpine Docker image to build openJDK, but I'm kind of stuck. #7 1285.3 Running ./configure with arguments 'bash ./configure --verbose --with-vendor-name="Undefined Vendor" --with-vendor-url= --with-vendor-bug-url=file:///dev/null --with-vendor-vm-bug-url=file:///dev/null --with-version-opt=202205171934 --with-version-pre=beta --with-version-build=12 --with-debug-level=release --with-native-debug-symbols=none --with-jvm-variants=server,client --with-cacerts-file=/temurin-build/sbin/../security/cacerts --with-jobs=2 '''
#7 1285.3 Should have the source, I'm at /temurin-build/workspace/build/src
#7 1285.3 Currently at '/temurin-build/workspace/build/src'
#7 1288.8 Running generated-configure.sh
#7 1290.6 configure: WARNING: you should use --build, --host, --target
#7 1290.6 configure: error: unrecognized options: --with-vendor-name, --with-vendor-url, --with-vendor-bug-url, --with-vendor-vm-bug-url
#7 1290.7 configure exiting with result code 1
#7 1290.7 Note: Command line contains non-control variables:
#7 1290.7 * DEBUG_BINARIES=true
#7 1290.7 Make sure it is not mistyped, and that you intend to override this variable.
#7 1290.7 'make help' will list known control variables.
#7 1290.7
#7 1290.7 Error: No configurations found for /temurin-build/workspace/build/src. This does not happen with the same image for aarch64 for example. Could it be linked to a too recent Thanks. |
I tried to build with Certificate was added to keystore
real 4m42.839s
user 4m2.770s
sys 0m37.815s
build.sh : 13:00:31 : Initiating build ...
Pulling latest tags and getting the latest update version using git fetch -q --tags --depth=1
NOTE: This can take quite some time! Please be patient
From /openjdk//./build//src
* branch HEAD -> FETCH_HEAD
OpenJDK repo tag is jdk-9.0.4+12
Version: jdk
Should have the source, I'm at /openjdk/build/src
From /openjdk//./build//src
* branch HEAD -> FETCH_HEAD
OpenJDK repo tag is jdk-9.0.4+12
Completed configuring the version string parameter, config args are now: --with-vendor-name="Undefined Vendor" --with-vendor-url= --with-vendor-bug-url=file:///dev/null --with-vendor-vm-bug-url=file:///dev/null --with-version-opt=202205181300 --with-version-pre=beta --with-version-build=12
Building up the configure command...
Configuring jvm variants if provided
Configure custom cacerts file security/cacerts
setting freetype dir to /openjdk//./build//installedfreetype
Completed configuring the version string parameter, config args are now: --with-vendor-name="Undefined Vendor" --with-vendor-url= --with-vendor-bug-url=file:///dev/null --with-vendor-vm-bug-url=file:///dev/null --with-version-opt=202205181300 --with-version-pre=beta --with-version-build=12 --with-boot-jdk=/usr/lib/jvm/jdk8 --with-debug-level=release --with-native-debug-symbols=none --enable-ccache --with-jvm-variants=server,client --with-cacerts-file=/openjdk/sbin/../security/cacerts --with-jobs=1 '' --with-freetype=/openjdk//./build//installedfreetype
Configuring command and using the pre-built config params...
Should have the source, I'm at /openjdk/build/src
Currently at '/openjdk/build/src'
Running ./configure with arguments 'bash ./configure --verbose --with-vendor-name="Undefined Vendor" --with-vendor-url= --with-vendor-bug-url=file:///dev/null --with-vendor-vm-bug-url=file:///dev/null --with-version-opt=202205181300 --with-version-pre=beta --with-version-build=12 --with-boot-jdk=/usr/lib/jvm/jdk8 --with-debug-level=release --with-native-debug-symbols=none --enable-ccache --with-jvm-variants=server,client --with-cacerts-file=/openjdk/sbin/../security/cacerts --with-jobs=1 '' --with-freetype=/openjdk//./build//installedfreetype'
Should have the source, I'm at /openjdk/build/src
Currently at '/openjdk/build/src'
Running generated-configure.sh
configure: WARNING: you should use --build, --host, --target
configure: error: unrecognized options: --with-vendor-name, --with-vendor-url, --with-vendor-bug-url, --with-vendor-vm-bug-url
configure exiting with result code 1
Note: Command line contains non-control variables:
* DEBUG_BINARIES=true
Make sure it is not mistyped, and that you intend to override this variable.
'make help' will list known control variables.
Error: No configurations found for /openjdk/build/src.
Please run 'bash configure' to create a configuration.
/openjdk/build/src/make/Init.gmk:124: *** Cannot continue. Stop.
OpenJDK make failed, archiving make failed logs
/openjdk/sbin/build.sh: line 601: cd: build/*: No such file or directory
Copying hotspot/src/share/tools/IdealGraphVisualizer/branding/core/core.jar to TemurinLogsArchive/hotspot/src/share/tools/IdealGraphVisualizer/branding/core
cp: -r not specified; omitting directory 'hotspot/src/share/tools/IdealGraphVisualizer/branding/core/core.jar'
Archiving and compressing with gzip
real 0m0.030s
user 0m0.010s
sys 0m0.019s
Your final archive was created at /openjdk/build/src/OpenJDK.tar.gz
Moving the artifact to /openjdk//target/
archive done.
Failed to make the JDK, exiting |
Those options are different between 8 and 11+ IIRC. My suspicion would be that our conditionals are set wrongly for JDK9 and pick up the 11 way instead of 8 or vice-versa (Not a surprise since we haven't built it for years). If you wanted to build it you could probably just strip those options out of the build process (or find the conditional that's wrong and PR it - I wouldn't have a problem with putting something that like in personally but I can't speak for other committers! |
@gounthar Any progress and maybe success on this topic? |
Unfortunately, no. I have retried building the FROM alpine:3.17
ENV JAVA_HOME /opt/java/openjdk
ENV PATH $JAVA_HOME/bin:$PATH
# Default to UTF-8 file.encoding
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
# fontconfig and ttf-dejavu added to support serverside image generation by Java programs
RUN apk add --no-cache fontconfig libretls musl-locales musl-locales-lang ttf-dejavu tzdata zlib \
&& rm -rf /var/cache/apk/*
ENV JAVA_VERSION jdk-17.0.7+7
RUN set -eux; \
ARCH="$(apk --print-arch)"; \
case "${ARCH}" in \
amd64|x86_64) \
ESUM='b6edac2fa669876ef16b4895b36b61d01066626e7a69feba2acc19760c8d18cb'; \
BINARY_URL='https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_x64_alpine-linux_hotspot_17.0.7_7.tar.gz'; \
;; \
armv7) \
ESUM='e7a84c3e59704588510d7e6cce1f732f397b54a3b558c521912a18a1b4d0abdc'; \
BINARY_URL='https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_arm_linux_hotspot_17.0.7_7.tar.gz'; \
;; \
*) \
echo "Unsupported arch: ${ARCH}"; \
exit 1; \
;; \
esac; \
wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \
echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \
mkdir -p "$JAVA_HOME"; \
tar --extract \
--file /tmp/openjdk.tar.gz \
--directory "$JAVA_HOME" \
--strip-components 1 \
--no-same-owner \
; \
rm -f /tmp/openjdk.tar.gz ${JAVA_HOME}/src.zip;
RUN echo Verifying install ... \
&& fileEncoding="$(echo 'System.out.println(System.getProperty("file.encoding"))' | jshell -s -)"; [ "$fileEncoding" = 'UTF-8' ]; rm -rf ~/.java \
&& echo javac --version && javac --version \
&& echo java --version && java --version \
&& echo Complete.
CMD ["jshell"] But it makes no sense, as the downloaded openJDK uses file jshell
jshell: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, not stripped
/opt/java/openjdk/bin # ldd jshell
/lib/ld-linux-armhf.so.3 (0xb6ed3000)
libz.so.1 => /lib/libz.so.1 (0xb6eb2000)
libjli.so => ./../lib/libjli.so (0xb6e94000)
libpthread.so.0 => /lib/ld-linux-armhf.so.3 (0xb6ed3000)
libdl.so.2 => /lib/ld-linux-armhf.so.3 (0xb6ed3000)
libc.so.6 => /lib/ld-linux-armhf.so.3 (0xb6ed3000)
Error loading shared library ld-linux-armhf.so.3: No such file or directory (needed by ./../lib/libjli.so)
Error relocating ./../lib/libjli.so: __rawmemchr: symbol not found
Error relocating ./../lib/libjli.so: __xstat: symbol not found
Error relocating ./../lib/libjli.so: __fxstat: symbol not found
Error relocating ./../lib/libjli.so: __strdup: symbol not found
/opt/java/openjdk/bin # ll /lib/ld-musl-armhf.so.1 As long as there isn't any binary package for |
The armv7 (and v8) are used widely in new routers. Alpine has OpenJDK 8 compiled with the musl for the amrv7 and I was able to use it my router. There is even a repo that just repackaged the OpenJDK from the Alpine https://github.com/josedelinux/openwrt-jdk I also was able to use the Eclipse Temurin openjdk17 with glibc in Docker but that's cost me almost all of disk. |
Hi,
are there any plans to build the Alpine-based containers for the arm32v7 (aka. armhf) architecture? So far, there are Alpine builds for other architectures, and non-Alpine builds for arm32v7, but the combination doesn't exist.
I believe such images would be very useful, since devices with this architecture tend to have little resources, making Alpine a nice fit.
The text was updated successfully, but these errors were encountered: