IceSL NixOS

258 views
Skip to first unread message

Ryan Hitcho

unread,
May 7, 2024, 1:15:12 PM5/7/24
to IceSL
Hoping someone here has some experience running IceSL on NixOS.

I have not found a derivation that works from nixpkgs for IceSL 2.5.3-beta5.


```
{ stdenv
, lib
, fetchzip
, freeglut
, libXmu
, libXi
, libX11
, libICE
, libGLU
, libGL
, libSM
, libXext
, glibc
, lua
, glfw
, luabind
, libgccjit
, dialog
, openssl
, makeWrapper
}:

let
  lpath = lib.makeLibraryPath [ libXmu libXi libX11 freeglut libICE libGLU libGL libSM libXext glibc lua glfw luabind libgccjit openssl ];
in

stdenv.mkDerivation rec {
  pname = "IceSL";
  version = "2.5.3-beta5";

  src =  if stdenv.hostPlatform.system == "x86_64-linux" then fetchzip {
    url = "https://icesl.loria.fr/assets/other/download.php?build=${version}&version=beta&os=amd64";
    sha256 = "sha256-db4qj7hg0UnrlCnWAijvMWMgncUWPacnip3jdKU6Vl4=";
    extension = "zip";
  } else if stdenv.hostPlatform.system == "i686-linux" then fetchzip {
    url = "https://icesl.loria.fr/assets/other/download.php?build=${version}&version=beta&os=i386";
    sha256 = "";
    extension = "zip";
  } else throw "Unsupported architecture";

  buildInputs = [ makeWrapper ];
  installPhase = ''
    cp -r ./ $out
    #rm $out/bin/*.so
    mkdir $out/oldbin
    cp $out/bin/liblua.so $out/oldbin/liblua.so
    cp $out/bin/libluabind.so $out/oldbin/libluabind.so
    mv $out/bin/IceSL-slicer $out/oldbin/IceSL-slicer
    runHook postInstall
  '';

  postInstall = ''
    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
      --set-rpath "${lpath}" \
      $out/oldbin/IceSL-slicer
    makeWrapper $out/oldbin/IceSL-slicer $out/bin/icesl --prefix PATH : ${dialog}/bin
  '';

  meta = with lib; {
    description = "IceSL is a GPU-accelerated procedural modeler and slicer for 3D printing.";
    homepage = http://shapeforge.loria.fr/icesl/index.html;
    license = licenses.inria-icesl;
    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
    platforms = [ "i686-linux" "x86_64-linux" ];
    maintainers = with maintainers; [ mgttlinger ];
  };
}
```
I get the error:
/nix/store/...-IceSL-2.5.3-beta5/oldbin/IceSL-slicer: error while loading shared libraries: libluabind.so: can not open shared object file: No such file or directory

I see the files liblua.so and libluabind.so live in the /bin directory alongside IceSL-slicer.
I kept these libraries in /bin with the program. I suppose they need to be in the path existing somwhere in the nix/store. Not sure how to get these libraries in there, or which packages may contain them.

I thought maybe lua and luabind packages would contain these libraries.

Sorry for this. Hoping to get some help as I use IceSL as my primary slicer.





icesl.nix

Re-try WhenDown

unread,
May 7, 2024, 2:28:55 PM5/7/24
to IceSL
Hi Ryan. I believe I know what is happening but I need to take a closer look at what you're doing. This week I am currently out of the office working on something else so I can't answer right away.

Very quickly; I see that you're setting the 'rpath' to something else. Can you append to it the path to where liblua.so and libluabind.so are?

Salim

Le 7 mai 2024 à 19:15, Ryan Hitcho <ryan....@gmail.com> a écrit :

Hoping someone here has some experience running IceSL on NixOS.
--
You received this message because you are subscribed to the Google Groups "IceSL" group.
To unsubscribe from this group and stop receiving emails from it, send an email to icesl+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/icesl/2026c2c9-6912-4390-b546-f96d5a9797fbn%40googlegroups.com.
<icesl.nix>

Ryan Hitcho

unread,
May 7, 2024, 3:01:16 PM5/7/24
to IceSL
Thank you Salim.

I will try your suggestion.

Ryan Hitcho

unread,
May 8, 2024, 1:32:22 PM5/8/24
to IceSL
It is now working thank goodness!
adding the location of liblua.so and libluabind.so to the rpath was the first step, and worked so thank you.
Then I had the darndest time linking libstdc++.so.6 to path while avoiding a shell script.
I tried many packages containing libstdc++.so.6, and nothing.

Finally gcc-unwrapped was the package I needed containing libstdc++.so.6.

Here is the derivation I edited to get things going, for anyone out there who needs it.

Complete and utter novice here. Once I figure out how to contribute to nixpkgs I will share this beyond here.
icesl.nix

Ryan Hitcho

unread,
Oct 31, 2024, 1:57:18 PM10/31/24
to IceSL
Updated / Upgraded(downgraded) to a more stable gpu driver for an Nvidia Quadro RTX 4000.
Switching to linux kernal 6.6.8 in the process.

Needed to get IceSL on my system once more. Now I get this error when I start the application.
"
 → ./result/bin/icesl                                                                                                              ▂▄▆█▆▄▂
( IceSL 'Jan 17 2024 17:35:05')
IceSL is highly experimental software.   =====>>> USE AT YOUR OWN RISK <<<=====
We strongly recommend that you visually check the produced G-code, and that you
supervise the printing process to avoid any damage to the printing nozzle due
to improper z-levels or improper positioning of the printing mechanism.

[Localization] language used "en"
GLFW error: The GLFW library is not initialized
GLFW error: The GLFW library is not initialized
GLFW error: The GLFW library is not initialized
GLFW error: The GLFW library is not initialized
GLFW error: The GLFW library is not initialized
GLFW error: The GLFW library is not initialized
GLFW error: The GLFW library is not initialized
GLFW error: The GLFW library is not initialized
GLFW error: The GLFW library is not initialized
GLFW error: The GLFW library is not initialized
OpenGL version: 0.1907647568
Core profile: true
Forward compatibility: false
[lua]
Warning: The use of Firmware Retraction requires a non-zero retract value.
Retraction commands may not be produced.
Found printer ARES_RED_CUSTOM
Found infiller CircleGrid
Found infiller Jigsaw
Found infiller Gyroid
Found infiller Honeycomb
Found infiller Voro2D
Found infiller TriangleGrid
Found infiller SimpleRectilinear
Found infiller SquareGrid

Cannot find printer Ultimaker2 -- check IceSL install ; maybe this is a custom printer whose files are missing?

[onSelectedPrinterChanged] selected printer is ARES_RED_CUSTOM
Found infiller CircleGrid
Found infiller Jigsaw
Found infiller Gyroid
Found infiller Honeycomb
Found infiller Voro2D
Found infiller TriangleGrid
Found infiller SimpleRectilinear
Found infiller SquareGrid
[Application] loading local (en) descriptions
[Application] (en) descriptions loaded successfully
[Application] loading remote (en) descriptions
gluX - loading extension GL_ARB_shader_objects (triggered by glCreateProgramObjectARB)
zsh: segmentation fault (core dumped)  ./result/bin/icesl
 ◉ magoose@hellfire:~/.dotfiles/user/app/icesl
"
The OpenGL version looks odd to say the least.
Previosly GLFW version 3.2 was on my system and now I am using 3.4.
I am also running Wayland.

Is there any information I can provide you that will be of use?

No one is actively maintaining the IceSL NixOS package. Once a specific url no longer pointed to 2.4.1, they sort of stopped dead in their tracks. 

Any help is appreciated.

Sincerely,
Ryan

Re-try WhenDown

unread,
Nov 6, 2024, 7:42:57 AM11/6/24
to IceSL
Hi Ryan.

It seems your driver is not capable of creating an OpenGL 4.3 context. Could you please post the output of the command ‘glxinfo’?

Thank you

Le 31 oct. 2024 à 18:57, Ryan Hitcho <ryan....@gmail.com> a écrit :

Updated / Upgraded(downgraded) to a more stable gpu driver for an Nvidia Quadro RTX 4000.

Ryan Hitcho

unread,
Nov 7, 2024, 8:01:59 AM11/7/24
to IceSL
Hello Salim,

Thank you in advance for replying and your willingness to help.
Do you want the full output of 'glxinfo' is that useful to you?
Or can this be truncated in some way?

Ryan Hitcho

unread,
Nov 7, 2024, 8:06:50 AM11/7/24
to IceSL
→ glxinfo -B                                                                                                                                                       ▂▄▆█▆▄▂
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 8192 MB
    Total available memory: 8192 MB
    Currently available dedicated video memory: 6667 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Quadro RTX 4000/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 535.154.05
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 535.154.05
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 535.154.05
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Re-try WhenDown

unread,
Nov 7, 2024, 8:17:50 AM11/7/24
to IceSL
Could you please check if you have more than one version of GLFW installed in your machine? If so, uninstall all except the most recent one.

Le 7 nov. 2024 à 14:06, Ryan Hitcho <ryan....@gmail.com> a écrit :

→ glxinfo -B                                                                                                                                                       ▂▄▆█▆▄▂

Ryan Hitcho

unread,
Nov 8, 2024, 9:46:11 AM11/8/24
to IceSL
I removed all versions in case of conflict.

Managing to override the glfw version for the icesl package from nixpkgs-unstable works. 
It now requests glfw3 from nixpkgs-unstable. glfw v3.4

It renders like this, with the cursor position being correct for the windowed or fullscreen size, but not aligning with the GUI.

20241108_09h15m33s_grim.png

Oh well. I will look further into how I can get this working.

Thank you Salim

Re-try WhenDown

unread,
Nov 8, 2024, 10:23:25 AM11/8/24
to IceSL
Hey Ryan. I am in the process of releasing a beta version that statically compiles GLFW , among another fuck ton of new features, including curved slicing.

I will tell you when it’s up. Hopefully today but no promises as unfortunately I am under lots of back pain and soon I will call it quits for today. 

Salim

Le 8 nov. 2024 à 15:46, Ryan Hitcho <ryan....@gmail.com> a écrit :

I removed all versions in case of conflict.

Managing to override the glfw version for the icesl package from nixpkgs-unstable works. 
It now requests glfw3 from nixpkgs-unstable. glfw v3.4

It renders like this, with the cursor position being correct for the windowed or fullscreen size, but not aligning with the GUI.

Ryan Hitcho

unread,
Nov 8, 2024, 10:33:29 AM11/8/24
to IceSL
Salim!

This is fantastic news! Very excited for this.
I appreciate what you do.

Hope you feel better. By all means your health first of course!!

You have made my day with this bit of info.

T Turner

unread,
Nov 8, 2024, 10:45:53 AM11/8/24
to IceSL
I agree on both accounts, take care of yourself. I'm certainly excited by a version I can run on Wayland as IceSL is by far my favorite slicer.

Re-try WhenDown

unread,
Nov 8, 2024, 11:02:00 AM11/8/24
to IceSL
No problem my friend. This job is actually fun, most of the time. I hate testing, CI and the never ending job of documenting, but then who does!?

In any case, it’s up now. 2.5.4-beta1.

Changelog is here:

I’m heading back and if this still fails in your machine, let me know and tomorrow I will have a look in my not-so-powerful personal linux box.

Y’all have an exciting weekend.

Salim

Le 8 nov. 2024 à 16:33, Ryan Hitcho <ryan....@gmail.com> a écrit :

Salim!

Ryan Hitcho

unread,
Nov 8, 2024, 11:24:04 AM11/8/24
to IceSL
Hazzah! Yes, thank you!!
Enjoy your weekend as well, thank you.

@Tim I second that notion of favorite slicer.

T Turner

unread,
Nov 8, 2024, 12:19:07 PM11/8/24
to IceSL
Confirmed working on Wayland! Thank you for taking time to release it even though you aren't feeling well. I'm running CachyOS which is bleeding edge Arch Linux based so I'm guessing it should work everywhere.

Ryan Hitcho

unread,
Nov 8, 2024, 1:02:55 PM11/8/24
to IceSL
Works here too! Thank you Salim. Thank you, thank you.

Now I have to get my plugins updated to use v.13 of icesl-interface instead of v.10

nixos 24.11
linux kernel 6.6.58
hyprland and wayland
nvidia quadro rtx 4000 535.216.01

Re-try WhenDown

unread,
Nov 8, 2024, 2:33:23 PM11/8/24
to IceSL
Hey, you guys now are making me blush. Thanks for the kind words.

A video on how to use curved slicing should be coming very soon. I’ll disseminate it through this list once it’s up.

Many slicers are rushing to have non planar layers and IceSL is no difference. We will be thorough and try to best tell you the strengths and weaknesses of our approach.

It’s still very experimental but we gotta start somewhere. Of course, feedback will be much appreciated.

Enjoy your Friday!

Le 8 nov. 2024 à 19:02, Ryan Hitcho <ryan....@gmail.com> a écrit :

Works here too! Thank you Salim. Thank you, thank you.
Reply all
Reply to author
Forward
0 new messages