discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

problems compiling current master branch due to missing lib3mf_objects

JD
John David
Fri, Apr 25, 2025 1:35 AM

While trying to build from source using the following commands:

   cd /openscad \
&& sudo git submodule update --init --recursive \
&& source scripts/setenv-unibuild.sh qt5 \
&& ./scripts/uni-get-dependencies.sh \
&& ./scripts/uni-build-dependencies.sh \
&& ./scripts/check-dependencies.sh \
&& cmake -B build -DEXPERIMENTAL=1 -DUSE_BUILTIN_OPENCSG=1 \
&& cmake --build build -j$(nproc) \
&& sudo cmake --install build --prefix /usr/local

I get a lot of errors, starting with:

/usr/bin/ld: export_3mf_v1.cc:(.text+0x614): undefined reference to
lib3mf_propertyhandler_setsinglecolorfloatrgba' /usr/bin/ld: CMakeFiles/OpenSCAD.dir/src/io/export_3mf_v1.cc.o: in function (anonymous namespace)::append_polyset(std::shared
_ptr<PolySet const> const&, (anonymous
namespace)::ExportContext&)::{lambda(int, Color4f
const&)#3}::operator()(int, Color4f c
onst&) const':
export_3mf_v1.cc:(.text+0xa2d): undefined reference to
lib3mf_basematerial_addmaterialutf8' /usr/bin/ld: CMakeFiles/OpenSCAD.dir/src/io/export_3mf_v1.cc.o: in function (anonymous namespace)::append_polyset(std::shared
_ptr<PolySet const> const&, (anonymous namespace)::ExportContext&)':
export_3mf_v1.cc:(.text+0xce6): undefined reference to
`lib3mf_object_setnameutf8'

I tracked this down to using an ancient version of lib3mf (v1.8.1), but I
was able to build 2.4.1 from source, and live got better...

If I take the time to add a dep build_lib3mf in uni-build-dependencies.sh
would that be aceptible to people?  No reason to do the work if it is not
what people want.

EBo --

While trying to build from source using the following commands: cd /openscad \ && sudo git submodule update --init --recursive \ && source scripts/setenv-unibuild.sh qt5 \ && ./scripts/uni-get-dependencies.sh \ && ./scripts/uni-build-dependencies.sh \ && ./scripts/check-dependencies.sh \ && cmake -B build -DEXPERIMENTAL=1 -DUSE_BUILTIN_OPENCSG=1 \ && cmake --build build -j$(nproc) \ && sudo cmake --install build --prefix /usr/local I get a lot of errors, starting with: /usr/bin/ld: export_3mf_v1.cc:(.text+0x614): undefined reference to `lib3mf_propertyhandler_setsinglecolorfloatrgba' /usr/bin/ld: CMakeFiles/OpenSCAD.dir/src/io/export_3mf_v1.cc.o: in function `(anonymous namespace)::append_polyset(std::shared _ptr<PolySet const> const&, (anonymous namespace)::ExportContext&)::{lambda(int, Color4f const&)#3}::operator()(int, Color4f c onst&) const': export_3mf_v1.cc:(.text+0xa2d): undefined reference to `lib3mf_basematerial_addmaterialutf8' /usr/bin/ld: CMakeFiles/OpenSCAD.dir/src/io/export_3mf_v1.cc.o: in function `(anonymous namespace)::append_polyset(std::shared _ptr<PolySet const> const&, (anonymous namespace)::ExportContext&)': export_3mf_v1.cc:(.text+0xce6): undefined reference to `lib3mf_object_setnameutf8' I tracked this down to using an ancient version of lib3mf (v1.8.1), but I was able to build 2.4.1 from source, and live got better... If I take the time to add a dep build_lib3mf in uni-build-dependencies.sh would that be aceptible to people? No reason to do the work if it is not what people want. EBo --
TP
Torsten Paul
Fri, Apr 25, 2025 9:25 AM

On 25.04.25 03:35, John David via Discuss wrote:

If I take the time to add a dep build_lib3mf in uni-build-
dependencies.sh would that be aceptible to people?  No reason to do the
work if it is not what people want.

uni-build-dependencies.sh should be the rare exception on systems
that can't satisfy the requirements.

Most (all of the recent distros?) satisfy dependencies from their
own repositories.

With lib3mf being optional, there is nothing wrong with adding it
to the build script, but I think it's not worth it.

I don't know why you get that linker error. lib3mf 1.8.1 is still
fully supported. This looks more like some linker path issue where
it does not find the library.

ciao,
Torsten.

On 25.04.25 03:35, John David via Discuss wrote: > If I take the time to add a dep build_lib3mf in uni-build- > dependencies.sh would that be aceptible to people?  No reason to do the > work if it is not what people want. uni-build-dependencies.sh should be the rare exception on systems that can't satisfy the requirements. Most (all of the recent distros?) satisfy dependencies from their own repositories. With lib3mf being optional, there is nothing wrong with adding it to the build script, but I think it's not worth it. I don't know why you get that linker error. lib3mf 1.8.1 is still fully supported. This looks more like some linker path issue where it does not find the library. ciao, Torsten.