Skip to content

Never ending precompilation with devcontainer and libgl1 installed #64

@opiateblush

Description

@opiateblush

When I am using GtkObservables.jl inside docker or a vscode devcontainer, the precompilation never ends when libgl1 package is installed.

This is a simple Dockerfile to demonstrate the issue:

FROM ubuntu:22.04

RUN apt update && apt upgrade -y

RUN apt install -y wget
RUN apt install -y libgl1

# setup Julia 1.10.0; does not matter, problem persists in both versions
# RUN wget https://julialang-s3.julialang.org/bin/linux/x64/1.10/julia-1.10.0-linux-x86_64.tar.gz
# RUN tar -xf julia-1.10.0-linux-x86_64.tar.gz
# RUN cp -R julia-1.10.0 /opt/
# RUN ln -s /opt/julia-1.10.0/bin/julia /usr/bin/julia
# RUN rm julia-1.10.0-linux-x86_64.tar.gz
# RUN rm -R julia-1.10.0

# setup Julia 1.9.4
RUN wget https://julialang-s3.julialang.org/bin/linux/x64/1.9/julia-1.9.4-linux-x86_64.tar.gz
RUN tar -xf julia-1.9.4-linux-x86_64.tar.gz
RUN cp -R julia-1.9.4 /opt/
RUN ln -s /opt/julia-1.9.4/bin/julia /usr/bin/julia
RUN rm julia-1.9.4-linux-x86_64.tar.gz
RUN rm -R julia-1.9.4

RUN JULIA_PKG_PRECOMPILE_AUTO=0 \
    julia -e 'using Pkg; \
        Pkg.add("GtkObservables")'

The .devcontainer config looks as follows:

{
	"name": "GtkObservablesIssue",
	"build": {
		"context": "..",
		"dockerfile": "../Dockerfile"
	}
}

Unfortunately, the precompilation can only be started once the container is up and running and the forwardings are in place. Using and precompiling Gtk4.jl during the build stage on the other hand is no problem at all. If the precompilation of GtkObservables.jl is triggered during the build stage it throws an error as it initializes Gtk4.jl at some point, which tries to call gtk_init_check. In this case the presence of the libgl1 package doesn't matter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions