Coder Social home page Coder Social logo

Comments (8)

IngoMeyer441 avatar IngoMeyer441 commented on August 16, 2024

Hey @MikiVanousek,
I tried your example on a fresh NixOS (latest) installation and it works for me. How did you install julia and GR? I fetched Julia from the official home page (binary release) since the Julia package in NixOS is currently broken. I installed GR with the Julia package manager in the REPL (], add GR).

image

from gr.

MikiVanousek avatar MikiVanousek commented on August 16, 2024

I used the Nixpkgs package julia_17-bin, which works, with the notable exception of Julia packages that ship binaries linked against specific dependency paths that are different on NixOS.

As for just downloading of the binary form the website, I somehow failed at this task. Did you do something besides running the binary in /bin of the downloaded folder? I get:

bash: /home/miki/dow/julia-1.7.3/bin/julia: No such file or directory

even though

/home/miki/dow/julia-1.7.3/bin/julia

from gr.

MikiVanousek avatar MikiVanousek commented on August 16, 2024

In any case, I don't think there should be much of a difference between the manually downloaded Julia binary and the Nixpkgs one. Would you try it with the NixOS binary? You can obtain it with nix-shell -p julia-stable-bin.

from gr.

MikiVanousek avatar MikiVanousek commented on August 16, 2024
dow/julia-1.7.3/bin 
❯ nix-shell -p julia-stable-bin

dow/julia-1.7.3/bin via ❄️  impure (shell) 
❯ julia 
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.7.3 (2022-05-06)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.7) pkg> add GR
    Updating registry at `~/.local/share/julia/registries/General.toml`
   Resolving package versions...
  No Changes to `~/.local/share/julia/environments/v1.7/Project.toml`
  No Changes to `~/.local/share/julia/environments/v1.7/Manifest.toml`

julia> using GR

julia> histogram(rand(1000))
env: ‘/home/miki/.local/share/julia/artifacts/261454d51a07163528d01f640e8349c372ac05b2/bin/gksqt’: No such file or directory
connect: Connection refused
GKS: can't connect to GKS socket application

GKS: Open failed in routine OPEN_WS
GKS: GKS not in proper state. GKS must be either in the state WSOP or WSAC in routine ACTIVATE_WS
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE

from gr.

IngoMeyer441 avatar IngoMeyer441 commented on August 16, 2024

with the notable exception of Julia packages that ship binaries linked against specific dependency paths that are different on NixOS.

The problem is caused by a hard-coded ELF interpreter path in the GR binaries. gksqt expects the interpreter to be located at /lib64/ld-linux-x86-64.so.2 which is not the case under NixOS. The official Julia binaries have the same problem, so for a quick and dirty fix I simply created a symlink at /lib64/ld-linux-x86-64.so.2 which was also the reason that gksqt started working.

from gr.

IngoMeyer441 avatar IngoMeyer441 commented on August 16, 2024

So the qksqt application either needs to be patched (see https://nixos.wiki/wiki/Packaging/Binaries#The_Dynamic_Loader) or GR should be installed from source. GR.jl can pick up an existing GR installation. However, I am new to NixOS. Is it possible to simple run a make install or must everything be installed with the Nix package manager?

from gr.

MikiVanousek avatar MikiVanousek commented on August 16, 2024

I am not that well versed in NixOS packaging, but I think the best/most robust way would be to use Nix to package GR, which if you know what you are doing should not be too difficult.

from gr.

IngoMeyer441 avatar IngoMeyer441 commented on August 16, 2024

I have no experience with NixOS or Nix at all. For this issue, I set up my first virtual machine with NixOS. It would be great to have a guide for this.

from gr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.