Yggdrasil icon indicating copy to clipboard operation
Yggdrasil copied to clipboard

add OpenVDB

Open Crghilardi opened this issue 3 years ago • 3 comments

This PR adds a build_tarballs.jl for the OpenVDB library.

working on x86_64-linux-gnu, not sure if this is going to work on musl due to pthreads things?

Crghilardi avatar Jan 25 '22 00:01 Crghilardi

Musl platforms are failing with

[00:56:28] ccache /opt/bin/x86_64-linux-musl-libgfortran4-cxx11/x86_64-linux-musl-g++ --sysroot=/opt/x86_64-linux-musl/x86_64-linux-musl/sys-root/  -O3 -DNDEBUG   CMakeFiles/vdb_print.dir/openvdb_print.cc.o  -o vdb_print  -Wl,-rpath,/workspace/srcdir/openvdb-8.2.0/build/openvdb/openvdb:/usr/local/lib:/workspace/destdir/lib: ../libopenvdb.so.8.2.0 /opt/x86_64-linux-musl/x86_64-linux-musl/sys-root/usr/local/lib/libjemalloc.so /opt/x86_64-linux-musl/x86_64-linux-musl/sys-root/usr/local/lib/libtbb.so /opt/x86_64-linux-musl/x86_64-linux-musl/sys-root/usr/local/lib/libblosc.so /opt/x86_64-linux-musl/x86_64-linux-musl/sys-root/usr/local/lib/libz.so /workspace/destdir/lib/libboost_iostreams.so.1.76.0 /workspace/destdir/lib/libboost_system.so.1.76.0 
[00:56:29] /opt/x86_64-linux-musl/x86_64-linux-musl/sys-root/usr/local/lib/libtbb.so: undefined reference to `getcontext'
[00:56:29] /opt/x86_64-linux-musl/x86_64-linux-musl/sys-root/usr/local/lib/libtbb.so: undefined reference to `swapcontext'
[00:56:29] /opt/x86_64-linux-musl/x86_64-linux-musl/sys-root/usr/local/lib/libtbb.so: undefined reference to `makecontext'
[00:56:29] collect2: error: ld returned 1 exit status
[00:56:29] make[2]: *** [openvdb/openvdb/cmd/CMakeFiles/vdb_print.dir/build.make:111: openvdb/openvdb/cmd/vdb_print] Error 1

Quoting from https://wiki.musl-libc.org/open-issues.html#ucontext.h (popped up also in https://github.com/JuliaPackaging/Yggdrasil/pull/1694#issuecomment-698052349)

Legacy functions operating on ucontext_t (getcontext, setcontext, makecontext, swapcontext) are not implemented. They are no longer part of POSIX, but cooperative multi-tasking applications use them. ucontext_t also appears as an argument to sigaction handlers which cannot be used portably.

I don't think there is anything we can do for these platforms (unless someone wants to patch upstream to completely avoid these functions). This means oneTBB is really unusable with Musl.

giordano avatar Jan 25 '22 01:01 giordano

Oh, wait: https://github.com/oneapi-src/oneTBB/pull/748

giordano avatar Jan 25 '22 01:01 giordano

Oh cool, I guess this will need to wait for the next release of oneTBB.

One thing I am not clear on is how it's picking Jemalloc vs TBBalloc? According to the top level CMake but I tried compiling without oneTBB and it errored out on me.

Crghilardi avatar Jan 25 '22 01:01 Crghilardi