Skip to content

assimp: fix build with gcc15 - #446108

Merged
Aleksanaa merged 1 commit into
NixOS:stagingfrom
ghpzin:pr-assimp-gcc15
Sep 29, 2025
Merged

Aleksanaa merged 1 commit into
NixOS:stagingfrom
ghpzin:pr-assimp-gcc15

Conversation

@ghpzin

@ghpzin ghpzin commented Sep 25, 2025

Copy link
Copy Markdown
Contributor

Fixes build failure with gcc15:

/build/source/code/AssetLib/X3D/X3DGeoHelper.cpp: In static member
function 'static void Assimp::X3DGeoHelper::coordIdx_str2lines_arr(const std::vector<int>&, std::vector<aiFace>&)':
/build/source/code/AssetLib/X3D/X3DGeoHelper.cpp:194:20: error: array
subscript -1 is outside array bounds of 'int [2305843009213693951]' [-Werror=array-bounds=]
  194 |     if (f_data.back() != (-1)) {
      |         ~~~~~~~~~~~^~
In file included from /nix/store/9jzssiinw6a2dib6k3hzd48j6ywck4iw-gcc-15.2.0/include/c++/15.2.0/x86_64-unknown-linux-gnu/bits/c++allocator.h:33,
                 from /nix/store/9jzssiinw6a2dib6k3hzd48j6ywck4iw-gcc-15.2.0/include/c++/15.2.0/bits/allocator.h:46,
                 from /nix/store/9jzssiinw6a2dib6k3hzd48j6ywck4iw-gcc-15.2.0/include/c++/15.2.0/string:45,
                 from /build/source/include/assimp/types.h:78,
                 from /build/source/code/AssetLib/X3D/X3DGeoHelper.h:6,
                 from /build/source/code/AssetLib/X3D/X3DGeoHelper.cpp:1:

Tested build with:

nix-build --expr 'with import ./. {}; assimp.override { stdenv = gcc15Stdenv; }'

Part of fixes for gcc15 update:
#440456

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. labels Sep 25, 2025
@ghpzin
ghpzin changed the base branch from master to staging September 25, 2025 17:54
@nixpkgs-ci nixpkgs-ci Bot closed this Sep 25, 2025
@nixpkgs-ci nixpkgs-ci Bot reopened this Sep 25, 2025
- add patch from merged upstream PR:
https://www.github.com/assimp/assimp/pull/6283

Fixes build failure with gcc15:
```
/build/source/code/AssetLib/X3D/X3DGeoHelper.cpp: In static member
function 'static void Assimp::X3DGeoHelper::coordIdx_str2lines_arr(const std::vector<int>&, std::vector<aiFace>&)':
/build/source/code/AssetLib/X3D/X3DGeoHelper.cpp:194:20: error: array
subscript -1 is outside array bounds of 'int [2305843009213693951]' [-Werror=array-bounds=]
  194 |     if (f_data.back() != (-1)) {
      |         ~~~~~~~~~~~^~
In file included from /nix/store/9jzssiinw6a2dib6k3hzd48j6ywck4iw-gcc-15.2.0/include/c++/15.2.0/x86_64-unknown-linux-gnu/bits/c++allocator.h:33,
                 from /nix/store/9jzssiinw6a2dib6k3hzd48j6ywck4iw-gcc-15.2.0/include/c++/15.2.0/bits/allocator.h:46,
                 from /nix/store/9jzssiinw6a2dib6k3hzd48j6ywck4iw-gcc-15.2.0/include/c++/15.2.0/string:45,
                 from /build/source/include/assimp/types.h:78,
                 from /build/source/code/AssetLib/X3D/X3DGeoHelper.h:6,
                 from /build/source/code/AssetLib/X3D/X3DGeoHelper.cpp:1:
```
@ghpzin
ghpzin marked this pull request as ready for review September 25, 2025 18:02
@nixpkgs-ci nixpkgs-ci Bot added the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Sep 25, 2025
@Aleksanaa
Aleksanaa merged commit c21f9ff into NixOS:staging Sep 29, 2025
@ghpzin
ghpzin deleted the pr-assimp-gcc15 branch September 29, 2025 05:14
@fabianhjr fabianhjr mentioned this pull request Dec 1, 2025
4 of 13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

9.needs: reviewer This PR currently has no reviewers requested and needs attention. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants