Skip to content

Getting different architectures in slim images #278

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

Closed
jokarl opened this issue Feb 1, 2019 · 6 comments · Fixed by #322
Closed

Getting different architectures in slim images #278

jokarl opened this issue Feb 1, 2019 · 6 comments · Fixed by #322
Labels

Comments

@jokarl
Copy link

jokarl commented Feb 1, 2019

Slim images give the wrong architecture, see below:

pi@raspberrypi:~ $ docker run -it arm32v7/openjdk:8-jre-slim-stretch /bin/sh
# dpkg --print-architecture
armel

pi@raspberrypi:~ $ docker run -it arm32v7/openjdk:8-jre-stretch /bin/sh
# dpkg --print-architecture
armhf

pi@raspberrypi:~ $ docker run -it arm32v7/openjdk:8-jdk-slim /bin/sh
# dpkg --print-architecture
armel

pi@raspberrypi:~ $ dpkg --print-architecture
armhf
@tianon
Copy link
Member

tianon commented Feb 1, 2019

Looks like the 8 variants have been failing to build on arm32v7 for a while: 😞

https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/openjdk/228/console

Setting up ca-certificates-java (20170531+nmu1) ...
Error: missing `server' JVM at `/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/arm/server/libjvm.so'.
Please install or use the JRE or JDK that contains these missing components.
dpkg: error processing package ca-certificates-java (--configure):
 subprocess installed post-installation script returned error exit status 4
dpkg: dependency problems prevent configuration of openjdk-8-jre-headless:armhf:
 openjdk-8-jre-headless:armhf depends on ca-certificates-java; however:
  Package ca-certificates-java is not configured yet.

dpkg: error processing package openjdk-8-jre-headless:armhf (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for ca-certificates (20161130+nmu1+deb9u1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

Error: missing `server' JVM at `/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/arm/server/libjvm.so'.
Please install or use the JRE or JDK that contains these missing components.
E: /etc/ca-certificates/update.d/jks-keystore exited with code 1.
done.
Errors were encountered while processing:
 ca-certificates-java
 openjdk-8-jre-headless:armhf
�[91mE: Sub-process /usr/bin/dpkg returned an error code (1)
�[0mRemoving intermediate container cb39184e783a
The command '/bin/sh -c set -ex; 		if [ ! -d /usr/share/man/man1 ]; then 		mkdir -p /usr/share/man/man1; 	fi; 		apt-get update; 	apt-get install -y --no-install-recommends 		openjdk-8-jre-headless="$JAVA_DEBIAN_VERSION" 	; 	rm -rf /var/lib/apt/lists/*; 		[ "$(readlink -f "$JAVA_HOME")" = "$(docker-java-home)" ]; 		update-alternatives --get-selections | awk -v home="$(readlink -f "$JAVA_HOME")" 'index($3, home) == 1 { $2 = "manual"; print | "update-alternatives --set-selections" }'; 	update-alternatives --query java | grep -q 'Status: manual'' returned a non-zero code: 100

@jokarl
Copy link
Author

jokarl commented Feb 1, 2019

I noticed that too when I built my own image based on the arm32v7 debian stretch image and then trying to install it the same way as is done in openjdks Dockerfile. Doesn't seem like an error with this image then?

@tianon
Copy link
Member

tianon commented Feb 1, 2019

Yeah, there's something quirky going on with the Debian package we're pulling from, unfortunately (and it seems to not affect amd64 for whatever reason).

@jokarl
Copy link
Author

jokarl commented Feb 1, 2019

I did a clean install of the armhf openjdk on a fresh raspian install earlier today without any problems. I can't get any more specifics until Monday unfortunately, but I'll update with some more details then.

@jokarl jokarl closed this as completed Feb 1, 2019
@jokarl jokarl reopened this Feb 1, 2019
@jokarl
Copy link
Author

jokarl commented Feb 4, 2019

So from a fresh raspbian install on a raspberry, I ran the following:

pi@raspberrypi:~ $ sudo apt install openjdk-8-jre:armhf=8u181-b13-2~deb9u1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  icedtea-8-plugin
The following NEW packages will be installed:
  openjdk-8-jre
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/62.4 kB of archives.
After this operation, 234 kB of additional disk space will be used.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_TIME = "sv_SE.UTF-8",
	LC_MONETARY = "sv_SE.UTF-8",
	LC_ADDRESS = "sv_SE.UTF-8",
	LC_TELEPHONE = "sv_SE.UTF-8",
	LC_NAME = "sv_SE.UTF-8",
	LC_MEASUREMENT = "sv_SE.UTF-8",
	LC_IDENTIFICATION = "sv_SE.UTF-8",
	LC_NUMERIC = "sv_SE.UTF-8",
	LC_PAPER = "sv_SE.UTF-8",
	LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package openjdk-8-jre:armhf.
(Reading database ... 42070 files and directories currently installed.)
Preparing to unpack .../openjdk-8-jre_8u181-b13-2~deb9u1_armhf.deb ...
Unpacking openjdk-8-jre:armhf (8u181-b13-2~deb9u1) ...
Processing triggers for mime-support (3.60) ...
Setting up openjdk-8-jre:armhf (8u181-b13-2~deb9u1) ...
update-alternatives: using /usr/lib/jvm/java-8-openjdk-armhf/jre/bin/policytool to provide /usr/bin/policytool (policytool) in auto mode
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for hicolor-icon-theme (0.15-1) ...
pi@raspberrypi:~ $ java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-2~deb9u1-b13)
OpenJDK Client VM (build 25.181-b13, mixed mode)

With the following sources:

pi@raspberrypi:~ $ cat /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi

I don't know if this might be of any help.

@tianon
Copy link
Member

tianon commented Feb 4, 2019 via email

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

Successfully merging a pull request may close this issue.

3 participants