Skip to content

sys-devel/DPC++: Update to nightly 2026.06.18#1402

Open
Emimendoza wants to merge 2 commits into
gentoo:masterfrom
Emimendoza:master
Open

sys-devel/DPC++: Update to nightly 2026.06.18#1402
Emimendoza wants to merge 2 commits into
gentoo:masterfrom
Emimendoza:master

Conversation

@Emimendoza

@Emimendoza Emimendoza commented Jun 20, 2026

Copy link
Copy Markdown

Rationale of changes when compared to previous ebuilds.

Why nightly and not latest official release (6.3.0*)?

Originally I was trying to port the latest official release but DPC++ is very tightly coupled to level-zero, so it would either involve requiring an old version of level-zero installed, or adding slotted level-zeros, or bundling level-zero. This option seemed the least painful.

*: the proprietary compiler follows the yyyy.mm.dd versioning format but their open source releases follow major.minor.patch format; its weird

Why require such a weird version of spirv-headers which can (currently) only be satisfied by the live version?

This commit bumps the required spirv-header version to one that is newer than the latest tag on the spirv-headers github. Khronos tags spirv-headers based off of releases to the vulkan sdk and that's what gentoo uses for their package versions. So as it currently stands, only the live version of the headers contain the required spirv extensions but the next vulkan sdk release will most probably have them; this way there won't be a need to update this ebuild when the time comes.

What's with dev-cpp/parallel-hashmap requirement?

It is required to build the sycl toolchain, fortunately guru contains a compatible version.

What's with bundled emhash, unified-memory-framework and no longer bundling unified-runtime?

Unified-Runtime got upstreamed to intel/llvm so it is compiled with DPC++ in this ebuild, however, it relies on unified-memory-framework which is not upstreamed into intel/llvm. UMF could probably be unbundled but I havent come accross a project that uses UMF but not UR. Emhash is required to compile DPC++ but no ebuilds exist for it in any overlay (that I could find).

Why did you remove the esimd_emulator USE flag?

The project has been archived by intel a while ago.

What is with the offload UR_* unused cmake arguments?

There is a unified-runtime offload backend which used to build with this ebuild (nightly version 2026-08-07 and before) but upstream changed the installation path of liboffload.so and the offload backend no longer compiles. This isn't an issue unique to this ebuild, they broke their own github CI jobs doing so and have decided to simply disable them instead of addressing the breaking commit. I left most of the ebuild intact so that it should be as simple as adding ";offload" to LLVM_ENABLE_RUNTIMES and setting UR_BUILD_ADAPTER_OFFLOAD to ON and uncommenting the "cmake_build runtimes/install" line in src_compile() once the issue is fixed or someone feels like making a patch reverting the commit.

Why are you compiling the LLVM toolchain as static?

We need to compile llvm as a static library because otherwise libsycl.so crashes at runtime because it dlopen's the intel graphics compiler dynlib which pulls in its own llvm dynlib. If it weren't for that it also might crash because something is pulling in vulkan and mesa's vulkan implementation also pulls in its slotted llvm dynlib. This is the path of least resistance. For context, intel's official binary debian packages statically link the llvm components to intel graphics compiler. We don't do that in the igc ebuild (which is in the main gentoo repo).

What is this DPC++-6.3.0-zstd.patch?

The sycl project ignores the LLVM_USE_STATIC_ZSTD cmake variable and will unconditionally try to link to static zstd, which might not exist. The version comes from me originally porting 6.3.0 (please see first item in this PR for clarification) and I decided to keep the name since it is the latest stable release which requires such patch, this way if future nightly ebuilds are released, they wont all require their own versions of this patch and this makes more sense than to have them all use the same patch but just have a random nightly version as the version name in the patch.

@Emimendoza

Copy link
Copy Markdown
Author

I also have an updated oneDPL ebuild but since it depends on this, I have decided not to include it in this PR until I get feedback on this PR/this PR gets merged. I also didn't want to touch the package.mask entry of these packages to keep the PR as single issue as possible.

@APN-Pucky

Copy link
Copy Markdown
Member

Hi, first of thanks for looking into this! However the verbosity of the PR description is very LLM-suspicious. Just in case you did not know here is gentoo's AI policy https://wiki.gentoo.org/wiki/Project:Council/AI_policy.

@Emimendoza

Emimendoza commented Jun 20, 2026

Copy link
Copy Markdown
Author

@APN-Pucky Sorry about the verbosity, no AI was used in this PR nor on the description. I am just a very verbose person (example). I have been personally using this modified ebuild for a month now and upstream intel/llvm kept changing things that made me run into issues which slowly lead to the accumulation of the changes in this PR. I just wanted to explain basically everything that makes it different from the existing ebuilds to avoid a lengthy back and forth. Last time I contributed to an open source project (funnily enough it was LLVM), I spent like a week in the PR review process over trivial things and just wanted to reduce the friction as much as possible.

@APN-Pucky

Copy link
Copy Markdown
Member

Thanks! No problem and being verbose is good. I will review and test it coming week.

Comment thread sys-devel/DPC++/DPC++-2026.06.18.ebuild Outdated
Comment thread sys-devel/DPC++/DPC++-2026.06.18.ebuild Outdated
Comment on lines +195 to +196
# Install all other files into the same temporary directory
cmake_build install

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

not sure, just checking: Shouldn't this go into src_install?

@Emimendoza Emimendoza Jun 24, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This part was inherited from the original ebuilds. I believe this command was originally here because there are parts of the llvm project that werent compiled by the deploy-sycl-toolchain target (such as other runtimes like the OpenMP runtime), so this command ended up compiling everything else since everything is a dependency of the install target. I believe you are right that it should belong on src_install so I replaced this line with cmake_src_compile so that it finishes compiling in the src_compile function and moved the cmake_build install to be the first line of the src_install function. Please resolve if you think this solution is good.

Comment thread sys-devel/DPC++/DPC++-2026.06.18.ebuild Outdated
@Emimendoza Emimendoza requested a review from APN-Pucky June 24, 2026 02:06
@APN-Pucky

Copy link
Copy Markdown
Member

Thanks. I tried to fetch it but noticed that your commits do not have a sign-off line (See https://devmanual.gentoo.org/general-concepts/copyright-policy/index.html). You can squash the two commits and add it (git commit --signoff or manually append it to the commit message)

@APN-Pucky

APN-Pucky commented Jun 24, 2026

Copy link
Copy Markdown
Member

@Emimendoza

$ pkgcheck scan --commits
sys-devel/DPC++
  DoubleEmptyLine: version 2026.06.18: ebuild has unneeded empty line on lines: 68, 88
  ExcessiveLineLength: version 2026.06.18: excessive line length (over 120 characters) on line: 43
  NonexistentDeps: version 2026.06.18: DEPEND: nonexistent package: >=dev-cpp/parallel-hashmap-1.3.12
  NonexistentDeps: version 2026.06.18: RDEPEND: nonexistent package: >=dev-cpp/parallel-hashmap-1.3.12

::sci does not have parallel-hashmap. it is only in ::guru. adding @Nowa-Ammerlaan : should we duplicate it in ::sci or move it from ::guru to ::gentoo?

@APN-Pucky

Copy link
Copy Markdown
Member

Given you need very recent spirv-headers I don't think indirectly depending on the latest 9999 version is correct here. Since this ebuild will not support ~amd64 keywording then as it's dependencies do not.

@Emimendoza

Copy link
Copy Markdown
Author

Since this ebuild will not support ~amd64 keywording then as it's dependencies do not.

Maybe the best would be to have this ebuild be ** keyworded and can be brought to ~amd64 keywording at the next release of the vulkan sdk? Its also a random nightly build so maybe ** keywording is the most appropriate anyways.

@Emimendoza

Copy link
Copy Markdown
Author

Squashed and signed off as requested

Comment thread sys-devel/DPC++/DPC++-2026.06.18.ebuild Outdated
@APN-Pucky

APN-Pucky commented Jun 24, 2026

Copy link
Copy Markdown
Member
...
-- Will fetch emhash from https://github.com/ktprime/emhash
-- Performing Test CXX_HAS_FCF_PROTECTION_FULL
-- Performing Test CXX_HAS_FCF_PROTECTION_FULL - Success
-- Performing Test CXX_HAS_FSTACK_CLASH_PROTECTION
-- Performing Test CXX_HAS_FSTACK_CLASH_PROTECTION - Success
-- Performing Test USING_LIBSTDCXX
-- Performing Test USING_LIBSTDCXX - Success
-- Checking for module 'level-zero>=1.29.0'
--   Package dependency requirement 'level-zero >= 1.29.0' could not be satisfied.
Package 'level-zero' has version '1.28.6', required version is '>= 1.29.0'
-- Level Zero Adapter: Download Level Zero loader and headers from github.com
-- Level Zero Adapter: Will fetch Level Zero Loader from https://github.com/oneapi-src/level-zero.git
[1/9] Creating directories for 'level-zero-loader-populate'
[1/9] Performing download step (git clone) for 'level-zero-loader-populate'
Cloning into 'level-zero-loader-src'...
fatal: unable to access 'https://github.com/oneapi-src/level-zero.git/': Could not resolve host: github.com (Could not contact DNS servers)
Cloning into 'level-zero-loader-src'...
fatal: unable to access 'https://github.com/oneapi-src/level-zero.git/': Could not resolve host: github.com (Could not contact DNS servers)
Cloning into 'level-zero-loader-src'...
fatal: unable to access 'https://github.com/oneapi-src/level-zero.git/': Could not resolve host: github.com (Could not contact DNS servers)
Had to git clone more than once: 3 times.
CMake Error at level-zero-loader-subbuild/level-zero-loader-populate-prefix/tmp/level-zero-loader-populate-gitclone.cmake:50 (message):
  Failed to clone repository: 'https://github.com/oneapi-src/level-zero.git'


FAILED: [code=1] level-zero-loader-populate-prefix/src/level-zero-loader-populate-stamp/level-zero-loader-populate-download /var/tmp/portage/sys-devel/DPC++-2026.06.18/work/llvm-nightly-2026-06-18/build/_deps/level-zero-loader-subbuild/level-zero-loader-populate-prefix/src/level-zero-loader-populate-stamp/level-zero-loader-populate-download 
cd /var/tmp/portage/sys-devel/DPC++-2026.06.18/work/llvm-nightly-2026-06-18/build/_deps && /usr/bin/cmake -DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE -P /var/tmp/portage/sys-devel/DPC++-2026.06.18/work/llvm-nightly-2026-06-18/build/_deps/level-zero-loader-subbuild/level-zero-loader-populate-prefix/tmp/level-zero-loader-populate-gitclone.cmake && /usr/bin/cmake -E touch /var/tmp/portage/sys-devel/DPC++-2026.06.18/work/llvm-nightly-2026-06-18/build/_deps/level-zero-loader-subbuild/level-zero-loader-populate-prefix/src/level-zero-loader-populate-stamp/level-zero-loader-populate-download
ninja: build stopped: subcommand failed.

CMake Error at /usr/share/cmake/Modules/FetchContent.cmake:1931 (message):
  Build step for level-zero-loader failed: 1
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FetchContent.cmake:1622 (__FetchContent_populateSubbuild)
  /usr/share/cmake/Modules/FetchContent.cmake:2158:EVAL:2 (__FetchContent_doPopulation)
  /usr/share/cmake/Modules/FetchContent.cmake:2158 (cmake_language)
  /usr/share/cmake/Modules/FetchContent.cmake:2399 (__FetchContent_Populate)
  /var/tmp/portage/sys-devel/DPC++-2026.06.18/work/llvm-nightly-2026-06-18/unified-runtime/cmake/FetchLevelZero.cmake:76 (FetchContent_MakeAvailable)
  /var/tmp/portage/sys-devel/DPC++-2026.06.18/work/llvm-nightly-2026-06-18/unified-runtime/source/common/CMakeLists.txt:6 (include)
  ...
  
  [ERROR] >>> atom: =sys-devel/DPC++-2026.06.18::science, USE flags: '-cuda -hip -llvm_targets_AArch64 -llvm_targets_AMDGPU -llvm_targets_ARM -llvm_targets_AVR -llvm_targets_BPF -llvm_targets_Hexagon -llvm_targets_Lanai -llvm_targets_MSP430 -llvm_targets_Mips -llvm_targets_NVPTX -llvm_targets_PowerPC -llvm_targets_RISCV -llvm_targets_Sparc -llvm_targets_SystemZ -llvm_targets_WebAssembly -llvm_targets_X86 -llvm_targets_XCore'

something fails for me. I am running in the supposed network-sandbox so it can not Fetch anything from the network.

@Emimendoza

Emimendoza commented Jun 24, 2026

Copy link
Copy Markdown
Author

Do you not have level-zero installed? It is a requirement. The build system will try to fetch any of the requirements that aren't installed which is annoying. Edit: Wait nvm I see that it requires a newer version of level-zero than the amd64 keyworded one.

Signed-off-by: Emilio M <emendoz@clemson.edu>
@Emimendoza

Copy link
Copy Markdown
Author

Now it should pull in the correct level-zero version

Co-authored-by: Alexander Puck Neuwirth <APN-Pucky@users.noreply.github.com>
@APN-Pucky

Copy link
Copy Markdown
Member

It pulled/instealled dev-libs/level-zero-1.30.0 now first, but then similar, but different:

-- Fetching sparse source level_zero/include from https://github.com/intel/compute-runtime.git 26.18.38308.1
hint: Using 'master' as the name for the initial branch. This default branch name
hint: will change to "main" in Git 3.0. To configure the initial branch name
hint: to use in all of your new repositories, which will suppress this warning,
hint: call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
hint:
hint: Disable this message with "git config set advice.defaultBranchName false"
Initialized empty Git repository in /var/tmp/portage/sys-devel/DPC++-2026.06.18/work/llvm-nightly-2026-06-18/build/content-exp-headers/.git/
Switched to a new branch 'main'
fatal: unable to access 'https://github.com/intel/compute-runtime.git/': Could not resolve host: github.com (Could not contact DNS servers)
error: pathspec '26.18.38308.1' did not match any file(s) known to git
CMake Warning (dev) at /usr/share/cmake/Modules/FetchContent.cmake:1966 (message):
  Calling FetchContent_Populate(exp-headers) is deprecated, call
  FetchContent_MakeAvailable(exp-headers) instead.  Policy CMP0169 can be set
  to OLD to allow FetchContent_Populate(exp-headers) to be called directly
  for now, but the ability to call it with declared details will be removed
  completely in a future version.
Call Stack (most recent call first):
  /var/tmp/portage/sys-devel/DPC++-2026.06.18/work/llvm-nightly-2026-06-18/unified-runtime/cmake/FetchLevelZero.cmake:139 (FetchContent_Populate)
  /var/tmp/portage/sys-devel/DPC++-2026.06.18/work/llvm-nightly-2026-06-18/unified-runtime/source/common/CMakeLists.txt:6 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at /usr/share/cmake/Modules/ExternalProject/shared_internal_commands.cmake:1308 (message):
  No download info given for 'exp-headers-populate' and its source directory:

   /var/tmp/portage/sys-devel/DPC++-2026.06.18/work/llvm-nightly-2026-06-18/build/content-exp-headers/level_zero/include

  is not an existing non-empty directory.  Please specify one of:

   * SOURCE_DIR with an existing non-empty directory
   * DOWNLOAD_COMMAND
   * URL
   * GIT_REPOSITORY
   * SVN_REPOSITORY
   * HG_REPOSITORY
   * CVS_REPOSITORY and CVS_MODULE
Call Stack (most recent call first):
  /usr/share/cmake/Modules/ExternalProject.cmake:3258 (_ep_add_download_command)
  CMakeLists.txt:22 (ExternalProject_Add)


-- Configuring incomplete, errors occurred!

CMake Error at /usr/share/cmake/Modules/FetchContent.cmake:1919 (message):
  CMake step for exp-headers failed: 1
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FetchContent.cmake:1622 (__FetchContent_populateSubbuild)
  /usr/share/cmake/Modules/FetchContent.cmake:2158:EVAL:2 (__FetchContent_doPopulation)
  /usr/share/cmake/Modules/FetchContent.cmake:2158 (cmake_language)
  /usr/share/cmake/Modules/FetchContent.cmake:1991:EVAL:1 (__FetchContent_Populate)
  /usr/share/cmake/Modules/FetchContent.cmake:1991 (cmake_language)
  /var/tmp/portage/sys-devel/DPC++-2026.06.18/work/llvm-nightly-2026-06-18/unified-runtime/cmake/FetchLevelZero.cmake:139 (FetchContent_Populate)
  /var/tmp/portage/sys-devel/DPC++-2026.06.18/work/llvm-nightly-2026-06-18/unified-runtime/source/common/CMakeLists.txt:6 (include)


-- Configuring incomplete, errors occurred!

[ERROR] >>> atom: =sys-devel/DPC++-2026.06.18::science, USE flags: '-cuda -hip -llvm_targets_AArch64 -llvm_targets_AMDGPU -llvm_targets_ARM -llvm_targets_AVR -llvm_targets_BPF -llvm_targets_Hexagon -llvm_targets_Lanai -llvm_targets_MSP430 -llvm_targets_Mips -llvm_targets_NVPTX -llvm_targets_PowerPC -llvm_targets_RISCV -llvm_targets_Sparc -llvm_targets_SystemZ -llvm_targets_WebAssembly -llvm_targets_X86 -llvm_targets_XCore'

@APN-Pucky

APN-Pucky commented Jun 24, 2026

Copy link
Copy Markdown
Member

@Emimendoza you can check it yourself by setting (some of) the following features for test installing the ebuild:

$ FEATURES="network-sandbox preserve-libs sandbox test userpriv usersandbox" emerge/ebuild  sys-devel/DPC++

@Nowa-Ammerlaan

Copy link
Copy Markdown
Member

I vaguely remember bumping into that same problem before, could be a merged-usr/split-usr thing where it does not find the libraries it is looking for.

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.

3 participants