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

tinycdb: add support for static build #97386

Merged
merged 1 commit into from Oct 9, 2020
Merged

Conversation

@KAction
Copy link
Contributor

@KAction KAction commented Sep 7, 2020

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@KAction
Copy link
Contributor Author

@KAction KAction commented Oct 7, 2020

@tomberek Can we merge?

@tomberek
Copy link
Contributor

@tomberek tomberek commented Oct 7, 2020

@KAction I don't have merge permissions. But as i'm looking at this again, the normal build still works as expected, but i am not able to get the static build working.

I tried nix-build -A pkgsStatic.tinycdb, my expectation was that this would create a static version, but it fails with:

 setting SOURCE_DATE_EPOCH to timestamp 1336746967 of file tinycdb-0.78/debian/rules
  patching sources
  updateAutotoolsGnuConfigScriptsPhase
  configuring
  no configure script, doing nothing
  building
  build flags: SHELL=/nix/store/2jysm3dfsgby5sw5jgj43qjrb5v79ms9-bash-4.4-p23/bin/bash prefix=\$\(out\) CC=cc AR=ar RANLIB=ranlib static
  cc -O -D_FILE_OFFSET_BITS=64 -c cdb_init.c
  /nix/store/2jysm3dfsgby5sw5jgj43qjrb5v79ms9-bash-4.4-p23/bin/bash: cc: command not found

The build logic may work for a cross compilation to static, i did not test that.

@KAction KAction force-pushed the KAction:tinycdb-static branch from 34bc31c to 88b0840 Oct 9, 2020
@KAction
Copy link
Contributor Author

@KAction KAction commented Oct 9, 2020

@tomberek It looks like I messed up build/target/host distinction. Not sure why it worked for me previously. Anyway, should be fine now.

@ryantm You merged original submission, so you are my best hope to get this merged. Is is appropriate logic in finding someone with commit bit set?

@ryantm
Copy link
Member

@ryantm ryantm commented Oct 9, 2020

Confirmed nix-build -A pkgsStatic.tinycdb works.

@ryantm
Copy link
Member

@ryantm ryantm commented Oct 9, 2020

Result of nixpkgs-review pr 97386 1

@ryantm
Copy link
Member

@ryantm ryantm commented Oct 9, 2020

@ryantm
Copy link
Member

@ryantm ryantm commented Oct 9, 2020

It doesn't look like this PR is breaking the evaluation.

@ryantm
ryantm approved these changes Oct 9, 2020
@ryantm ryantm merged commit 8af4f1f into NixOS:master Oct 9, 2020
2 of 4 checks passed
2 of 4 checks passed
tests tests
Details
action
Details
Wait for ofborg This failed status will be cleared when ofborg finishes eval.
Details
grahamcofborg-eval The branch this PR will merge in to does not cleanly evaluate, and so this PR cannot be checked.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.