Skip to content
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

treewide: fix pg_config / postgresql headers moved to dev output #336994

Merged
merged 1 commit into from
Aug 24, 2024

Conversation

wolfgangwalther
Copy link
Contributor

@wolfgangwalther wolfgangwalther commented Aug 24, 2024

This was supposed to happen in #294504, but the commit was accidentally left out when splitting off some libpq-related changes. Originated in #179962, by Sandro.

@Ma27

ToDo:

  • Fix some more direct references to ${postgresql}
  • Build all changed packages

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@Ma27
Copy link
Member

Ma27 commented Aug 24, 2024

Damn it, sorry for missing that on the final iterations! :(

@Ma27
Copy link
Member

Ma27 commented Aug 24, 2024

Built the following things so far, with success:

  • PHP 8.4
  • python3.pkgs.psycopg2
  • postgresqlPackages.tsja
  • postgresqlPackages.pgvecto-rs
  • postgresqlPackages.tsja
  • libdbiDrivers
  • bacula

Can take a look into

ERROR:  Error installing /nix/store/8ms1n7ms7acp8xqcsg7bdqv8bsjbjd8k-pg-1.2.3.gem:
        ERROR: Failed to build gem native extension.

    current directory: /nix/store/zv1lgkq0aza3zap1xzry95cd53973nam-ruby3.3-pg-1.2.3/lib/ruby/gems/3.3.0/gems/pg-1.2.3/ext
/nix/store/r0ypxm1x0jf2v1837j7kcz56kjsc7rkp-ruby-3.3.4/bin/ruby extconf.rb --with-pg-config\=/nix/store/674zd30h0laaraw77a1c4pw0av55hd08-postgresql-16.4-dev/bin/pg_config
Using config values from /nix/store/674zd30h0laaraw77a1c4pw0av55hd08-postgresql-16.4-dev/bin/pg_config

from /nix/store/v325dyz38dcqrpk58h20sq43xabyykpr-ruby3.3-pg-1.2.3.drv (while building zammod) now.

@wolfgangwalther
Copy link
Contributor Author

wolfgangwalther commented Aug 24, 2024

Can take a look into

ERROR:  Error installing /nix/store/8ms1n7ms7acp8xqcsg7bdqv8bsjbjd8k-pg-1.2.3.gem:
        ERROR: Failed to build gem native extension.

    current directory: /nix/store/zv1lgkq0aza3zap1xzry95cd53973nam-ruby3.3-pg-1.2.3/lib/ruby/gems/3.3.0/gems/pg-1.2.3/ext
/nix/store/r0ypxm1x0jf2v1837j7kcz56kjsc7rkp-ruby-3.3.4/bin/ruby extconf.rb --with-pg-config\=/nix/store/674zd30h0laaraw77a1c4pw0av55hd08-postgresql-16.4-dev/bin/pg_config
Using config values from /nix/store/674zd30h0laaraw77a1c4pw0av55hd08-postgresql-16.4-dev/bin/pg_config

from /nix/store/v325dyz38dcqrpk58h20sq43xabyykpr-ruby3.3-pg-1.2.3.drv (while building zammod) now.

I already confirmed that this happened before #294504 already. The error changes after the PR, because pg_config can't be found, but then goes back to that original error. So the change here is good, but I guess it would still be worth to look at this. Could be related to upgrading libpq from 15 to 16.

@wolfgangwalther
Copy link
Contributor Author

Here's my progress so far:

Those build fine:

% nix-build \
  -A bacula \
  -A kea \
  -A libdbiDrivers \
  -A opendbx \
  -A php.extensions.pdo_pgsql \
  -A php.extensions.pgsql \
  -A postgresql.pkgs.pgvecto-rs \
  -A postgresql.pkgs.tsja \
  -A python3Packages.psycopg2 \
  -A urweb
/nix/store/b68vblgv13mq6bk353hwndij92m59qhh-bacula-15.0.2
/nix/store/x4kkfadi8n0jpym3ygg03ngvbwfyz09s-kea-2.6.1
/nix/store/dj7abnz6lgfd6hc7dn238dv917mfbc3c-libdbi-drivers-0.9.0
/nix/store/2h42jk5rnn0g0ajisk772bhhmb9d8fbw-opendbx-1.4.6
/nix/store/xgq7y4ai9dvaxnj3xw2yhx4kfiba917g-php-pdo_pgsql-8.2.22
/nix/store/k995lzmnb563c88wv8mlbh6713svbfq6-php-pgsql-8.2.22
/nix/store/v8fjk24j0rak5k9mmmxfwqnci8403bxb-pgvecto-rs-0.2.1
/nix/store/vcj1r0d8ga8yqpccyc68grbqgjsmggfi-tsja-0.5.0
/nix/store/k53cibbyqkirc3k37s8f2xfzjvqsj1mw-python3.12-psycopg2-2.9.9
/nix/store/rhydbammw3w0c2flwffn8ldq019vzkxa-urweb-20200209

I also confirmed that they failed before this fix - and if they didn't, I removed the respective flags, because they didn't make a difference anyway.

I am still running nix-build --argstr system aarch64-darwin -A pgmodeler, this will take a while. The change in pgmodeler is in a darwin-only condition.

Regarding zammad see comment above.

The following three are still open for me:

postgresql.pkgs.age.tests
postgresql.pkgs.plv8.tests
python3Packages.psycopg

I'm not sure whether python3Packages.psycopg is supposed to build (or is this the python2 variant?), but it fails early for some dependencies.

The two pg extensions are a bit tricky, I'm looking into them now.

@wolfgangwalther
Copy link
Contributor Author

Built the following things so far, with success:

Note that the latest force push changed the fix for IIRC libdbiDrivers and something else that you didn't list, yet. Removed the flag instead of changing it.

@wolfgangwalther
Copy link
Contributor Author

postgresql.pkgs.age.tests
postgresql.pkgs.plv8.tests

Hm. Seems like the fixes here are ok. age is actually passing now and plv8 was failing before #294504 already.

@wolfgangwalther
Copy link
Contributor Author

plv8 was failing before #294504 already.

Fine on master, but broken on staging.

@wolfgangwalther
Copy link
Contributor Author

wolfgangwalther commented Aug 24, 2024

I grepped for grep -r '${postgresql' . to get all direct references to the postgresql package and went through all of them. Everything that seemed to need a fix is in here, all the remaining references should be ok as is.

Except for pgmodeler (which will still build a while on darwin), I confirmed that all touched packages are in the same state as before #294504. Breaking in the same way, when they were before or passing, when they were before.

This is ready from my side.

@wolfgangwalther wolfgangwalther marked this pull request as ready for review August 24, 2024 13:17
This was supposed to happen in NixOS#294504, but the commit was accidentally
left out when splitting off some libpq-related changes. Originated in
NixOS#179962, by Sandro.

Co-authored-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
@wolfgangwalther
Copy link
Contributor Author

Latest force push changed exim, which needs to be built with exim.override { enablePgSQL = true; } to actually test the change. Confirmed that passing the include folder is not needed anymore, the build passes without as well.

@Ma27 Ma27 merged commit 34bca7d into NixOS:staging Aug 24, 2024
22 checks passed
@wolfgangwalther wolfgangwalther deleted the pg-config-dev branch August 24, 2024 15:55
@wolfgangwalther
Copy link
Contributor Author

plv8 was failing before #294504 already.

Fine on master, but broken on staging.

Tracked this down to #327653 (comment).

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

Successfully merging this pull request may close these issues.

4 participants