As with Fedora, I used a separate repository for ONNX:
From repology:
So the ONNX doesn’t include onnxruntime.
As with Fedora, I used a separate repository for ONNX:
From repology:
So the ONNX doesn’t include onnxruntime.
onnxruntime fails with werror at the end: Problems compiling GLiNER.cpp - #16 by Begasus
Ah I see, thought that was fixed since you released the packages. For now we could ignore this warning and set it so as to not fail the build.
Mind you, I’m not the developer, only a packager that warning/error has been bugging me for hours (me and my hacking skills)
Hey of course, thanks a lot for helping me out here. I’ll see if I can replicate your build success on my local machine and silence these warnings…
With onnx/onnx_devel installed I used cmake (like in the link from Fedora) with the patch for flatbuffers from Fedora, than ran (if I get this right, rebooted a few times in between)
~> cmake -Bbuild -Scmake -DONNX_USE_LITE_PROTO=OFF -DONNX_USE_PROTOBUF_SHARED_LIBS=ON -DCMAKE_SKIP_RPATH:BOOL=ON -Donnxruntime_BUILD_UNIT_TESTS=OFF -Donnxruntime_DISABLE_ML_OPS=ON -DONNX_WERROR=OFF
and make -j8 -Cbuild
EDIT, pushed flatbuffers to latest release earlier this morning for this.
New packages for the ONNX libraries (not onnxruntime) been uploaded, ONNXTargets.cmake had hardcoded “include” path in there.
Got onnxruntime build/packaged with static libraries, but not being found yet by GLINER.cpp.
WIP
Regarding -fPIC: theereason the cmake macro doesn’t work is because cmake tries to use -fPIE when building executables. This would normally be the right thing to do, but in Haiku it doesn’t work because execuable can also be loaded as add-ons (to support replicants, mainly). So, -fPIC is needed instead of -fPIE. The code will be position independant in either case.
-fPIC is enabled by default in our compiler, but passing the -fPIE option overrides it. The compiler message is correct, but the naming of the options and cmake settings can be a bit confusing in this case.
We should patch gcc so that -fPIE does the same thing as -fPIC, or fix other things so that -fPIE works (without the possibility to use your program as a replicant, then)
Thanks a lot for the explanation, I was really curious and confused.
Patching gcc would be great, but a newer cmake version would be fine too, to silence these uncomforting warnings…
Giving it a brake for a bit
PR for ONNX is up at: onnx, new recipe by Begasus · Pull Request #11434 · haikuports/haikuports · GitHub
Dirty recipe/patch for onnxruntime at: onnx, add wip onnxruntime recipe/patch · 21cf6839f6 - Begasus/haikuports - Codeberg.org
got a curious warning from the linker now:
bin/ld: warning: /boot/system/develop/lib/crtn.o: missing .note.GNU-stack section implies executable stack
Will give this another look over the weekend and would really appreciate your support:)