This might be a long story, so please bear with me.
I recently acquired an Anycubic Photon Mono 4K printer (as a Christmas present to myself). The printer itself is fine. The slicing software packaged with the machine is Windows-only, so I researched some Linux-compatible alternatives (LycheeSlicer and Chitubox). These were easy to install. LycheeSlicer was an AppImage, while Chitubox was a simple tar.gz file, both of which I copied to /opt. The LycheeSlicer error is shown in the attached PNG. Both packages require libm.so.6 from GLIBC_2.29. The version that ships with RL8 is from GLIBC_2.28.
The following posts
and
explain that GLIBC_2.29 (or higher) canât be installed into /lib64 or it needs to be installed separately AWAY from /lib64. This was borne out by a brief email exchange with infrastructure@rockylinux.org.
OK. So, I downloaded and installed glibc-2.29 and glibc-2.36 (the current stable version) into separate directories under /opt. Again, this was pretty easy.
Now, I reckoned that, on the command line, the easiest way to run either LycheeSlicer or Chitubox would be with:
LD_LIBRARY_PATH=/opt/glibc-2.36/lib /opt/LycheeSlicer
Still no joy.
After some trial-and-error, I eventually got LycheeSlicer working in the most horrible and kludgy way. The solution was to change the libm.so.6 symlink under /lib64 to point to the newer version under /opt.
root@kuu# pwd
/lib64
root@kuu# ls -l libm.* libm-2*
-rwxr-xr-x. 1 root root 1599024 Sep 27 17:36 libm-2.28.so
-rw-r--r--. 1 root root 141 Sep 27 17:25 libm.so
lrwxrwxrwx. 1 root root 12 Jan 1 17:42 libm.so.6 -> libm-2.28.so
root@kuu#
root@kuu# rm libm.so.6
root@kuu# ln -s /opt/glibc-2.36/lib/libm.so.6 libm.so.6
root@kuu# ls -l libm.* libm-2*
-rwxr-xr-x. 1 root root 1599024 Sep 27 17:36 libm-2.28.so
-rw-r--r--. 1 root root 141 Sep 27 17:25 libm.so
lrwxrwxrwx. 1 root root 12 Jan 1 17:42 libm.so.6 -> /opt/glibc-2.36/lib/libm.so.6
root@kuu#
With these changes in place, LycheeSlicer worked. Cool! As a test, I reversed the symlink changes and LycheeSlicer crashed again. So it seems the only way to get LycheeSlicer working is to change the symlink for /lib64/libm.so.6 . This is a Bad Thing.
Other searches suggested using ldd on the executables:
97 colin@kuu> ldd /opt/CHITUBOX/CHITUBOX
/opt/CHITUBOX/CHITUBOX: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by /opt/CHITUBOX/CHITUBOX)
linux-vdso.so.1 (0x00007ffdc3347000)
libQt5Svg.so.5 => /lib64/libQt5Svg.so.5 (0x00007f72219c7000)
libQt5Widgets.so.5 => /lib64/libQt5Widgets.so.5 (0x00007f72210f1000)
libQt5Quick.so.5 => /lib64/libQt5Quick.so.5 (0x00007f722095d000)
libQt5X11Extras.so.5 => /lib64/libQt5X11Extras.so.5 (0x00007f7220758000)
libQt5Gui.so.5 => /lib64/libQt5Gui.so.5 (0x00007f721ff5f000)
libQt5Qml.so.5 => /lib64/libQt5Qml.so.5 (0x00007f721f8aa000)
libQt5Network.so.5 => /lib64/libQt5Network.so.5 (0x00007f721f4de000)
libQt5Xml.so.5 => /lib64/libQt5Xml.so.5 (0x00007f721f29a000)
libQt5Core.so.5 => /lib64/libQt5Core.so.5 (0x00007f721eb07000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f721e8e7000)
libX11.so.6 => /lib64/libX11.so.6 (0x00007f721e5a4000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f721e20f000)
libm.so.6 => /lib64/libm.so.6 (0x00007f721de8d000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f721dc75000)
libc.so.6 => /lib64/libc.so.6 (0x00007f721d8af000)
libGL.so.1 => /lib64/libGL.so.1 (0x00007f721d629000)
libz.so.1 => /lib64/libz.so.1 (0x00007f721d411000)
libQt5QmlModels.so.5 => /lib64/libQt5QmlModels.so.5 (0x00007f721d187000)
libpng16.so.16 => /lib64/libpng16.so.16 (0x00007f721cf52000)
libharfbuzz.so.0 => /lib64/libharfbuzz.so.0 (0x00007f721ccad000)
librt.so.1 => /lib64/librt.so.1 (0x00007f721caa5000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f721c8a1000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f721c64c000)
libssl.so.1.1 => /lib64/libssl.so.1.1 (0x00007f721c3b8000)
libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x00007f721becf000)
libsystemd.so.0 => /lib64/libsystemd.so.0 (0x00007f721bb84000)
libicui18n.so.60 => /lib64/libicui18n.so.60 (0x00007f721b6c2000)
libicuuc.so.60 => /lib64/libicuuc.so.60 (0x00007f721b2ff000)
libicudata.so.60 => /lib64/libicudata.so.60 (0x00007f7219755000)
libpcre2-16.so.0 => /lib64/libpcre2-16.so.0 (0x00007f72194dc000)
libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x00007f72192da000)
libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f7218fc1000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7221c23000)
libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f7218d98000)
libGLX.so.0 => /lib64/libGLX.so.0 (0x00007f7218b66000)
libXext.so.6 => /lib64/libXext.so.6 (0x00007f7218953000)
libGLdispatch.so.0 => /lib64/libGLdispatch.so.0 (0x00007f721869d000)
libfreetype.so.6 => /lib64/libfreetype.so.6 (0x00007f72183e1000)
libgraphite2.so.3 => /lib64/libgraphite2.so.3 (0x00007f72181b5000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f7217ecb000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f7217cb4000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f7217ab0000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f721789f000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f721769b000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f7217483000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f721725c000)
liblz4.so.1 => /lib64/liblz4.so.1 (0x00007f721703f000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007f7216e37000)
libmount.so.1 => /lib64/libmount.so.1 (0x00007f7216bdd000)
libgcrypt.so.20 => /lib64/libgcrypt.so.20 (0x00007f72168bf000)
libgnutls.so.30 => /lib64/libgnutls.so.30 (0x00007f72164ce000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f721625d000)
libXau.so.6 => /lib64/libXau.so.6 (0x00007f7216059000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f7215e48000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f7215c1d000)
libblkid.so.1 => /lib64/libblkid.so.1 (0x00007f72159ca000)
libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f72157c2000)
libgpg-error.so.0 => /lib64/libgpg-error.so.0 (0x00007f72155a1000)
libp11-kit.so.0 => /lib64/libp11-kit.so.0 (0x00007f7215277000)
libidn2.so.0 => /lib64/libidn2.so.0 (0x00007f7215059000)
libunistring.so.2 => /lib64/libunistring.so.2 (0x00007f7214cd8000)
libtasn1.so.6 => /lib64/libtasn1.so.6 (0x00007f7214ac5000)
libnettle.so.6 => /lib64/libnettle.so.6 (0x00007f721488b000)
libhogweed.so.4 => /lib64/libhogweed.so.4 (0x00007f721465b000)
libgmp.so.10 => /lib64/libgmp.so.10 (0x00007f72143c3000)
libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007f721413f000)
libffi.so.6 => /lib64/libffi.so.6 (0x00007f7213f36000)
98 colin@kuu> ldd /opt/LycheeSlicer-5.0.0.AppImage
not a dynamic executable
99 colin@kuu>
99 colin@kuu> LD_LIBRARY_PATH=/opt/glibc-2.36/lib /opt/CHITUBOX/CHITUBOX
Segmentation fault (core dumped)
100 colin@kuu>
The Chitubox output suggests /lib64/libm.so.6 is âhardwiredâ into the executable and canât be overridden with LD_LIBRARY_PATH. I admit I donât understand the LycheeSlicer output.
I have a few questions, none of which are to do with the printing.
- Why didnât /opt/LycheeSlicer pick up LD_LIBRARY_PATH on the command line and use that instead of /lib64 ? Have I missed some basic command line syntax that will enforce LD_LIBRARY_PATH ?
- What might be the consequences of leaving the /lib64/libm.so.6 symlink pointing to /opt/glibc-2.36/lib/libm.so.6 when using other software and/or running a âdnf updateâ command (which I do every quarter)?
- Should I be considering upgrading to RL9 instead?
Iâm at a loss. I can continue with the kludgy workaround for now but would really like to find a more elegant solution.
Does the Community have any suggestions?
Best Regards,
Colin