Skip to content
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

Never ending precompilation with devcontainer and libgl1 installed #64

Open
opiateblush opened this issue Feb 16, 2024 · 0 comments
Open

Comments

@opiateblush
Copy link

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.

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

No branches or pull requests

1 participant