onivim / oni2

Native, lightweight modal code editor
https://v2.onivim.io
MIT License
7.84k stars 282 forks source link

building failed on ubuntu 18.10 #341

Closed saibing closed 5 years ago

saibing commented 5 years ago
/usr/bin/ld: /home/bingo/.esy/3/i/libvim-8.10869.10-c195537c/lib/libvim.a(os_unix.o): undefined reference to symbol 'is_selinux_enabled'
/usr/bin/ld: /lib/x86_64-linux-gnu/libselinux.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking
error: command failed: 'refmterr' 'dune' 'build' '-p' 'Oni2' '-j4' (exited with 1)
esy-build-package: exiting with errors above...
error: build failed with exit code: 1
s0kil commented 5 years ago

Getting same error on Ubuntu 19.04

heliostatic commented 5 years ago

Also seeing a build failure on macOS 10.14.5:

esy build
info esy build 0.5.8 (using package.json)
...
ld: warning: directory not found for option '-L/opt/local/lib'
Undefined symbols for architecture x86_64:
  "__nl_msg_cat_cntr", referenced from:
      _ex_language in libvim.a(ex_cmds2.o)
  "_libintl_bind_textdomain_codeset", referenced from:
      _mb_init in libvim.a(mbyte.o)
  "_libintl_bindtextdomain", referenced from:
      _common_init in libvim.a(main.o)
      _vim_setenv in libvim.a(misc1.o)
  "_libintl_gettext", referenced from:
      _alloc_does_fail in libvim.a(misc2.o)
      _do_outofmem_msg in libvim.a(misc2.o)
      _lalloc in libvim.a(misc2.o)
      _alloc_id in libvim.a(misc2.o)
      _alloc_clear_id in libvim.a(misc2.o)
      _lalloc_id in libvim.a(misc2.o)
      _find_special_key in libvim.a(misc2.o)
      ...
  "_libintl_ngettext", referenced from:
      _do_bufdel in libvim.a(buffer.o)
      _msgmore in libvim.a(misc1.o)
      _ex_exit in libvim.a(ex_docmd.o)
      _ex_quit in libvim.a(ex_docmd.o)
      _op_shift in libvim.a(ops.o)
      _op_yank in libvim.a(ops.o)
      _op_tilde in libvim.a(ops.o)
      ...
  "_libintl_setlocale", referenced from:
      _common_init in libvim.a(main.o)
      _enc_locale in libvim.a(mbyte.o)
      _get_mess_lang in libvim.a(ex_cmds2.o)
      _set_lang_var in libvim.a(ex_cmds2.o)
      _ex_language in libvim.a(ex_cmds2.o)
      _mac_lang_init in libvim.a(os_mac_conv.o)
  "_libintl_textdomain", referenced from:
      _common_init in libvim.a(main.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
File "caml_startup", line 1:
Error: Error during linking
error: command failed: 'refmterr' 'dune' 'build' '-p' 'Oni2' '-j4' (exited with 1)
esy-build-package: exiting with errors above...
error: build failed with exit code: 1
s0kil commented 5 years ago

Related to https://github.com/onivim/oni2/issues/334#issuecomment-504640687

Hentioe commented 5 years ago

Getting same error on openSUSE Tumbleweed

CrossR commented 5 years ago

Is this still relevant/reproducible with the recent changes to the building of libvim?

heliostatic commented 5 years ago

Still getting this error with aeb167e5d7f1b86a314771c5cd39eea671a1d6c3

``` bash git pull Already up to date. esy install info install 0.5.8 (using package.json) info fetching: done info installing: done esy bootstrap Writing to /Users/bc/Code/oni2/assets/configuration/setup.json... Done! esy build info esy build 0.5.8 (using package.json) ocamlopt src/editor/bin_launcher/Oni2.exe ld: warning: directory not found for option '-L/opt/local/lib' ocamlopt src/editor/bin_editor/Oni2_editor.exe (exit 2) ... ld: warning: directory not found for option '-L/opt/local/lib' Undefined symbols for architecture x86_64: "__nl_msg_cat_cntr", referenced from: _ex_language in libvim.a(ex_cmds2.o) "_libintl_bind_textdomain_codeset", referenced from: _mb_init in libvim.a(mbyte.o) "_libintl_bindtextdomain", referenced from: _common_init in libvim.a(main.o) _vim_setenv in libvim.a(misc1.o) "_libintl_gettext", referenced from: _alloc_does_fail in libvim.a(misc2.o) _do_outofmem_msg in libvim.a(misc2.o) _lalloc in libvim.a(misc2.o) _alloc_id in libvim.a(misc2.o) _alloc_clear_id in libvim.a(misc2.o) _lalloc_id in libvim.a(misc2.o) _find_special_key in libvim.a(misc2.o) ... "_libintl_ngettext", referenced from: _do_bufdel in libvim.a(buffer.o) _msgmore in libvim.a(misc1.o) _ex_exit in libvim.a(ex_docmd.o) _op_shift in libvim.a(ops.o) _op_yank in libvim.a(ops.o) _op_tilde in libvim.a(ops.o) _op_addsub in libvim.a(ops.o) ... "_libintl_setlocale", referenced from: _common_init in libvim.a(main.o) _enc_locale in libvim.a(mbyte.o) _get_mess_lang in libvim.a(ex_cmds2.o) _set_lang_var in libvim.a(ex_cmds2.o) _ex_language in libvim.a(ex_cmds2.o) _mac_lang_init in libvim.a(os_mac_conv.o) "_libintl_textdomain", referenced from: _common_init in libvim.a(main.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) File "caml_startup", line 1: Error: Error during linking error: command failed: 'refmterr' 'dune' 'build' '-p' 'Oni2' '-j4' (exited with 1) esy-build-package: exiting with errors above... error: build failed with exit code: 1 esy: exiting due to errors above ```
saibing commented 5 years ago

@CrossR @heliostatic

I successfully compiled the executable using the latest source code.

CrossR commented 5 years ago

Thanks!

I think @heliostatic is seeing a build error due to xcode versions, so it may be worth updating that. Updating xcode updates clang which looks to be having the issue there.

zbaylin commented 4 years ago

Sorry to revive a dead issue, but I noticed the linking error I get in #1568 is the exact same as what @heliostatic had here.

@heliostatic -- were you ever able to resolve this? I know the closing of this issue was unrelated to your comment, but I didn't know if you had any luck getting Oni to compile on your Mac.

Thanks!