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

Packmol installation fails on precompile (v0.1.10 and v0.1.9) - related to headless system? #9

Closed
spackman opened this issue Nov 12, 2024 · 5 comments

Comments

@spackman
Copy link

Error Description

With a clean julia install, running this command:

import Pkg; Pkg.activate("Packmol"; shared=true); Pkg.add("Packmol")

Yields the following error:

Precompiling project...
  ✗ ATK_jll
  ✗ gdk_pixbuf_jll
  ✗ Cairo_jll
  ✗ at_spi2_core_jll
  ✗ HarfBuzz_jll
  ✗ at_spi2_atk_jll
  ✗ Pango_jll
  ✗ GTK3_jll
  ✗ NativeFileDialog_jll
  ✗ NativeFileDialog
  ✗ Packmol
  78 dependencies successfully precompiled in 30 seconds. 5 already precompiled.
  11 dependencies errored.
  For a report of the errors see `julia> err`. To retry use `pkg> precompile`  

Attempted Corrections

  • tried downgrading to v0.1.9, received the same error
  • it appears that all of the erroring packages are related to the GUI that should open to allow users to select a file when no input file is passed. I am trying to install on a headless Linux system, which I suspect is causing the issue. Is it possible to install Packmol.jl for a headless system??

Hardware

=== Linux Distribution Info ===
NAME="Rocky Linux"
VERSION="9.4 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.4"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.4 (Blue Onyx)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:9::baseos"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2032-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-9"
ROCKY_SUPPORT_PRODUCT_VERSION="9.4"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.4"

=== Installed Packages ===
=== Julia Version ===
julia version 1.10.2

@lmiq
Copy link
Member

lmiq commented Nov 12, 2024

  1. How did you install Julia there? If not from the official Julia page, please try that.

  2. Did you try using the package after that? A failed precompile doesn't necessarily mean that the package won't work.

  3. You can run packmol without Julia as well by compiling it yourself. On Linux that's rather simple.

@spackman
Copy link
Author

Thanks for getting back to me so soon!

  1. Julia was installed from the official package

  2. I did try to use Packmol.jl after the failed precompiling. It failed when loading (using Packmol) due to its dependency on the NativeFileDialog

  3. I may look into compiling Packmol without julia instead. I had previously installed Packmol with julia on this machine, so I have built some julia code that depends on it and would prefer this option. It is very strange that the build now fails, after I had successfully installed and used Packmol with julia for several months.

Update:

  • I removed my .julia/ directory and retried the same command (import Pkg; Pkg.activate("Packmol"; shared=true); Pkg.add("Packmol")). I did this several times yesterday, trying to make local edits to the Project.toml and Manifest.toml to resolve the dependency issues. I encountered the same error listed above each time.
  • I attempted installing the failed dependencies directly with Pkg.add() and Pkg.build(). These also failed.
  • I forked the repo and removed all instances where NativeFileDialog was used (and the corresponding functions that rely on it). I tried to install to julia using my forked version, but it appears that the environment manager still detected the original Packmol dependencies, rather than my new edits, so it failed with the same error as before.

This morning I removed the .julia/ directory and retried the same command (import Pkg; Pkg.activate("Packmol"; shared=true); Pkg.add("Packmol")). All dependencies solved and precompiled with no errors, despite no apparent changes on my end. However, when Packmol is called (using Packmol) it fails due to the same dependencies as before (starting with Glib_jll, though I believe the root cause is still the NativeFileDialog being unable to run on a headless machine)

@lmiq
Copy link
Member

lmiq commented Nov 12, 2024

I created a branch where the loading of the GUI is conditioned to a system environment variable. You should use as:

On you shell (bash here):

export PACKMOL_GUI="false"

Then:

julia> import Pkg; Pkg.activate("Packmol"; shared=true); Pkg.add(url="https://github.com/m3g/Packmol.jl"; rev="optional_gui")

julia> using Packmol

julia> run_packmol() # this should return an error message.

The non-gui execution should work (with run_packmol("inputfile.inp"), for example.

Can you let me know if that works for you? If so, I'll release this version.

@spackman
Copy link
Author

This works exactly as expected!

Thank you for your efforts!

@lmiq
Copy link
Member

lmiq commented Nov 12, 2024

Great. That will be available in Version 0.1.11 to be released at any moment.

Thanks for your feedback.

@lmiq lmiq closed this as completed Nov 12, 2024
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