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

fail to precompile / install on jupyterhub #1095

Closed
gaelforget opened this issue Jan 3, 2023 · 8 comments
Closed

fail to precompile / install on jupyterhub #1095

gaelforget opened this issue Jan 3, 2023 · 8 comments

Comments

@gaelforget
Copy link

I have been trying to use GMT.jl within a containerized environment but get the error below.

Screenshot 2023-01-03 at 9 35 15 AM

To reproduce this error :

  • docker run -p 8888:8888 jupyter/datascience-notebook:latest
  • once browser window is open, start terminal, Julia, and using GMT

...

@gaelforget
Copy link
Author

I tried a couple more things with this Dockerfile :

FROM jupyter/datascience-notebook:latest

USER root

RUN apt-get install -y --no-install-recommends gmt
RUN apt-get install -y --no-install-recommends gmt-dcw gmt-gshhg
RUN apt-get install -y --no-install-recommends ghostscript

USER ${NB_USER}

RUN julia -e "import Pkg; Pkg.add(\"GMT\"); Pkg.precompile()"

which follows directions from the GMT docs for the apt-get part.

This errors as

Screenshot 2023-01-03 at 9 43 57 AM

which I think indicates that apt-get does not carry gmt. Is that right?

@gaelforget
Copy link
Author

Could be related to #1052 and #1049

@joa-quim
Copy link
Member

joa-quim commented Jan 3, 2023

Hi,

First I thought Ui, can't help. Know nothing about containers but than I saw that infamous libstdc++ error that gave so many headaches during half an year. The problem is on the Linux side that is so light on dependency breaking. GCC12 introduced a new libstdc++ lib that is incompatible with Julia versions up until 1.8.3. So you need to have at at least Julia 1.8.4

EDIT: Or install GMT independently in the container so to avoid the automatic installation done via Conda (this is the one that uses a GMT GCC12 build)

@gaelforget
Copy link
Author

Thanks for getting back so quickly!

Know nothing about containers

You likely use containers for your CI on github and various other things like binder or jupyterlab. I am no expert either but it's really useful to learn basics imho. In case that's of interest, we made this video as prep for the JuliaEO workshop.

https://youtu.be/daNrJhPPgWg

GCC12 introduced a new libstdc++ lib that is incompatible with Julia versions up until 1.8.3. So you need to have at at least Julia 1.8.4

Too bad. I was just taking a look in context of a workshop taking place next week where we are using Docker & 1.8.3 -- https://aircentre.github.io/JuliaEO/

EDIT: Or install GMT independently in the container so to avoid the automatic installation done via Conda (this is the one that uses a GMT GCC12 build)

This failed for me too though. See #1095 (comment)

@joa-quim
Copy link
Member

joa-quim commented Jan 3, 2023

which I think indicates that apt-get does not carry gmt. Is that right?

A quick answer to this. Those VMs are often based on Ubuntu and this distro is, by default, incredibly dumb on providing updated versions. The GMT site has info on how to install/build GMT

@joa-quim
Copy link
Member

joa-quim commented Jan 3, 2023

Another possibility. The CI tests always build GMT from source. Could chunks of that GH-Action be extracted into your build env?

@gaelforget
Copy link
Author

Another possibility. The CI tests always build GMT from source. Could chunks of that GH-Action be extracted into your build env?

Could work. Thanks for the pointers

@joa-quim
Copy link
Member

GMT_jll artifact is now used, so these problems should have gone.

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

2 participants