Skip to content

Update lib3mf_linux64.so and lib3mf_rpi.so to lib3mf f6a9bb36 - #86

Merged
alexanderoster merged 1 commit into
alexanderoster:developfrom
krixkrix:update-lib3mf-linux-rpi
Oct 23, 2026
Merged

alexanderoster merged 1 commit into
alexanderoster:developfrom
krixkrix:update-lib3mf-linux-rpi

Conversation

@krixkrix

Copy link
Copy Markdown

Problem: linux64 and rpi shared libraries for lib3mf are outdated.
This PR provides new binaries. Description below on exactly how these were produced.


Commits b0c3b07 and 945d402 updated the lib3mf headers in Libraries/lib3mf/ and the lib3mf_win64.dll artifact, but not the linux64 and rpi shared libraries. The headers load 837 lib3mf_* functions. The old .so files (built from 5c58ceb2) export only 810 of them and lack the 27 new toolpath functions such as lib3mf_model_getbuildtoolpath and lib3mf_toolpath_gettoolpathtype. On Linux, amc_server therefore failed at startup in
CToolpathHandler::setLibraryPath with COULDNOTFINDLIBRARYEXPORT, whichever plugin was configured.

Both libraries are rebuilt from lib3mf f6a9bb3606f91b8e13d4207b3d0d6e9799bfac5c (branch toolpath_squashed, "Added Profile Value checks", 2026-09-29). That is a ref whose Autogenerated/Bindings/CppDynamic files match the vendored headers exactly, and the ref the current win64 dll was built from: the dll contains a toolpath profile error string first added in f6a9bb36.

_githash_lib3mf.txt (the win64 dll) said 8a6f9824, the parent of 5c58ceb2, but the dll was built from f6a9bb36 as shown above. All three githash*lib3mf.txt files now name f6a9bb36.

Build: a debian:bookworm-slim container with build-essential, cmake and crossbuild-essential-arm64 installed. linux64 uses native gcc 12.2.0 and rpi is cross-compiled with aarch64-linux-gnu-gcc 12.2.0. Commands:

cmake -DCMAKE_BUILD_TYPE=Release -DLIB3MF_TESTS=OFF <lib3mf source>
cmake --build . --target lib3mf

For rpi, the first command also gets:

-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=aarch64
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++

Everything else uses lib3mf defaults: bundled zlib/libzip, stripped, and libstdc++ linked dynamically. Both libraries need at most GLIBC 2.36 and GLIBCXX 3.4.29. The previous linux64 build needed GLIBC 2.38, so the new one also runs on Debian 12. The NEEDED libraries and the SONAME (lib3mf.so.2) are unchanged.

Commits b0c3b07 and 945d402 updated the lib3mf headers in
Libraries/lib3mf/ and the lib3mf_win64.dll artifact, but not the
linux64 and rpi shared libraries. The headers load 837 lib3mf_*
functions. The old .so files (built from 5c58ceb2) export only 810 of
them and lack the 27 new toolpath functions such as
lib3mf_model_getbuildtoolpath and lib3mf_toolpath_gettoolpathtype. On
Linux, amc_server therefore failed at startup in
CToolpathHandler::setLibraryPath with COULDNOTFINDLIBRARYEXPORT,
whichever plugin was configured.

Both libraries are rebuilt from lib3mf f6a9bb3606f91b8e13d4207b3d0d6e9799bfac5c
(branch toolpath_squashed, "Added Profile Value checks", 2026-09-29).
That is a ref whose Autogenerated/Bindings/CppDynamic files match the
vendored headers exactly, and the ref the current win64 dll was built
from: the dll contains a toolpath profile error string first added in
f6a9bb36.

_githash_lib3mf.txt (the win64 dll) said 8a6f9824, the parent of
5c58ceb2, but the dll was built from f6a9bb36 as shown above. All three
_githash_*lib3mf.txt files now name f6a9bb36.

Build: a debian:bookworm-slim container with build-essential, cmake and
crossbuild-essential-arm64 installed. linux64 uses native gcc 12.2.0 and
rpi is cross-compiled with aarch64-linux-gnu-gcc 12.2.0. Commands:

    cmake -DCMAKE_BUILD_TYPE=Release -DLIB3MF_TESTS=OFF <lib3mf source>
    cmake --build . --target lib3mf

For rpi, the first command also gets:

    -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=aarch64
    -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc
    -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++

Everything else uses lib3mf defaults: bundled zlib/libzip, stripped,
and libstdc++ linked dynamically. Both libraries need at most GLIBC
2.36 and GLIBCXX 3.4.29. The previous linux64 build needed GLIBC 2.38,
so the new one also runs on Debian 12. The NEEDED libraries and the
SONAME (lib3mf.so.2) are unchanged.

Verification: nm -D shows 837 of 837 referenced exports in both
libraries, including all 810 old exports. The linux64 build dlopens and
reports version 2.4.0, and amc_server starts with it. The rpi build was
not run, because the build host has no arm64 emulation.
@krixkrix
krixkrix force-pushed the update-lib3mf-linux-rpi branch from 281b061 to 074ae44 Compare October 22, 2026 07:56
@alexanderoster
alexanderoster merged commit f6ff5ec into alexanderoster:develop Oct 23, 2026
2 checks passed
@krixkrix
krixkrix deleted the update-lib3mf-linux-rpi branch October 23, 2026 19:50
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

Successfully merging this pull request may close these issues.

2 participants