Skip to content

Conversation

th0ma7
Copy link
Contributor

@th0ma7 th0ma7 commented Oct 15, 2025

Description

Add native spirv + native DEPENDS fixes

Fixes #

Checklist

  • Build rule all-supported completed successfully
  • New installation of package completed successfully
  • Package upgrade completed successfully (Manually install the package again)
  • Package functionality was tested
  • Any needed documentation is updated/created

Type of change

  • Bug fix
  • New Package
  • Package update
  • Includes small framework changes
  • This change requires a documentation update (e.g. Wiki)

@th0ma7 th0ma7 self-assigned this Oct 15, 2025
@th0ma7
Copy link
Contributor Author

th0ma7 commented Oct 15, 2025

@hgy59 can you generate and publish an updated llvm package online? New version will now provide llvm-spirv which is essential if I later want to include vulkan acceleration.

Also, there's a few changes to the framework - I haven't found any regression, it actually solves the dependency management from native which wasn't working, but it could also impact build elsewhere... testing on-going on my end, your help would be appreciated before pushing this one in.

@hgy59
Copy link
Contributor

hgy59 commented Oct 15, 2025

@hgy59 can you generate and publish an updated llvm package online? New version will now provide llvm-spirv which is essential if I later want to include vulkan acceleration.

Got it, but can we update to a newer revision (like v14.0.6 .. v14.0.16)? This would prevent an overwrite of the already prebuilt v14.0.5.

@th0ma7
Copy link
Contributor Author

th0ma7 commented Oct 15, 2025

Nope, at least not yet. I have to stick with the officially supported version(s). I hope to be able to migrate to llvm 15-16+ once I've figured out all the loose ends, but until then no.

Also, this really can supplement the existing, or worst, changing the tar method to add a date to it? Yyyy-Qx or similar.

@hgy59
Copy link
Contributor

hgy59 commented Oct 15, 2025

Also, this really can supplement the existing, or worst, changing the tar method to add a date to it? Yyyy-Qx or similar.

I could create an xz instead of a tar.gz archive to avoid overwriting existing release.

@hgy59
Copy link
Contributor

hgy59 commented Oct 15, 2025

@th0ma7 I guess the ninja build path is wrong (in the MSG output only):

-- Build files have been written to: /spksrc/native/llvm-14.0-build/work-native/llvm.build
===>  Compiling for llvm
===>  - Ninja compile
===>  - Ninja build path = /spksrc/native/llvm-14.0-build/work-native/llvm-project-14.0.5.src//spksrc/native/llvm-14.0-build/work-native/llvm.build

@hgy59
Copy link
Contributor

hgy59 commented Oct 15, 2025

@th0ma7 another hint (seems to not find the already built SPIRV-Tools)

end of ===> Configuring for llvm

-- LLD version: 14.0.5
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1")
-- Using SPIR-V Headers from
          /spksrc/native/llvm-14.0-build/work-native/install/usr/local
-- Checking for one of the modules 'SPIRV-Tools'
-- SPIRV-Tools not found; project will be built without --spirv-tools-dis support.
-- Registering Bye as a pass plugin (static build: OFF)
-- Configuring done
-- Generating done

@hgy59
Copy link
Contributor

hgy59 commented Oct 15, 2025

@th0ma7 it is built and available as https://github.com/SynoCommunity/spksrc/releases/download/native%2Fllvm/native-llvm-14.0.5.txz

but AFAICS it is lacking clang-tblgen, ...

@hgy59
Copy link
Contributor

hgy59 commented Oct 15, 2025

@th0ma7 BTW the build of native packages still does not create build*.log files.

@th0ma7
Copy link
Contributor Author

th0ma7 commented Oct 15, 2025

I guess the ninja build path is wrong (in the MSG output only):

-- Build files have been written to: /spksrc/native/llvm-14.0-build/work-native/llvm.build
===>  Compiling for llvm
===>  - Ninja compile
===>  - Ninja build path = /spksrc/native/llvm-14.0-build/work-native/llvm-project-14.0.5.src//spksrc/native/llvm-14.0-build/work-native/llvm.build

@hgy59 your guess is good... and I am able to reproduce locally:

spksrc@spksrc:~/vulkan-videodrv/spksrc/native/llvm-14.0-build$ grep 'Ninja build path' build.out 
===>  - Ninja build path = /home/spksrc/vulkan-videodrv/spksrc/native/llvm-14.0-build/work-native/SPIRV-Headers-vulkan-sdk-1.4.328.1//home/spksrc/vulkan-videodrv/spksrc/native/llvm-14.0-build/work-native/SPIRV-Headers-vulkan-sdk-1.4.328.1/build
===>  - Ninja build path = /home/spksrc/vulkan-videodrv/spksrc/native/llvm-14.0-build/work-native/SPIRV-Tools-2025.4//home/spksrc/vulkan-videodrv/spksrc/native/llvm-14.0-build/work-native/SPIRV-Tools-2025.4/build
===>  - Ninja build path = /home/spksrc/vulkan-videodrv/spksrc/native/llvm-14.0-build/work-native/llvm-project-14.0.5.src//home/spksrc/vulkan-videodrv/spksrc/native/llvm-14.0-build/work-native/llvm.build

As for the tools: clang-tblgen, llvm-config, llvm-link, llvm-spirv, llvm-tblgen, opt:

spksrc@spksrc:~/vulkan-videodrv/spksrc/native/llvm-14.0-build/work-native/install/usr/local/bin$ ll clang-tblgen llvm-config llvm-link llvm-spirv llvm-tblgen opt
ls: cannot access 'clang-tblgen': No such file or directory
-rwxr-xr-x 1 spksrc spksrc  264432 Oct 15 11:56 llvm-config
-rwxr-xr-x 1 spksrc spksrc   91240 Oct 15 12:03 llvm-link
-rwxr-xr-x 1 spksrc spksrc 6333456 Oct 15 12:04 llvm-spirv
-rwxr-xr-x 1 spksrc spksrc 4243848 Oct 15 11:53 llvm-tblgen
-rwxr-xr-x 1 spksrc spksrc  383128 Oct 15 12:04 opt

I thought I had nailed them all, including clang-tblgen using -DCLANG_INSTALL_TABLEGEN=ON but seems that last one is still missing.

BTW the build of native packages still does not create build*.log files.

I know, it hurts, I'm so much used to have them everywhere else... Let me add that while this isn't fully backed yet. And thnx for testing (there may be another round later :)

@th0ma7
Copy link
Contributor Author

th0ma7 commented Oct 16, 2025

@hgy59 I think I've addressed all cases from above... logging isn't yet like I want it but the method used is sooooo much simpler than current... I'll work it out a bit more to get to the level I want it to be.

Give it a shot and let me know if you'd like a few adjustments or having any ideas... I'll bring those back to cross|spk ..

@hgy59
Copy link
Contributor

hgy59 commented Oct 16, 2025

@th0ma7 updated version with sha256:22e11a29783e6fcc09343d9d8de724492f547d45be761fe17715e6bc86bb9843 uploaded (same url).

@th0ma7
Copy link
Contributor Author

th0ma7 commented Oct 18, 2025

@mreid-tt and @hgy59 i was able to do a major simplification of our main call-up scripts to always use native|cross-cc.mk which will greatly help maintenance in the future.

I still have cross-go to complete, otherwise the remaining would be ready for another round of testing so any remaining issue can be fixed.

If you have a moment to shake bugs up on this pr would be much appreciated.

@hgy59
Copy link
Contributor

hgy59 commented Oct 18, 2025

@th0ma7 didn't you plan to update native/llvm-14.0 with the updated prebuild that includes spriv?

@th0ma7
Copy link
Contributor Author

th0ma7 commented Oct 18, 2025

@hgy59 yes, but as soon i push this in it will initiate long builds... Thus trying to reduce useless builds while i can.

@hgy59
Copy link
Contributor

hgy59 commented Oct 19, 2025

@th0ma7 Found this issue when building synocli-videodriver:

  1. make arch-x64-6.2.4

    • the package was created
    • the work folder is wrong (work-native instead of work-x64-6.2.4)
    • the log file is correct (build-x64-6.2.4.log)
  2. make arch-x64-7.1

    • the package was created, but with the same content as the x64-6.2.4 package (except DSM 7 uninstall wizard)
    • it uses work-native as work folder too and has nothing to compile
    • the log file (build-x64-7.1,log) was not created

The github build action would not have an issue with this, so it is mandatory to run tests locally.

Comment on lines 24 to +31
ifndef WORK_DIR
ifndef ARCH_SUFFIX
WORK_DIR := $(CURDIR)/work-native
else
WORK_DIR := $(CURDIR)/work$(ARCH_SUFFIX)
endif
export WORK_DIR
endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems the breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants