Problems compiling GLiNER.cpp

I want to run the NER examples of a promising entity extraction library here:

Config step works fine but complains about old cmake, then when compiling I get lots of “undefined reference” errors related to socket calls, and a warning about the linker.

I have not much experience porting stuff to Haiku, is it some missing adaptation, is the cmake installation just too old, or is Haiku really missing some functionality to make this library work?

~/Develop/SEN/NER/GLiNER.cpp/examples> cmake --build build --target inference -j
[  1%] Built target tokenizers_c
[  7%] Built target tokenizer_cpp_objs
[ 83%] Built target sentencepiece-static
[ 85%] Built target tokenizers_cpp
[ 96%] Built target gliner
[ 98%] Linking CXX executable inference
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: warning: /boot/system/develop/lib/crtn.o: missing .note.GNU-stack section implies executable stack
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: GLiNER.cpp/deps/tokenizers-cpp/release/libtokenizers_c.a(std-2d470cba23f40e31.std.9b903c7c25c6c255-cgu.10.rcgu.o): in function `std::net::udp::UdpSocket::set_read_timeout':
std.9b903c7c25c6c255-cgu.10:(.text._ZN3std3net3udp9UdpSocket16set_read_timeout17h4097d7ce5ec5c4dbE+0x80): undefined reference to `setsockopt'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: GLiNER.cpp/deps/tokenizers-cpp/release/libtokenizers_c.a(std-2d470cba23f40e31.std.9b903c7c25c6c255-cgu.10.rcgu.o): in function `std::net::udp::UdpSocket::set_write_timeout':
std.9b903c7c25c6c255-cgu.10:(.text._ZN3std3net3udp9UdpSocket17set_write_timeout17hcefff2e9e0dabd98E+0x80): undefined reference to `setsockopt'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: GLiNER.cpp/deps/tokenizers-cpp/release/libtokenizers_c.a(std-2d470cba23f40e31.std.9b903c7c25c6c255-cgu.10.rcgu.o): in function `std::net::udp::UdpSocket::set_broadcast':
std.9b903c7c25c6c255-cgu.10:(.text._ZN3std3net3udp9UdpSocket13set_broadcast17h9012b667688838d1E+0x23): undefined reference to `setsockopt'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: GLiNER.cpp/deps/tokenizers-cpp/release/libtokenizers_c.a(std-2d470cba23f40e31.std.9b903c7c25c6c255-cgu.10.rcgu.o): in function `std::net::udp::UdpSocket::broadcast':
std.9b903c7c25c6c255-cgu.10:(.text._ZN3std3net3udp9UdpSocket9broadcast17h31d81b857142a5abE+0x2d): undefined reference to `getsockopt'
...
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: GLiNER.cpp/deps/tokenizers-cpp/release/libtokenizers_c.a(std-2d470cba23f40e31.std.9b903c7c25c6c255-cgu.05.rcgu.o): in function `std::sys_common::net::TcpListener::take_error':
std.9b903c7c25c6c255-cgu.05:(.text._ZN3std10sys_common3net11TcpListener10take_error17hd0d1d678c420b51dE+0x2c): undefined reference to `getsockopt'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: GLiNER.cpp/deps/tokenizers-cpp/release/libtokenizers_c.a(std-2d470cba23f40e31.std.9b903c7c25c6c255-cgu.05.rcgu.o): in function `std::sys_common::net::UdpSocket::bind':
std.9b903c7c25c6c255-cgu.05:(.text._ZN3std10sys_common3net9UdpSocket4bind17h04cada127358d3dcE+0xd1): undefined reference to `bind'
...
collect2: error: ld returned 1 exit status
CMakeFiles/inference.dir/build.make:101: recipe for target 'inference' failed
make[3]: *** [inference] Error 1
CMakeFiles/Makefile2:236: recipe for target 'CMakeFiles/inference.dir/all' failed
make[2]: *** [CMakeFiles/inference.dir/all] Error 2
CMakeFiles/Makefile2:243: recipe for target 'CMakeFiles/inference.dir/rule' failed
make[1]: *** [CMakeFiles/inference.dir/rule] Error 2
Makefile:189: recipe for target 'inference' failed
make: *** [inference] Error 2

It can’t find the socket functions inside libnetwork. The quick fix is usually to configure with LDFLAGS=-lnetwork cmake .......

1 Like

Ah that makes sense, thanks for the hint, will try this out!

ok so I succeeded by tuning the cmake options in CMakeCache.txt directly and adding network and bsd libs like so:

//Flags used by the linker during all build types.
CMAKE_EXE_LINKER_FLAGS:STRING=-lnetwork -lbsd

For the example in the top level README, I set up a simple console project in Genio and configured thus:

LIBS =  be $(STDCPPLIBS) onnxruntime gliner tokenizers_cpp tokenizers_c network bsd

Now I just need to compile a Haiku version of the ONNX runtime, because the Linux version won’t run (d’oh;-), giving me an error

lib/libonnxruntime.so.1.20.1: Troubles handling dynamic section

(fair since Haiku is not binary compatible but I forgot to compile the lib myself;-)

turns out this beast is not easy to tame, ran into a persistent snag with linking and the build does not respect the -fPIC flag defined in the common cmake config:

[ 16%] Linking CXX executable flatc
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: CMakeFiles/flatc.dir/src/idl_parser.cpp.o: relocation R_X86_64_PC32 against symbol `_ZTVN11flatbuffers9AllocatorE' can not be used when making a shared object; recompile with -fPIC
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
_deps/flatbuffers-build/CMakeFiles/flatc.dir/build.make:656: recipe for target '_deps/flatbuffers-build/flatc' failed
make[2]: *** [_deps/flatbuffers-build/flatc] Error 1
CMakeFiles/Makefile2:7110: recipe for target '_deps/flatbuffers-build/CMakeFiles/flatc.dir/all' failed
make[1]: *** [_deps/flatbuffers-build/CMakeFiles/flatc.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2

Since it works for other sub modules, I opened an issue to see if it’s maybe a bug in the build after all:

For libnetwork there are multiple ways on llinking it (depending on the linking error), the one mentioned by @Lrrr , the one you mention and one using target_link_libraries as used in:

For fPIC search if POSITION_INDEPENDENT_CODE is used in one of the cmake files, you should be able to set OFF in there. Like in:

Strike that last one, I see you tried that (it’s mentioned in the upstream issue). :slight_smile:

1 Like

OK, seems that you need to hunt down POSITION_INDEPENDENT_CODE and turn it off (there are multiple files (not that much) where this is set to “ON”.
Still running into an error though:

[ 16%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatc.dir/grpc/src/compiler/swift_generator.cc.o
[ 16%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatc.dir/grpc/src/compiler/ts_generator.cc.o
[ 17%] Linking CXX executable flatc
[ 17%] Built target flatc
[ 17%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/idl_parser.cpp.o
[ 17%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/idl_gen_text.cpp.o
[ 17%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/reflection.cpp.o
[ 17%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/util.cpp.o
[ 17%] Linking CXX static library libflatbuffers.a
[ 17%] Built target flatbuffers
[ 17%] Building CXX object CMakeFiles/onnxruntime_flatbuffers.dir/Share/wip/onnxruntime/onnxruntime/core/flatbuffers/flatbuffers_utils.cc.o
[ 17%] Linking CXX static library libonnxruntime_flatbuffers.a
[ 17%] Built target onnxruntime_flatbuffers
[ 17%] Building CXX object _deps/abseil_cpp-build/absl/base/CMakeFiles/absl_log_severity.dir/log_severity.cc.o
[ 17%] Linking CXX static library libabsl_log_severity.a
[ 17%] Built target absl_log_severity
[ 17%] Building CXX object _deps/abseil_cpp-build/absl/base/CMakeFiles/absl_raw_logging_internal.dir/internal/raw_logging.cc.o
[ 17%] Linking CXX static library libabsl_raw_logging_internal.a
[ 17%] Built target absl_raw_logging_internal
[ 17%] Building CXX object _deps/abseil_cpp-build/absl/base/CMakeFiles/absl_spinlock_wait.dir/internal/spinlock_wait.cc.o
[ 17%] Linking CXX static library libabsl_spinlock_wait.a
[ 17%] Built target absl_spinlock_wait
[ 17%] Building CXX object _deps/abseil_cpp-build/absl/base/CMakeFiles/absl_base.dir/internal/cycleclock.cc.o
[ 17%] Building CXX object _deps/abseil_cpp-build/absl/base/CMakeFiles/absl_base.dir/internal/spinlock.cc.o
[ 17%] Building CXX object _deps/abseil_cpp-build/absl/base/CMakeFiles/absl_base.dir/internal/sysinfo.cc.o
/Share/wip/onnxruntime/build/Linux/Debug/_deps/abseil_cpp-src/absl/base/internal/sysinfo.cc: In function 'pid_t absl::lts_20240722::base_internal::GetTID()':
/Share/wip/onnxruntime/build/Linux/Debug/_deps/abseil_cpp-src/absl/base/internal/sysinfo.cc:470:10: error: invalid 'static_cast' from type 'pthread_t' {aka '_pthread_thread*'} to type 'pid_t' {aka 'int'}
  470 |   return static_cast<pid_t>(pthread_self());
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Share/wip/onnxruntime/build/Linux/Debug/_deps/abseil_cpp-src/absl/base/internal/sysinfo.h:28,
                 from /Share/wip/onnxruntime/build/Linux/Debug/_deps/abseil_cpp-src/absl/base/internal/sysinfo.cc:15:
/boot/system/develop/headers/posix/sys/types.h:61:17: note: class type '_pthread_thread' is incomplete
   61 | typedef struct  _pthread_thread         *pthread_t;
      |                 ^~~~~~~~~~~~~~~
_deps/abseil_cpp-build/absl/base/CMakeFiles/absl_base.dir/build.make:106: recipe for target '_deps/abseil_cpp-build/absl/base/CMakeFiles/absl_base.dir/internal/sysinfo.cc.o' failed
make[2]: *** [_deps/abseil_cpp-build/absl/base/CMakeFiles/absl_base.dir/internal/sysinfo.cc.o] Error 1
CMakeFiles/Makefile2:3423: recipe for target '_deps/abseil_cpp-build/absl/base/CMakeFiles/absl_base.dir/all' failed
make[1]: *** [_deps/abseil_cpp-build/absl/base/CMakeFiles/absl_base.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):

ok so you have to turn it OFF instead of ON, strange but better for performance from the comments.

I found an issue for the error you get but couldn’t yet find a way around it - even using the other method from the native client branch doesn’t work since the sizes are different (4 vs 8 bytes), so the assertion fails (and ignoing it didn’t help, either;-)

Hint on the error could be found at haikuports:

For fPIC, I found it a bit strange too, maybe our cmake does some strange things with it?

I also created a seperate package to install for ONNX library, this helps out a bit (I think) :rofl:

At the moment +50% done in building onnxruntime.

Bitten by this, can’t let go :rofl:

PS, a few links of interest from Fedora:

https://src.fedoraproject.org/rpms/onnx/tree/rawhide
https://src.fedoraproject.org/rpms/onnxruntime/tree/rawhide

1 Like

hmmm that didn’t work for me since it doesn’t know the function find_thread
You mean you’ve created an ONNX library hpkg?

Keeping my fingers crossed and waiting for your success announcement then :wink:

All code is compiled with PIC by default on Haiku, that’s why you were getting the build error in the first place.

It’s also set in the global cmake options for POSIX systems, but the compiler error was very misleading since it actually told me to turn this option on and compile with -fPIC …

It’s in OS.h I think, there is a patch for that in the linked one. :slight_smile:

Uploaded 64bit packages at: HaikuTestDrive/onnx at master - Begasus/HaikuTestDrive - Codeberg.org (not sure how functional it is, but build went pretty fine).

1 Like

That’s awesome, thanks @Begasus !
So what’s ProjectX? :wink:
There’s a clash with the versions, so I cannot install the debuginfo package, I think it’s just the version 1.17.0 (onnx) vs. 1.17.0-1 (debuginfo):

problem 1: nothing provides projectx==1.17.0 needed by onnx_debuginfo-1.17.0-1

However, with the new native version I get linker errors again, it can’t find a symbol that should be there (GetOrtApiBase):

~/Develop/SEN/NER/sen-extractor> make clean && make
rm -rf "objects.x86_64-cc13-release"
mkdir -p objects.x86_64-cc13-release; \
mkdepend  -I./  -Iinclude -p .cpp:objects.x86_64-cc13-release/%n.o -m -f "objects.x86_64-cc13-release/App.d" App.cpp
g++ -c App.cpp -iquote./  -iquote./  -iquoteinclude  -isystemsys  -O3   -fPIC -std=c++17 -o "objects.x86_64-cc13-release/App.o"
cc -o "sen-extractor"   objects.x86_64-cc13-release/App.o  -Xlinker -soname=_APP_  -L./  -Llib    -lbe  -lstdc++  -lsupc++  -lnetwork  -lbsd  -lgliner  -lonnx  -lonnx_proto  -ltokenizers_cpp  -ltokenizers_c 
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: warning: /boot/system/develop/lib/crtn.o: missing .note.GNU-stack section implies executable stack
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: objects.x86_64-cc13-release/App.o: in function `_GLOBAL__sub_I_App.cpp':
App.cpp:(.text.startup+0x525): undefined reference to `OrtGetApiBase'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: lib/libgliner.a(model.cpp.o): in function `_GLOBAL__sub_I_model.cpp':
model.cpp:(.text.startup+0x15): undefined reference to `OrtGetApiBase'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: lib/libgliner.a(decoder.cpp.o): in function `_GLOBAL__sub_I_decoder.cpp':
decoder.cpp:(.text.startup+0x15): undefined reference to `OrtGetApiBase'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: lib/libgliner.a(processor.cpp.o): in function `_GLOBAL__sub_I_processor.cpp':
processor.cpp:(.text.startup+0x15): undefined reference to `OrtGetApiBase'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: lib/libgliner.a(tokenizer_utils.cpp.o): in function `_GLOBAL__sub_I_tokenizer_utils.cpp':
tokenizer_utils.cpp:(.text.startup+0x15): undefined reference to `OrtGetApiBase'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.3.0/../../../../x86_64-unknown-haiku/bin/ld: lib/libgliner.a(gliner_structs.cpp.o):gliner_structs.cpp:(.text.startup+0x15): more undefined references to `OrtGetApiBase' follow
collect2: error: ld returned 1 exit status
/boot/system/develop/etc/makefile-engine:240: recipe for target 'sen-extractor' failed
make: *** [sen-extractor] Error 1

It’s not included in the library:

objdump -t /boot/system/lib/libonnx.so | grep OrtGetApiBase
<empty>

Same with libs from the devel package, also tried libonnx_proto.

Didn’t finetune the recipe :smiley: my bad, was in a hurry to try it out I guess, will do so in a bit.

Other then that, missing one werror somewhere :confused:

/Share/wip/onnxruntime-1.17.3/build/_deps/neural_speed-src/bestla/bestla_parallel.h: In instantiation of 'class bestla::parallel::gemm::SchedulerBase<bestla::gemm::ICoreRowNAvxvnniKBlock<24, 2> >':
/Share/wip/onnxruntime-1.17.3/build/_deps/neural_speed-src/bestla/bestla_parallel.h:476:7:   required from 'class bestla::parallel::gemm::SchedulerKBlockS<bestla::gemm::ICoreRowNAvxvnniKBlock<24, 2> >'
/Share/wip/onnxruntime-1.17.3/build/_deps/neural_speed-src/bestla/bestla_parallel.h:657:14:   required from 'void bestla::parallel::GemmRun(Launch_T&, const typename Launch_T::Param&, IThreading*) [with Parallel_T = gemm::SchedulerKBlockS<bestla::gemm::ICoreRowNAvxvnniKBlock<24, 2> >; Launch_T = bestla::wrapper::gemm::LauncherIntKBlock<BTLA_ISA::AVX_VNNI, bestla::gemm::ICoreRowNAvxvnniKBlock<24, 2>, bestla::prologue_a::gemm::ActivationF32KBlockQuantize, bestla::prologue_b::gemm::WeightKBlockNInteger, bestla::epilogue::gemm::AccumulatorWriteBackFp32>; typename Launch_T::Param = bestla::wrapper::gemm::LauncherIntKBlock<BTLA_ISA::AVX_VNNI, bestla::gemm::ICoreRowNAvxvnniKBlock<24, 2>, bestla::prologue_a::gemm::ActivationF32KBlockQuantize, bestla::prologue_b::gemm::WeightKBlockNInteger, bestla::epilogue::gemm::AccumulatorWriteBackFp32>::Param]'
/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/quantization/neural_speed_gemm.cc:98:30:   required from 'void bestla::NSSQ4GemmCompInt8(size_t, size_t, size_t, const float*, size_t, storage::gemm::StorageWeightKBlockNInteger*, float*, size_t, int8_t*, parallel::IThreading*) [with GemmCore_T = gemm::ICoreRowNAvxvnniKBlock<24, 2>; size_t = long unsigned int; int8_t = signed char]'
/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/quantization/neural_speed_gemm.cc:183:64:   required from here
/Share/wip/onnxruntime-1.17.3/build/_deps/neural_speed-src/bestla/bestla_parallel.h:66:16: error: 'virtual void bestla::parallel::Scheduler2D::update(const bestla::parallel::Config2D&)' was hidden [-Werror=overloaded-virtual=]
   66 |   virtual void update(const Config2D& config) {
      |                ^~~~~~
/Share/wip/onnxruntime-1.17.3/build/_deps/neural_speed-src/bestla/bestla_parallel.h:151:16: note:   by 'void bestla::parallel::gemm::SchedulerBase<_GemmCore_T>::update(const bestla::parallel::gemm::Config&) [with _GemmCore_T = bestla::gemm::ICoreRowNAvxvnniKBlock<24, 2>]'
  151 |   virtual void update(const Config& config) {
      |                ^~~~~~
/Share/wip/onnxruntime-1.17.3/build/_deps/neural_speed-src/bestla/bestla_parallel.h:49:16: error: 'virtual void bestla::parallel::Scheduler2D::getIndex(ThreadProblem&) const' was hidden [-Werror=overloaded-virtual=]
   49 |   virtual void getIndex(ThreadProblem& problem) const {
      |                ^~~~~~~~
/Share/wip/onnxruntime-1.17.3/build/_deps/neural_speed-src/bestla/bestla_parallel.h:142:16: note:   by 'void bestla::parallel::gemm::SchedulerBase<_GemmCore_T>::getIndex(ThreadProblem&) [with _GemmCore_T = bestla::gemm::ICoreRowNAvxvnniKBlock<24, 2>; ThreadProblem = bestla::parallel::gemm::ThreadProblemBase]'
  142 |   virtual void getIndex(ThreadProblem& problem) {
      |                ^~~~~~~~
[ 95%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/quantization/qlinear_activations.cc.o
[ 95%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/quantization/qlinear_binary_op.cc.o
[ 95%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/quantization/qlinear_concat.cc.o
[ 95%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/quantization/qlinear_global_average_pool.cc.o
[ 95%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/quantization/qlinear_lookup_table.cc.o
[ 95%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/quantization/qlinear_pool.cc.o
[ 96%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/quantization/qlinear_softmax.cc.o
[ 96%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/quantization/qlinear_where.cc.o
[ 96%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/quantization/quant_gemm.cc.o
[ 96%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/sample.cc.o
[ 96%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/skip_layer_norm.cc.o
[ 96%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/tensor/shrunken_gather.cc.o
[ 96%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/tokenizer.cc.o
[ 96%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/transformers/beam_search.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/transformers/beam_search_parameters.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/transformers/beam_search_scorer.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/transformers/dump_tensor.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/transformers/generation_device_helper.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/transformers/greedy_search.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/transformers/greedy_search_parameters.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/transformers/logits_processor.cc.o
cc1plus: all warnings being treated as errors
CMakeFiles/onnxruntime_providers.dir/build.make:2234: recipe for target 'CMakeFiles/onnxruntime_providers.dir/Share/wip/onnxruntime-1.17.3/onnxruntime/contrib_ops/cpu/quantization/neural_speed_gemm.cc.o' failed

Updated the packages for onnx, could you try again?

1 Like

Thanks, just downloaded the latest ones (if you could make a real Haiku pkg repo that would be awesome:).
Sadly, getting the same result, symbol is not found, also not with objdump:(

If you don’t want to wait for my test runs, you can check yourself by trying to compile any of the examples in the GLiNER package…

grepped the source for onnx, can’t find the symbol in there either?

Did you include all the artifacts generated, including the libonnx_runtime?