Libglib2: qemu: uncaught target signal 4 (Illegal instruction)

Hi There,

Starting from a simple Hello .NET example for ResinIO somewhere, i’m expanding the docker file somewhat.
I’m kinda stuck on these kind of errors:

 Setting up libmono-corlib4.5-cil (4.8.1.0-0xamarin1) ...
[Build]    qemu: uncaught target signal 4 (Illegal instruction) - core dumped
[Build]    Illegal instruction (core dumped)
[Build]    Setting up libmono-security4.0-cil (4.8.1.0-0xamarin1) ...
[Build]    Setting up libmono-system-security4.0-cil (4.8.1.0-0xamarin1) ...
[Build]    Setting up libmono-system4.0-cil (4.8.1.0-0xamarin1) ...
[Build]    Setting up libglib2.0-cil (2.12.26-0xamarin1) ...
[Build]    qemu: uncaught target signal 4 (Illegal instruction) - core dumped
[Build]    Illegal instruction (core dumped)
[Build]    Use of uninitialized value $_ in scalar chomp at /usr/share/cli-common/runtimes.d/mono line 275.
[Build]    Use of uninitialized value $fullname in concatenation (.) or string at /usr/share/cli-common/runtimes.d/mono line 225.
[Build]    qemu: uncaught target signal 4 (Illegal instruction) - core dumped
[Build]    Illegal instruction (core dumped)
[Build]    E: installing Assembly /usr/share/cli-common/policies.d/libglib2.0-cil/policy.2.6.glib-sharp.dll failed
[Build]    E: Installation of policy.2.6.glib-sharp with /usr/share/cli-common/runtimes.d/mono failed
[Build]    dpkg: error processing package libglib2.0-cil (--configure):
[Build]     subprocess installed post-installation script returned error exit status 1
[Build]    Setting up libmono-system-configuration4.0-cil (4.8.1.0-0xamarin1) ...
[Build]    Setting up libmono-system-xml4.0-cil (4.8.1.0-0xamarin1) ...
[Build]    Processing triggers for libc-bin (2.19-18+deb8u7) ...
[Build]    Errors were encountered while processing:
[Build]     libglib2.0-cil
[Build]    E: Sub-process /usr/bin/dpkg returned an error code (1)

i’m running the following docker file content:

FROM resin/rpi-raspbian:jessie

RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \
 && echo "deb http://download.mono-project.com/repo/debian wheezy main" > /etc/apt/sources.list.d/mono-xamarin.list \
 && apt-get update \
 && apt-get install -y --fix-missing libglib2.0-cil \
 && apt-get install -y --fix-missing mono-devel mono-vbnc \
 && rm -rf /var/lib/apt/lists/*

I had cut libglbli2.0 in 2, so we can see more quickly it already fails at that.

I can make it smaller, things will work then but i won’t have al mono libraries i need. I realy need the full mono-complete as a nice base image for it to work for me.

Can somebody point me in the right direction?

It looks like you’re trying to install/run x86/64 binaries on your ARM raspberry pi, which will not work.

Is there any reason you cannot use the mono-complete package provided by Debian?

yeah something is not working there either:

now i tried this:

FROM resin/rpi-raspbian:jessie

RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \
 && echo "deb http://download.mono-project.com/repo/debian wheezy main" > /etc/apt/sources.list.d/mono-xamarin.list \
 && apt-get update \
 && apt-get install -y --fix-missing mono-complete mono-vbnc \
 && rm -rf /var/lib/apt/lists/*

But that results in a bunch of qemu style errors, e.g.

* Installing 1 assembly from libnunit-framework2.6.3-cil into Mono
[Build]    qemu: uncaught target signal 4 (Illegal instruction) - core dumped
[Build]    Illegal instruction (core dumped)
[Build]    Use of uninitialized value $_ in scalar chomp at /usr/share/cli-common/runtimes.d/mono line 275.
[Build]    Use of uninitialized value $fullname in concatenation (.) or string at /usr/share/cli-common/runtimes.d/mono line 225.
[Build]    qemu: uncaught target signal 4 (Illegal instruction) - core dumped
[Build]    Illegal instruction (core dumped)
[Build]    E: installing Assembly /usr/lib/cli/nunit.framework-2.6.3/nunit.framework.dll failed
[Build]    E: Installation of libnunit-framework2.6.3-cil with /usr/share/cli-common/runtimes.d/mono failed
[Build]    dpkg: error processing package libnunit-framework2.6.3-cil (--configure):
[Build]     subprocess installed post-installation script returned error exit status 132
[Build]    dpkg: dependency problems prevent configuration of libnunit-mocks2.6.3-cil:
[Build]     libnunit-mocks2.6.3-cil depends on libnunit-framework2.6.3-cil; however:
[Build]      Package libnunit-framework2.6.3-cil is not configured yet.
[Build]    dpkg: error processing package libnunit-mocks2.6.3-cil (--configure):

or

[Build]    Processing triggers for systemd (215-17+deb8u6) ...
[Build]    Processing triggers for ca-certificates (20141019+deb8u2) ...
[Build]    Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done.
[Build]    Running hooks in /etc/ca-certificates/update.d....Updating Mono key store
[Build]    qemu: uncaught target signal 4 (Illegal instruction) - core dumped
[Build]    Illegal instruction (core dumped)
[Build]    Done
[Build]    done.
[Build]    Errors were encountered while processing:
[Build]     libglib2.0-cil
[Build]     libgtk2.0-cil
[Build]     libglade2.0-cil
[Build]     libnunit-core-interfaces2.6.3-cil
[Build]     libnunit-core2.6.3-cil
[Build]     libnunit-util2.6.3-cil
[Build]     libnunit-console-runner2.6.3-cil
[Build]     libnunit-framework2.6.3-cil
[Build]     libnunit-mocks2.6.3-cil
[Build]     libnunit-cil-dev
[Build]     libmono-cil-dev
[Build]     libwebkit1.1-cil
[Build]     mono-devel
[Build]     monodoc-browser
[Build]     mono-complete
[Build]    E: Sub-process /usr/bin/dpkg returned an error code (1)

i don’t get it, i guess…?

I tried a different FROM, more general one (not raspberry) (don’t remember wich one)
Here mono-complete will build, but as soon as it hits ResinOS on there it will give a ‘format exception’ on starting the container.

Tried pushing specifically to master:master-arm but i guess that isn’t up anymore?

There is a mono-complete package provided by Debian, no need to add the mono-project.com sources:

RUN apt-get update -q \
    && apt-get install -qy mono-complete \
    && apt-get clean && rm -rf /var/lib/apt/lists/*

Have you tried this package?

oh like that. Well; its only mono 3.2 or something, last time i checked. Will try now too…

oke, i’m trying now FROM debian:sid, for that has at least MONO 4.6. Lets see how that works!

Okay, i’ve got something working by using the FROM mentioned here.

Rather i’d use the entire docker file that is mentioned here. What would i supply at FROM to use this exact image, described here ?

It looks like the stretch images are not published for consumption yet, I’ve pinged the internal team who deal with this and will get back to you with some more info.

2 Likes

Hi wrboyce,

Any change the internal team had taken a look at this?

Regards,

hey @salorob,

You can use FROM resin/raspberrypi3-debian:stretch instead of the entire dockerfile above.

love it.

Will check it out, thnx!