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

jsonnet: fix on darwin #47939

Merged
merged 1 commit into from Oct 6, 2018
Merged

jsonnet: fix on darwin #47939

merged 1 commit into from Oct 6, 2018

Conversation

pmahoney
Copy link
Contributor

@pmahoney pmahoney commented Oct 5, 2018

Build on darwin fails when using emscripten to build the js
library. Disabling this is unsatisfying, but gets the jsonnet binary
building again.

Motivation for this change

Build fails on darwin

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

@benley
FYI, initial error on darwin is this (the missing tmpfile thing is not the true error, I think):

INFO:root:generating system library: libcxx.a... (this will be cached in "/private/var/folders/vc/gx_wbycj2nlbt3yzw5gt520xdjznbj/T/nix-build-jsonnet-0.11.2.drv-1/.em_cache/asmjs/libcxx.a" for subsequent builds)
INFO:root: - ok
INFO:root:generating system library: libcxxabi.bc... (this will be cached in "/private/var/folders/vc/gx_wbycj2nlbt3yzw5gt520xdjznbj/T/nix-build-jsonnet-0.11.2.drv-1/.em_cache/asmjs/libcxxabi.bc" for subsequent builds)
/nix/store/s4wfflah5il55qv0svbhsz7f4yk99sya-emscripten-1.37.36/share/emscripten/system/lib/libcxxabi/src/cxa_aux_runtime.cpp:22:1: error: unknown type name 'LIBCXXABI_NORETURN'
LIBCXXABI_NORETURN
^

was trying to follow http://www.omniprog.info/clang_build_libcxx.html but could not make it work, so just ended up disabling emscripten / js build on darwin. May be the same issue as seen here: bakape/shamichan#767

Build on darwin fails when using emscripten to build the js
library. Disabling this is unsatisfying, but gets the jsonnet binary
building again.
@matthewbauer

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@matthewbauer
Copy link
Member

@GrahamcOfBorg build jsonnet

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: jsonnet

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@matthewbauer
Copy link
Member

Should this be considered unfree? It doesn't look like it but ofborg is not building it.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: jsonnet

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/kq1120l3yrr3l56if96myx88m7w9z58x-jsonnet-0.11.2
shrinking /nix/store/kq1120l3yrr3l56if96myx88m7w9z58x-jsonnet-0.11.2/bin/jsonnet
shrinking /nix/store/kq1120l3yrr3l56if96myx88m7w9z58x-jsonnet-0.11.2/lib/libjsonnet.so
shrinking /nix/store/kq1120l3yrr3l56if96myx88m7w9z58x-jsonnet-0.11.2/lib/libjsonnet++.so
strip is /nix/store/dxf1m7dhc4qb655bdljc1fsd74v1nag3-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/kq1120l3yrr3l56if96myx88m7w9z58x-jsonnet-0.11.2/lib  /nix/store/kq1120l3yrr3l56if96myx88m7w9z58x-jsonnet-0.11.2/bin
patching script interpreter paths in /nix/store/kq1120l3yrr3l56if96myx88m7w9z58x-jsonnet-0.11.2
checking for references to /build in /nix/store/kq1120l3yrr3l56if96myx88m7w9z58x-jsonnet-0.11.2...
/nix/store/kq1120l3yrr3l56if96myx88m7w9z58x-jsonnet-0.11.2

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: jsonnet

Partial log (click to expand)

clang++ -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5  cmd/jsonnet.cpp core/desugarer.o core/formatter.o core/lexer.o core/libjsonnet.o core/parser.o core/pass.o core/static_analysis.o core/string_utils.o core/vm.o third_party/md5/md5.o -o jsonnet
clang++  core/desugarer.o core/formatter.o core/lexer.o core/libjsonnet.o core/parser.o core/pass.o core/static_analysis.o core/string_utils.o core/vm.o third_party/md5/md5.o -shared -o libjsonnet.so
clang++ -c -g -O3 -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5 cpp/libjsonnet++.cpp -o cpp/libjsonnet++.o
clang++  core/desugarer.o core/formatter.o core/lexer.o core/libjsonnet.o core/parser.o core/pass.o core/static_analysis.o core/string_utils.o core/vm.o third_party/md5/md5.o cpp/libjsonnet++.o -shared -o libjsonnet++.so
installing
post-installation fixup
strip is /nix/store/9xjkb4xz0b5lmizij9ppxy7lkxdxhx6b-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/338kyv6y6p8bgxmzcjkqav6j0c4ik9lp-jsonnet-0.11.2/lib  /nix/store/338kyv6y6p8bgxmzcjkqav6j0c4ik9lp-jsonnet-0.11.2/bin
patching script interpreter paths in /nix/store/338kyv6y6p8bgxmzcjkqav6j0c4ik9lp-jsonnet-0.11.2
/nix/store/338kyv6y6p8bgxmzcjkqav6j0c4ik9lp-jsonnet-0.11.2

@benley
Copy link
Member

benley commented Oct 6, 2018

Honestly I think the only thing that the emscripten/javascript build of jsonnet gets used for is its own documentation, and we might be better off not building by default.

@benley benley merged commit 4af5457 into NixOS:master Oct 6, 2018
@benley benley mentioned this pull request Oct 6, 2018
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants