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

Build with js crate using nix failed on darwin #442

Open
hlolli opened this issue Jun 1, 2022 · 1 comment
Open

Build with js crate using nix failed on darwin #442

hlolli opened this issue Jun 1, 2022 · 1 comment
Labels
bug Something isn't working deno/javascript Involves the Deno runtime nix osx

Comments

@hlolli
Copy link
Contributor

hlolli commented Jun 1, 2022

Describe the bug

   Compiling swc_ecmascript v0.31.4
   Compiling dprint-swc-ecma-ast-view v0.15.0
   Compiling dprint-swc-ecma-ast-view v0.16.0
   Compiling deno_doc v0.3.0
   Compiling deno_lint v0.4.0
   Compiling deno v1.9.2
   Compiling dprint-plugin-typescript v0.44.2
   Compiling js v0.1.0 (/private/tmp/nix-build-emacsng-1e46579.drv-0/source/rust_src/crates/js)
    Finished dev [unoptimized + debuginfo] target(s) in 3m 16s
sed -i~ 's/rust_src\//..\/rust_src\//g' ../rust_src/target/debug/libemacsng.d
clang -o temacs.tmp \
  -Demacs  -I. -I. -I../lib -I../lib      -I/nix/store/2s47vimgxxwjvp9bj1s9paaiv01wr5i5-librsvg-2.54.1-dev/include/librsvg-2.0 -I/nix/store/snlminmnxn0w300n6n6yxz17wirzgy49-glib-2.72.1-dev/include -I/nix/store/snlminmnxn0w300n6n6yxz17wirzgy49-glib-2.72.1-dev/include/glib-2.0 -I/nix/store/rasszvzj8p65fpi04kilmdm73lsrq5i7-glib-2.72.1/lib/glib-2.0/include -I/nix/store/r5612r4yklygsg1bf6zplk3zpqsm8mpn-gdk-pixbuf-2.42.8-dev/include/gdk-pixbuf-2.0 -I/nix/store/q1151r0w6skbw9f0jz959jis0ssczpf5-cairo-1.16.0-dev/include/cairo -I/nix/store/3vjj12h7b5ndpcyg1czvrfvykf7lz5p1-freetype-2.12.0-dev/include/freetype2 -I/nix/store/3vjj12h7b5ndpcyg1czvrfvykf7lz5p1-freetype-2.12.0-dev/include -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/nix/store/dkmvfgz7s4n9q3rljy4gf8lj28ampzcy-imagemagick-7.1.0-36-dev/include/ImageMagick-7 -I/nix/store/22y6rc8rqmj4wvwq0vx4vhd9iw6g29d5-zlib-1.2.12-dev/include -I/nix/store/i7zyq2jg3i6bkwn55p9nxp2szh1qd630-libpng-apng-1.6.37-dev/include/libpng16 -I/nix/store/0vwhgj3q0l7b42vk64w1qnfh71fasy3g-libxml2-2.9.14-dev/include/libxml2        -I/nix/store/f5jbnx52r4rvym7k8is93bwc2244825m-lcms2-2.13.1-dev/include       -MMD -MF deps/.d -MP  -I/nix/store/7vgs5slcl7acwa9mhm9qz02zvx9xbp6k-jansson-2.13.1/include -I/nix/store/kjalfr4vrp8jpj1xfmvb6h481q7iyzvw-gnutls-3.7.3-dev/include    -pthread -DEMACS_EXTERN_INLINE -Wno-switch -Wno-pointer-sign -Wno-string-plus-int -Wno-unknown-attributes -Wno-initializer-overrides -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -g3 -O2  -framework AppKit -framework IOKit -framework Carbon                     -framework IOSurface -framework QuartzCore -framework Metal -L.././rust_src/target/debug -framework Security \
    dispnew.o frame.o scroll.o xdisp.o menu.o  window.o charset.o coding.o category.o ccl.o character.o chartab.o bidi.o cm.o term.o terminal.o xfaces.o    emacs.o keyboard.o macros.o keymap.o sysdep.o bignum.o buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o cmds.o casetab.o casefiddle.o indent.o search.o regex-emacs.o undo.o alloc.o pdumper.o data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o font.o print.o lread.o emacs-module.o syntax.o  bytecode.o comp.o dynlib.o process.o gnutls.o callproc.o region-cache.o sound.o timefns.o atimer.o doprnt.o intervals.o textprop.o composite.o xml.o lcms.o kqueue.o  profiler.o decompress.o thread.o systhread.o        fontset.o fringe.o image.o  json.o nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o macfont.o -lemacsng terminfo.o lastfile.o      ../lib/libgnu.a       -ltiff -ljpeg -L/nix/store/h0b84wsjh1h51dvai4i343ai636sfkf2-zlib-1.2.12/lib -L/nix/store/x8bsyskg7za97qhgwba4hn5n4bda76r4-libpng-apng-1.6.37/lib -lpng16 -lz     -L/nix/store/2d6mdvw50is4m16pxaww1zixxgnc54z4-librsvg-2.54.1/lib -L/nix/store/rasszvzj8p65fpi04kilmdm73lsrq5i7-glib-2.72.1/lib -L/nix/store/37jzlrckjwl7rk201d36nzalsizd7dad-gdk-pixbuf-2.42.8/lib -L/nix/store/ps3w45avidchhfbc359v2cd2n3i373qh-cairo-1.16.0/lib -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lcairo -L/nix/store/1m1x34df2dx1a562nxqn5chrv6j0rl5d-imagemagick-7.1.0-36/lib -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI            -L/nix/store/l4s2xjky7c2xngaxjmi54hqyq60yz0xi-libxml2-2.9.14/lib -lxml2    -lncurses         -L/nix/store/892xcisv21h24vs9gy6w64ypdl51ciag-gnutls-3.7.3/lib -lgnutls   -L/nix/store/zi6hnlpzqb7mr4nadv8dw6np2snsn5cn-lcms2-2.13.1/lib -llcms2   -lz   -L/nix/store/7vgs5slcl7acwa9mhm9qz02zvx9xbp6k-jansson-2.13.1/lib -ljansson -lgmp -lgccjit -ldl  -ldl -lm -lresolv -lstdc++
Undefined symbols for architecture x86_64:
  "_AREF", referenced from:
      lsp_json::parsing::lisp_to_serde::h29178969e7f4bc7c in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
  "_ASET", referenced from:
      lsp_json::parsing::serde_to_lisp::h29410a18acff5b2d in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
  "_ASIZE", referenced from:
      lsp_json::parsing::lisp_to_serde::h29178969e7f4bc7c in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
  "_BYTE_POS_ADDR", referenced from:
      ng_module::ng_module::ng_module_access_current_buffer_contents::h90b99e7cb8bf942c in libemacsng.a(ng_module-c1f4aefa593be8b1.1klazxwmzcmqyl13.rcgu.o)
  "_CHECK_IMPURE", referenced from:
      emacs::list::LispCons::check_impure::h0275935777020b02 in libemacsng.a(emacs-c511b63545f0fb1f.osk9y91wdrf4mic.rcgu.o)
  "_CHECK_NUMBER", referenced from:
      js::javascript::js_set_tick_rate::he112bc997e9ea6f8 in libemacsng.a(js-d97212e4a64e782d.wzpp1hbsoti324k.rcgu.o)
  "_FIXNUMP", referenced from:
      js::javascript::lisp_invoke::hda6de9adf5d1d080 in libemacsng.a(js-d97212e4a64e782d.wzpp1hbsoti324k.rcgu.o)
      js::javascript::js_reenter_inner::_$u7b$$u7b$closure$u7d$$u7d$::h5aaf2f5476fdab57 in libemacsng.a(js-d97212e4a64e782d.2x71hdmo9ocdomcb.rcgu.o)
  "_FLOATP", referenced from:
      js::javascript::lisp_invoke::hda6de9adf5d1d080 in libemacsng.a(js-d97212e4a64e782d.wzpp1hbsoti324k.rcgu.o)
      js::javascript::permissions_from_args::ha3c19b283e490da5 in libemacsng.a(js-d97212e4a64e782d.wzpp1hbsoti324k.rcgu.o)
      js::javascript::js_reenter_inner::_$u7b$$u7b$closure$u7d$$u7d$::h5aaf2f5476fdab57 in libemacsng.a(js-d97212e4a64e782d.2x71hdmo9ocdomcb.rcgu.o)
      lsp_json::parsing::lisp_to_serde::h29178969e7f4bc7c in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
  "_HASH_KEY", referenced from:
      lsp_json::parsing::lisp_to_serde::h29178969e7f4bc7c in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
  "_HASH_TABLE_P", referenced from:
      lsp_json::parsing::lisp_to_serde::h29178969e7f4bc7c in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
  "_HASH_TABLE_SIZE", referenced from:
      lsp_json::parsing::lisp_to_serde::h29178969e7f4bc7c in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
  "_HASH_VALUE", referenced from:
      lsp_json::parsing::lisp_to_serde::h29178969e7f4bc7c in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
  "_INTEGERP", referenced from:
      js::javascript::js_reenter_inner::hbe7bf64093481092 in libemacsng.a(js-d97212e4a64e782d.wzpp1hbsoti324k.rcgu.o)
      lsp_json::parsing::lisp_to_serde::h29178969e7f4bc7c in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
  "_STRINGP", referenced from:
      js::javascript::lisp_invoke::hda6de9adf5d1d080 in libemacsng.a(js-d97212e4a64e782d.wzpp1hbsoti324k.rcgu.o)
      js::javascript::js_reenter_inner::_$u7b$$u7b$closure$u7d$$u7d$::h5aaf2f5476fdab57 in libemacsng.a(js-d97212e4a64e782d.2x71hdmo9ocdomcb.rcgu.o)
      lsp_json::parsing::lisp_to_serde::h29178969e7f4bc7c in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
  "_SYMBOLP", referenced from:
      lsp_json::parsing::lisp_to_serde::_$u7b$$u7b$closure$u7d$$u7d$::h592f12c0fc9decf4 in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.3lmm8z25n77yjqb8.rcgu.o)
  "_SYMBOL_NAME", referenced from:
      lsp_json::parsing::lisp_to_serde::_$u7b$$u7b$closure$u7d$$u7d$::h592f12c0fc9decf4 in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.3lmm8z25n77yjqb8.rcgu.o)
  "_USER_PTRP", referenced from:
      emacs::lisp::LispObject::is_user_ptr::h82abf0f10cb585a3 in libemacsng.a(emacs-c511b63545f0fb1f.1t90p33vbrfuoxxo.rcgu.o)
  "_VECTORP", referenced from:
      lsp_json::parsing::lisp_to_serde::h29178969e7f4bc7c in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
  "_XFLOATINT", referenced from:
      js::javascript::js_set_tick_rate::he112bc997e9ea6f8 in libemacsng.a(js-d97212e4a64e782d.wzpp1hbsoti324k.rcgu.o)
  "_XFLOAT_DATA", referenced from:
      js::javascript::permissions_from_args::ha3c19b283e490da5 in libemacsng.a(js-d97212e4a64e782d.wzpp1hbsoti324k.rcgu.o)
      lsp_json::parsing::lisp_to_serde::h29178969e7f4bc7c in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
  "_XHASH_TABLE", referenced from:
      emacs::glyph::_$LT$impl$u20$emacs..lisp..ExternalPtr$LT$emacs..bindings..glyph_string$GT$$GT$::composite_glyph::h5d9cd4370ebe5668 in libemacsng.a(emacs-c511b63545f0fb1f.1t90p33vbrfuoxxo.rcgu.o)
      lsp_json::parsing::lisp_to_serde::h29178969e7f4bc7c in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
      lsp_json::parsing::serde_to_lisp::h29410a18acff5b2d in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
  "_XUSER_PTR", referenced from:
      emacs::lisp::LispObject::as_userdata_ref::hb643b6ed15b2f99f in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.52ehylis0r29zlwf.rcgu.o)
      emacs::lisp::LispObject::as_userdata_ref::h4c9c4ca55050d8b4 in libemacsng.a(ng_async-9a0cff4fcf0260ad.53qtlcezcs7w9go.rcgu.o)
      emacs::lisp::LispObject::as_userdata_ref::h78a65ff575d96e86 in libemacsng.a(ng_async-9a0cff4fcf0260ad.53qtlcezcs7w9go.rcgu.o)
      ng_async::ng_async::to_owned_userdata::hffa5cb2fc5602a92 in libemacsng.a(ng_async-9a0cff4fcf0260ad.1n0p90gbd2agjhkf.rcgu.o)
      ng_async::ng_async::internal_send_message::hcc1c9898eb973611 in libemacsng.a(ng_async-9a0cff4fcf0260ad.1n0p90gbd2agjhkf.rcgu.o)
  "_build_string", referenced from:
      _$LT$emacs..lisp..LispObject$u20$as$u20$core..convert..From$LT$$RF$str$GT$$GT$::from::h59d5800260c6e50d in libemacsng.a(emacs-c511b63545f0fb1f.1t90p33vbrfuoxxo.rcgu.o)
      emacs::terminal::_$LT$impl$u20$emacs..lisp..ExternalPtr$LT$emacs..bindings..terminal$GT$$GT$::name::h57b899780419a534 in libemacsng.a(emacs-c511b63545f0fb1f.1t90p33vbrfuoxxo.rcgu.o)
      ng_async::ng_async::EmacsPipe::create::h31e3dd776eca4292 in libemacsng.a(ng_async-9a0cff4fcf0260ad.1n0p90gbd2agjhkf.rcgu.o)
  "_frame_dimension", referenced from:
      emacs::frame::_$LT$impl$u20$emacs..lisp..ExternalPtr$LT$emacs..bindings..frame$GT$$GT$::internal_border_width::hc42d288812309523 in libemacsng.a(emacs-c511b63545f0fb1f.1t90p33vbrfuoxxo.rcgu.o)
  "_intern_c_string", referenced from:
      ng_async::ng_async::EmacsPipe::create::h31e3dd776eca4292 in libemacsng.a(ng_async-9a0cff4fcf0260ad.1n0p90gbd2agjhkf.rcgu.o)
     (maybe you meant: _intern_c_string_1)
  "_make_fixed_natnum", referenced from:
      lsp_json::parsing::serde_to_lisp::h29410a18acff5b2d in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
  "_make_fixnum", referenced from:
      js::javascript::lisp_make_finalizer::hf59a24d80d7eb1ba in libemacsng.a(js-d97212e4a64e782d.wzpp1hbsoti324k.rcgu.o)
      js::javascript::lisp_make_lambda::hbcc5bd002e2f05db in libemacsng.a(js-d97212e4a64e782d.wzpp1hbsoti324k.rcgu.o)
      js::javascript::lisp_fixnum::ha280af0110e7016c in libemacsng.a(js-d97212e4a64e782d.wzpp1hbsoti324k.rcgu.o)
      js::javascript::make_reverse_proxy::hca8f77d2eb7d924e in libemacsng.a(js-d97212e4a64e782d.wzpp1hbsoti324k.rcgu.o)
  "_make_int", referenced from:
      lsp_json::parsing::serde_to_lisp::h29410a18acff5b2d in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
     (maybe you meant: _make_integer_mpz, _make_interval )
  "_make_lisp_symbol", referenced from:
      emacs::symbol::_$LT$impl$u20$core..convert..From$LT$emacs..lisp..ExternalPtr$LT$emacs..bindings..Lisp_Symbol$GT$$GT$$u20$for$u20$emacs..lisp..LispObject$GT$::from::h221edf7f7e72d007 in libemacsng.a(emacs-c511b63545f0fb1f.1t90p33vbrfuoxxo.rcgu.o)
  "_make_uint", referenced from:
      lsp_json::parsing::serde_to_lisp::h29410a18acff5b2d in libemacsng.a(lsp_json-5f8a3c54f25fc7ad.4nh7elvm2rbi0773.rcgu.o)
ld: symbol(s) not found for architecture x86_64
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:760: temacs] Error 1
make[1]: Leaving directory '/private/tmp/nix-build-emacsng-1e46579.drv-0/source/src'
make: *** [Makefile:454: src] Error 2

To Reproduce

I'm using flake overlay

 (final: prev: {
      emacsng = emacs-ng.packages.x86_64-darwin.emacsng;
    })
./configure

Expected behavior
A clear and concise description of what you expected to happen.

OS
Which os do you use? (uname -a)

Darwin hlolli.local 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:46:32 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T6000 arm64 arm Darwin

Error callstack

@hlolli hlolli added the bug Something isn't working label Jun 1, 2022
@declantsien
Copy link
Contributor

Nix flake here
https://github.com/declantsien/emacs-webrender/actions/workflows/nix-flake.yaml
is working on macOS. Only with webrender for now.

@declantsien declantsien self-assigned this Feb 11, 2023
@declantsien declantsien removed their assignment Feb 12, 2023
@declantsien declantsien added the deno/javascript Involves the Deno runtime label Feb 13, 2023
@declantsien declantsien changed the title Build error on darwin Build with js crate using nix failed on darwin Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deno/javascript Involves the Deno runtime nix osx
Projects
None yet
Development

No branches or pull requests

2 participants