liblqr1: fix build with gcc15, cleanup#446163
Merged
Merged
Conversation
- add "-std=gnu17" to `env.NIX_CFLAGS_COMPILE`, most updates upstream
were in 2017 or before.
Fixes build failure with gcc15:
```
lqr_energy.c:452:1: error: conflicting types for
'lqr_carver_generate_rcache_bright'; have 'gdouble *(LqrCarver *)'
{aka 'double *(struct _LqrCarver *)'}
452 | lqr_carver_generate_rcache_bright(LqrCarver *r)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../lqr/lqr_energy.h:27,
from lqr_energy.c:32:
../lqr/lqr_energy_priv.h:59:10: note: previous declaration of
'lqr_carver_generate_rcache_bright' with type 'gdouble *(void)'
{aka 'double *(void)'}
59 | gdouble *lqr_carver_generate_rcache_bright();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lqr_energy.c:471:1: error: conflicting types for
'lqr_carver_generate_rcache_luma'; have 'gdouble *(LqrCarver *)'
{aka 'double *(struct _LqrCarver *)'}
471 | lqr_carver_generate_rcache_luma(LqrCarver *r)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
```
- replace `rec` with `finalAttrs` - remove `with lib;` from `meta` - replace `sha256` with `hash` nix hash to-sri --type sha256 "10mrl5k3l2hxjhz4w93n50xwywp6y890rw2vsjcgai8627x5f1df" sha256-rgVX+hEGRfWY1FvwDBLy5nLPOyh2JE4+lB0KOmahuYI=
5001ddc to
6c43518
Compare
fabianhjr
approved these changes
Dec 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
liblqr1: fix build with gcc15
env.NIX_CFLAGS_COMPILE, most updates upstreamwere in 2017 or before.
Fixes build failure with gcc15:
liblqr1: cleanup
recwithfinalAttrswith lib;frommetasha256withhashnix hash to-sri --type sha256 "10mrl5k3l2hxjhz4w93n50xwywp6y890rw2vsjcgai8627x5f1df"
sha256-rgVX+hEGRfWY1FvwDBLy5nLPOyh2JE4+lB0KOmahuYI=
Tested build with:
nix-build --expr 'with import ./. {}; liblqr1.override { stdenv = gcc15Stdenv; }'Part of fixes for gcc15 update:
#440456
Upstream is not very active, most updates were before 2017 and
other distros also fixed gcc15 issues by adding
-std=gnu17or-std=gnu11:https://gitlab.archlinux.org/archlinux/packaging/packages/liblqr/-/commit/5c2eb2a39389c874f2c019cad255b25db29a52c7
https://src.fedoraproject.org/rpms/liblqr-1/c/6f74801f26aee9c7030aca920813fcfeb4d856a4
https://build.opensuse.org/requests/1267258/changes
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.