Skip to content

Update lib3mf_linux64.so and lib3mf_rpi.so to lib3mf eaff2359 - #97

Merged
alexanderoster merged 1 commit into
alexanderoster:developfrom
krixkrix:update-lib3mf-linux-rpi-eaff2359
Nov 5, 2026
Merged

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

Conversation

@krixkrix

@krixkrix krixkrix commented Nov 4, 2026

Copy link
Copy Markdown

Summary

Same problem as #86, one lib3mf version later: f785669 / 18521dc / 67af441 / 1a16bc1 moved the lib3mf headers, lib3mf_win64.dll and _githash_lib3mf.txt to lib3mf eaff2359, but not the linux64 and rpi shared libraries. The headers now load 879 lib3mf_* functions, and the old .so files (f6a9bb36) lack 52 of them (e.g. lib3mf_toolpath_addlasersource). On Linux amc_server therefore fails at startup, whichever plugin is configured.

 Artifacts/lib3mf/
 ├── _githash_lib3mf.txt           eaff2359 (unchanged)
-├── _githash_linux64_lib3mf.txt   f6a9bb36
+├── _githash_linux64_lib3mf.txt   eaff2359
-├── _githash_rpi_lib3mf.txt       f6a9bb36
+├── _githash_rpi_lib3mf.txt       eaff2359
 ├── lib3mf_linux64.so             rebuilt from eaff2359
 └── lib3mf_rpi.so                 rebuilt from eaff2359

Source: lib3mf eaff23596f7a1d038922d4a1bf4244d8cc367495 (branch toolpath_squashed, "Toolpath Point Overrides Tests", 2026-11-03). Its Autogenerated/Bindings/CppDynamic/{lib3mf_dynamic.h, lib3mf_dynamic.hpp, lib3mf_types.hpp} are byte-identical to the vendored headers in Libraries/lib3mf/.

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

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, libstdc++ linked dynamically).

Evidence

  • Exports (nm -D --defined-only, against the 879 names in lib3mf_dynamic.hpp):
    Before: 827/879 in both .so files, 52 missing.
    After: 879/879 in both. The 10 exports that disappeared are the lib3mf_binarystream_* and lib3mf_writer_{assign,create}binarystream functions, which lib3mf removed and the headers no longer reference.
  • linux64 amc_server startup:
    Before:
    mapping lib3mf to .../core_lib3mf.so...
    Fatal initialization error: Error: GENERICEXCEPTION: Error: COULDNOTFINDLIBRARYEXPORT: a required exported symbol could not be found in the library
    
    After:
    mapping lib3mf to .../core_lib3mf.so...
    state change: init->idle
    GET / -> 200
    
    amc_unittest: 531/531. The linux64 library dlopens and lib3mf_getlibraryversion reports 2.4.0.
  • Compatibility unchanged: NEEDED libraries and SONAME (lib3mf.so.2) as before; both still need at most GLIBC 2.36 and GLIBCXX 3.4.29.
  • The rpi build was checked by its exports only, not run (no arm64 emulation on the build host).

Merge Danger

Door: two-way

Binary artifacts only; reverting restores the previous libraries.

Blast Radius: Linux/RPi

Affects every linux64 and rpi deployment, which currently cannot start at all with the new headers. Windows is untouched.

Upstream's lib3mf update (f785669, 18521dc, 67af441, 1a16bc1)
moved the headers in Libraries/lib3mf/, the lib3mf_win64.dll artifact
and _githash_lib3mf.txt to lib3mf eaff2359, but not the linux64 and
rpi shared libraries. The headers now load 879 lib3mf_* functions. The
old .so files (built from f6a9bb36) lack 52 of them, for example
lib3mf_toolpath_addlasersource and
lib3mf_reader_settoolpathlaserreferencechecks. On Linux, amc_server
therefore failed at startup with COULDNOTFINDLIBRARYEXPORT, whichever
plugin was configured.

Both libraries are rebuilt from lib3mf
eaff23596f7a1d038922d4a1bf4244d8cc367495 (branch toolpath_squashed,
"Toolpath Point Overrides Tests", 2026-11-03). Its
Autogenerated/Bindings/CppDynamic lib3mf_dynamic.h, lib3mf_dynamic.hpp
and lib3mf_types.hpp are byte-identical to the vendored headers.
_githash_linux64_lib3mf.txt and _githash_rpi_lib3mf.txt now name
eaff2359, matching _githash_lib3mf.txt.

Build: the same way as f6ff5ec, in 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 still need at most
GLIBC 2.36 and GLIBCXX 3.4.29, and the NEEDED libraries and the SONAME
(lib3mf.so.2) are unchanged.

Verification: nm -D shows 879 of 879 referenced exports in both
libraries. The 10 exports that disappeared are the lib3mf_binarystream_*
and lib3mf_writer_{assign,create}binarystream functions, which lib3mf
removed and which the new headers no longer reference. 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-eaff2359 branch from b072061 to 2b2039d Compare November 5, 2026 15:45
@alexanderoster
alexanderoster merged commit a337c4e into alexanderoster:develop Nov 5, 2026
1 check passed
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