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

Emacs: Fix library_path substitution to not be a nested list for native compilation #94154

Closed
wants to merge 1 commit into from

Conversation

mjlbach
Copy link
Contributor

@mjlbach mjlbach commented Jul 29, 2020

Motivation for this change

This was my mistake, I pasted a nested instead of single list on a github issue in emacs-overlay which got merged, this should fix native compilation for straight/doom users that have installed emacs via nix, but use an external package manager for native compilation.

CC @adisbladis

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.

@mjlbach mjlbach requested a review from adisbladis as a code owner July 29, 2020 06:33
@mjlbach mjlbach changed the title Emacs: Fix library_path substituted to not be a nested list Emacs: Fix library_path substitution to not be a nested list for native compilation Jul 29, 2020
@mjlbach mjlbach marked this pull request as draft July 29, 2020 07:39
@adisbladis
Copy link
Member

@mjlbach Was this supposed to be marked as draft still?

@mjlbach
Copy link
Contributor Author

mjlbach commented Jul 29, 2020

Getting the following error with straight. Native compilation within emacs works fine with this. Note the fix is valid, as when a list-of-lists is passed to each worker the worker silently fails to compile

Fatal error 11: Segmentation fault
Backtrace:
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x525dbe]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x422ce4]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x4231de]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x5241ed]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x52426c]
/nix/store/7p1v1b6ys9fydg5kdqvr5mpr8svhwf4p-glibc-2.31/lib/libpthread.so.0(+0x12ee0)[0x7fc9676e7ee0]
/nix/store/7p1v1b6ys9fydg5kdqvr5mpr8svhwf4p-glibc-2.31/lib/ld-linux-x86-64.so.2(+0x152e1)[0x7fc9699832e1]
/nix/store/7p1v1b6ys9fydg5kdqvr5mpr8svhwf4p-glibc-2.31/lib/libc.so.6(_dl_catch_exception+0x65)[0x7fc965c58b65]
/nix/store/7p1v1b6ys9fydg5kdqvr5mpr8svhwf4p-glibc-2.31/lib/libc.so.6(_dl_catch_error+0x1f)[0x7fc965c58bff]
/nix/store/7p1v1b6ys9fydg5kdqvr5mpr8svhwf4p-glibc-2.31/lib/libdl.so.2(+0x18f5)[0x7fc9676cb8f5]
/nix/store/7p1v1b6ys9fydg5kdqvr5mpr8svhwf4p-glibc-2.31/lib/libdl.so.2(dlclose+0x24)[0x7fc9676cb334]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x5cfb39]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x565ffd]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x56ad78]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x588c9d]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x588d7a]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x591e27]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x59384a]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x588cbb]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/share/emacs/28.0.50/lisp/emacs-lisp/eln-x86_64-pc-linux-gnu-00d68a2f3b2f6094/cconv.eln(F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_14+0xf8)[0x7fc955a71648]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/share/emacs/28.0.50/lisp/emacs-lisp/eln-x86_64-pc-linux-gnu-00d68a2f3b2f6094/cconv.eln(F63636f6e762d636f6e76657274_cconv_convert_0+0xf8f)[0x7fc955a72a1f]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x588cbb]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x5c5568]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x588b80]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x588d7a]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x591e27]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x59384a]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/share/emacs/28.0.50/lisp/emacs-lisp/eln-x86_64-pc-linux-gnu-00d68a2f3b2f6094/cconv.eln(F63636f6e762d636f6e76657274_cconv_convert_0+0xc12)[0x7fc955a726a2]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x588cbb]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x5c5568]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x588b80]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x588d7a]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x591e27]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x59384a]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/share/emacs/28.0.50/lisp/emacs-lisp/eln-x86_64-pc-linux-gnu-00d68a2f3b2f6094/cconv.eln(F63636f6e762d2d636f6e766572742d66756e63626f6479_cconv__convert_funcbody_0+0x282)[0x7fc955a70bc2]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x588cbb]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/share/emacs/28.0.50/lisp/emacs-lisp/eln-x86_64-pc-linux-gnu-00d68a2f3b2f6094/cconv.eln(F63636f6e762d2d636f6e766572742d66756e6374696f6e_cconv__convert_function_0+0x49e)[0x7fc955a704ee]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x588cbb]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/share/emacs/28.0.50/lisp/emacs-lisp/eln-x86_64-pc-linux-gnu-00d68a2f3b2f6094/cconv.eln(F63636f6e762d636f6e76657274_cconv_convert_0+0x13e2)[0x7fc955a72e72]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x588cbb]
/nix/store/c27zvaqcdjviss061zcb1mny5bncpsyv-emacs-gcc-20200726.0/bin/.emacs-28.0.50-wrapped_[0x5c5568]
...
/home/michael/.emacs.d/bin/doom: line 9: 173734 Segmentation fault      (core dumped) $EMACS --no-site-file --script "$0" -- "$@"

@mjlbach
Copy link
Contributor Author

mjlbach commented Aug 31, 2020

This is superseded by #94637 which uses the new driver-options instead of comp-async-env-modifier-form (should work across linux and macos)

@mjlbach mjlbach closed this Aug 31, 2020
@mjlbach mjlbach deleted the emacs/fix_library_path branch August 31, 2020 21:41
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

2 participants