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

solanum: use older autoreconfHook & support parallel building #108330

Merged
merged 2 commits into from Feb 16, 2021

Conversation

andir
Copy link
Member

@andir andir commented Jan 3, 2021

Motivation for this change

This enables parallel building and fixes the build by using an older version of autoreconfHook that was recently updated.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS

@mweinelt @SuperSandro2000 how did you initially test this package? When I try to run it just segfaults:

$ result/bin/solanum -foreground -logfile test -conftest
WARNING: Unable to access logfile test - access to parent directory . failed: Permission denied
[1]    3586 segmentation fault (core dumped)  result/bin/solanum -foreground -logfile test -conftest
$ coredumpctl debug
           PID: 3586 (solanum)
           UID: 1000 (andi)
           GID: 100 (users)
        Signal: 11 (SEGV)
     Timestamp: Sun 2021-01-03 17:03:59 CET (6s ago)
  Command Line: result/bin/solanum -foreground -logfile test -conftest
    Executable: /nix/store/aznrjkf4kl1qbnzpkvqpclv4jljijy7a-solanum-unstable-2020-12-14/bin/solanum
 Control Group: /user.slice/user-1000.slice/session-1.scope
          Unit: session-1.scope
         Slice: user-1000.slice
       Session: 1
     Owner UID: 1000 (andi)
       Boot ID: 82040828410e48608793725130070687
    Machine ID: 7e0c1f9fca0c4fe3bff4f6cd5ff739a9
      Hostname: wrt
       Storage: /var/lib/systemd/coredump/core.solanum.1000.82040828410e48608793725130070687.3586.1609689839000000.lz4
       Message: Process 3586 (solanum) of user 1000 dumped core.

GNU gdb (GDB) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
/nix/store/995m2mixdlx60g5hgq7vabryvw9d1796-source/peda.py:45: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if sys.version_info.major is 3:
/nix/store/995m2mixdlx60g5hgq7vabryvw9d1796-source/peda.py:5792: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if pyversion is 2:
/nix/store/995m2mixdlx60g5hgq7vabryvw9d1796-source/peda.py:5794: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if pyversion is 3:
/nix/store/995m2mixdlx60g5hgq7vabryvw9d1796-source/peda.py:5803: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if pyversion is 2:
/nix/store/995m2mixdlx60g5hgq7vabryvw9d1796-source/peda.py:5805: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if pyversion is 3:
/nix/store/995m2mixdlx60g5hgq7vabryvw9d1796-source/peda.py:5814: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if pyversion is 2:
/nix/store/995m2mixdlx60g5hgq7vabryvw9d1796-source/peda.py:5816: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if pyversion is 3:
/nix/store/995m2mixdlx60g5hgq7vabryvw9d1796-source/lib/shellcode.py:24: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if sys.version_info.major is 3:
/nix/store/995m2mixdlx60g5hgq7vabryvw9d1796-source/lib/shellcode.py:379: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if pyversion is 3:
Reading symbols from /nix/store/aznrjkf4kl1qbnzpkvqpclv4jljijy7a-solanum-unstable-2020-12-14/bin/solanum...
(No debugging symbols found in /nix/store/aznrjkf4kl1qbnzpkvqpclv4jljijy7a-solanum-unstable-2020-12-14/bin/solanum)
[New LWP 3586]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libthread_db.so.1".
Core was generated by `result/bin/solanum -foreground -logfile test -conftest'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f44acba8da7 in call_hook () from /nix/store/aznrjkf4kl1qbnzpkvqpclv4jljijy7a-solanum-unstable-2020-12-14/lib/libircd.so
gdb-peda$ bt
#0  0x00007f44acba8da7 in call_hook () from /nix/store/aznrjkf4kl1qbnzpkvqpclv4jljijy7a-solanum-unstable-2020-12-14/lib/libircd.so
#1  0x00007f44acbc6d12 in sendto_realops_snomask () from /nix/store/aznrjkf4kl1qbnzpkvqpclv4jljijy7a-solanum-unstable-2020-12-14/lib/libircd.so
#2  0x00007f44acbaf35b in verify_logfile_access () from /nix/store/aznrjkf4kl1qbnzpkvqpclv4jljijy7a-solanum-unstable-2020-12-14/lib/libircd.so
#3  0x00007f44acbaf3e0 in init_main_logfile () from /nix/store/aznrjkf4kl1qbnzpkvqpclv4jljijy7a-solanum-unstable-2020-12-14/lib/libircd.so
#4  0x00007f44acbaab54 in solanum_main () from /nix/store/aznrjkf4kl1qbnzpkvqpclv4jljijy7a-solanum-unstable-2020-12-14/lib/libircd.so
#5  0x00007f44ac5c9dbd in __libc_start_main () from /nix/store/rqrklqsvw4ydpcg5kdcvn506fhcbqxk2-glibc-2.32-10/lib/libc.so.6
#6  0x000000000040107a in _start ()
gdb-peda$ quit

@@ -7562,7 +7562,9 @@ in

solaar = callPackage ../applications/misc/solaar {};

solanum = callPackage ../servers/irc/solanum {};
solanum = callPackage ../servers/irc/solanum {
autoreconfHook = autoreconfHook269;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buildPackages.autoreconfHook269 for cross

@andir
Copy link
Member Author

andir commented Jan 3, 2021 via email

@mweinelt
Copy link
Member

mweinelt commented Jan 3, 2021

WARNING: Unable to access logfile test - access to parent directory . failed: Permission denied

Yep, the moment I gave it a working location to put its log file it stopped segfaulting in on me.

❯ ./solanum -logfile /tmp -foreground
  notice: starting solanum-1.0-dev ...
  notice: librb version: unknown - OpenSSL: compiled 0x1010109f, library OpenSSL 1.1.1i  8 Dec 2020
  notice: Failed in reading configuration file /nix/store/diwcqvm5mw6caq6yqdyb5m1mbq6y95m4-solanum-unstable-2020-12-14/etc/ircd.conf, aborting
  notice: FATAL: No such file or directory /nix/store/diwcqvm5mw6caq6yqdyb5m1mbq6y95m4-solanum-unstable-2020-12-14/etc/ircd.conf

I haven't looked into configuration yet, so large parts of it are untested.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 108330 run on x86_64-darwin 1

1 package built:
  • solanum

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 108330 run on x86_64-linux 1

1 package built:
  • solanum

@mweinelt
Copy link
Member

mweinelt commented Jan 7, 2021

On 09:04 03.01.21, Frederik Rietdijk wrote: @FRidh commented on this pull request. > @@ -7562,7 +7562,9 @@ in solaar = callPackage ../applications/misc/solaar {}; - solanum = callPackage ../servers/irc/solanum {}; + solanum = callPackage ../servers/irc/solanum { + autoreconfHook = autoreconfHook269; buildPackages.autoreconfHook269 for cross
In this case it probably makes more sense to just explicitly "import" it in the derivation as that will handle the buildPackages stuff automatically?

^ @FRidh

Copy link
Member

@mweinelt mweinelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, waiting for a response to the autoreconfHook import.

@FRidh
Copy link
Member

FRidh commented Jan 7, 2021

In this case it probably makes more sense to just explicitly "import" it
in the derivation as that will handle the buildPackages stuff
automatically?

Splicing does not happen for explicitly passed in parameters (hence bf46afd). Or do you mean passing in the buildPackages set?

@mweinelt
Copy link
Member

mweinelt commented Feb 5, 2021

@andir?

The newer version that autoreconfHook defaults to isn't compatible with
the package just yet.
@mweinelt mweinelt merged commit 8656b93 into NixOS:master Feb 16, 2021
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.

None yet

4 participants