-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cross-compile against Synology toolchain? #758
Comments
Hi @th0ma7 |
I'll give this a shot but this will extend the build duration by quite much... sigh. So guessing I'd have to build an version matching host-based IGC, then, when building cross-compiled compute-runtime adding a LD_LIBRARY_PATH to point to my host IGC so it loads proper library from there in order to build precompiled kernels? |
btw, please share log from: |
@JablonskiMateusz sure, here it is:
Now as for
But really this actually relates to a rpath for actual target installation directory (unexisting while cross-compiling), it just hapens that the debian 12 container provides most of the same libraries as well:
|
you may try to setup LD_LIBRARY_PATH pointing to the directory ( Besides, as a case-study could you share:
? |
Here is the log, i've trimmed out the dependency build and only left compute-runtime: build-x64-7.1-default.log Error being:
I had manually tried it with a
I figured, as libraries I'm loading have been linked against the synology toolchain sysroot which isn't of the same version as the host (i.e. libc and al) it may be an issue, leading to the need of building a host based IGC so libraries can be properly loaded (not tried yet). Resulting logs: build-x64-7.1-LD_LIBRARY_PATH.log
I had to add EDIT: I've re-uploaded the logs as names mentioned |
It looks like IGC_DIR is not set correctly. |
Aaahh! that fixed it! Thnx a milion! got to 100% build complete 🚀 Only issue left (AFAIK) that I noticed is the installation of EDIT: I tried using |
Sorry to further bother, I thought I had it all nailed down. Indeed intel-compute-runtime now builds succesfully (again much thnx!) - unrelated: I added a workaround to install My following question is, what's next? I built Here's the driver status:
|
do you setup DESTDIR when calling anyway, the location of etc is required by OCL loader: https://registry.khronos.org/OpenCL/sdk/3.0/docs/man/html/cl_khr_icd.html#_icd_loader_vendor_enumeration_on_linux |
please run |
I ended-up having to move
Which resulted in success 🚀 As for
The logs shows the combination of |
@th0ma7 since the issue seems to be resolved, can we close the issue? |
actually it doesn't... the DESTDIR did not solved things and I still have to manually move the |
in the log you have |
Exactly, it ends-up going into:
instead of
The output above is when testing the compilation through the
And from my logs I see:
Notice that all libraries and binaries do go under the install prefix directory... except the EDIT: All in all, using |
To add to this,
|
Output binaries are expected to follow |
Synology contraints packages to only be installed under Having a similar option (or vendordir to follow install prefix option) for intel compute runtime would be welcomed. And really this is the only thing left from this opened issue. Otherwise help received so far allowed me to build and publish a functional SynoCommunity driver package and link ffmpeg to it to achieve opencl acceleration. Feel free to close if there is no intention for implementing such option as I have my work-around that in my code at post install time. |
Sorry, I don't really understand what is expected here. OCL loader in default config is looking in |
Exactly! To further clarify, "software installation" under Synology Linux DSM are contrained to only live under their specific directory i.e. Thus it is impossible to follow the default standard under What is missing is an equivalent option in here so the intel icd file can go under |
@th0ma7 I'm looking at the code and I see there is a cmake variable that is handling that already in our code - |
indeed this works out as expected. many thnx for the support, closing! |
Background
Long-story short, I'm maintaining the ffmpeg package part of SynoCommunity. I'm trying to enable opencl within ffmpeg. Our build framework called spksrc allows cross-compiling using synology linux toolchains for various archs. In this specific case, obviously, I'm cross-compiling for x86_64 intel arch, from a debian 12 x86_64 container.
More info available at: https://github.com/SynoCommunity/spksrc
Current PR: SynoCommunity/spksrc#6166
Issue
We've been supporting VA-API since quite a while, part of current PR I was able to cross-compile sucesfully IGC. When trying to cross-compile intel-compute-runtime it ends-up strugling with:
But in reality there is no way this can work properly as it is trying to load a
target
shared library. Should I look into finding a host pre-compiledocloc
that it could use part of the build process in order to avoid this? Or any other alternatives?Much thanx in advance!
The text was updated successfully, but these errors were encountered: