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

[Backport release-22.11] gatling: fix undefined reference to 'crypt' #203751

Closed

Conversation

herrwiese
Copy link
Contributor

ff30c89 made libcrypt support optional (and off-by-default) in glibc, which requires all packages still using it to depend on libxcrypt.

See also #181764

(cherry picked from commit 49ec58b)

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 22.11 Release Notes (or backporting 22.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

ff30c89 made libcrypt support optional (and off-by-default) in
glibc, which requires all packages still using it to depend on
libxcrypt.

See also NixOS#181764

(cherry picked from commit 49ec58b)
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Nov 30, 2022
@herrwiese herrwiese changed the title [22.11] gatling: fix undefined reference to 'crypt' (backport of PR#203689) [Backport release-22.11] gatling: fix undefined reference to 'crypt' Nov 30, 2022
@raphaelr
Copy link
Contributor

Gatling uses crypt for implemeting .htaccess. Gatling builds, but crashes on making a request to a protected folder:

$ cat secret/.htaccess
Realm
blobcat:$6$A2tawjH0owwmsd3C$SGoSRmDVHAl4RrbO6ySdRupWl93gcIpPCm3vJrNrimwE8.tP1T0Pk5P.g/o2sPkrhyWgrmLVQGbZAG.xrg7hh/

$ ./result/bin/gatling &
[1] 1942964
warning: could not bind to SMB port; SMB will be unavailable.
starting_up 0 :: 8000
start_ftp 0 :: 2121

$ curl 'http://localhost:8000/secret/' --user blobcat:Solarwinds123!
accept 8 127.0.0.1 43320 1 http
curl: (52) Empty reply from server
[1]+  Segmentation fault      (core dumped) ./result/bin/gatling

@herrwiese
Copy link
Contributor Author

Dang. This works on master and I really wouldn't have expected something to fail on release-22.11 due to the recent-ness of the branching, but unfortunately I can reproduce.

Is there any good guide to debugging things? When running with gdb it (of course) lacks debug symbols. Setting dontStrip = true and using enableDebugging <derivation> doesn't seem to help in this case. Is there a way to build a whole closure with debug symbols in an easy way?

@raphaelr
Copy link
Contributor

raphaelr commented Dec 1, 2022

   buildPhase = ''
    make gatling CFLAGS='-Og -g' LDFLAGS="-L ../libowfat -lowfat"
   '';

and then build with enableDebugging
I blame enableDebugging not working by itself on the LDFLAGS=-s... in the Makefile but I didn't analyze this further.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 18, 2023
@mweinelt
Copy link
Member

mweinelt commented Jul 3, 2023

Unfortunately NixOS 22.11 has reached its end-of-life status on 2023-06-30, one month after the release of NixOS 23.05.

I'm closing this pull request, since we do not accept any changes to its branches anymore.

@mweinelt mweinelt closed this Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10 10.rebuild-linux: 1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants