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 failure on arch linux #185

Closed
aca opened this issue Jun 29, 2020 · 9 comments
Closed

Build failure on arch linux #185

aca opened this issue Jun 29, 2020 · 9 comments
Labels
compile Related to compiling the server from source

Comments

@aca
Copy link

aca commented Jun 29, 2020

Following guide https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone)
But failed to build from source.
I'm sorry but I have no experience with lua nor ninja. Any help would be greatly appreciated.

λ  cd 3rd/luamake
   ninja -f ninja/linux.ninja
   cd ../..
   ./3rd/luamake/luamake rebuild
[0/3] cd 3rd/bee.lua && ninja -f ninja/linux.ninja
[2/2] build/linux/bin/bootstrap test/test.lua
FAILED: build/linux/_/test
build/linux/bin/bootstrap test/test.lua
OS:             Linux
Arch:           64
Compiler:       GCC 10.1.0
CRT:            libstdc++ 20200507
DEBUG:          false
....
ninja: build stopped: subcommand failed.
FAILED: build/linux/_/bee
cd 3rd/bee.lua && ninja -f ninja/linux.ninja
ninja: build stopped: subcommand failed.
fish: Unknown command: ./3rd/luamake/luamake
fish:
./3rd/luamake/luamake rebuild
^
127 λ  uname -a
Linux rok-tp6 5.7.6-arch1-1 #1 SMP PREEMPT Thu, 25 Jun 2020 00:14:47 +0000 x86_64 GNU/Linux

λ  g++ --version
g++ (GCC) 10.1.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

λ  ninja --version
1.10.0
@actboy168 actboy168 added the compile Related to compiling the server from source label Jul 1, 2020
@intrntbrn
Copy link

Same for me. My output is a little bit more verbose, hence here it is:

$ ninja -f ninja/linux.ninja
[0/3] cd 3rd/bee.lua && ninja -f ninja/linux.ninja
[19/57] Compile C   build/linux/obj/source_lua/lstring.obj
In function ‘createstrobj’,
    inlined from ‘luaS_createlngstrobj’ at 3rd/lua/lstring.c:170:17,
    inlined from ‘luaS_newlstr’ at 3rd/lua/lstring.c:240:10:
3rd/lua/lstring.c:164:17: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  164 |   getstr(ts)[l] = '\0';  /* ending 0 */
In file included from 3rd/lua/ldebug.h:11,
                 from 3rd/lua/lstring.c:17:
3rd/lua/lstring.c: In function ‘luaS_newlstr’:
3rd/lua/lstate.h:315:18: note: at offset 0 to object ‘ts’ with size 24 declared here
  315 |   struct TString ts;
      |                  ^~
[57/57] build/linux/bin/bootstrap test/test.lua
FAILED: build/linux/_/test
build/linux/bin/bootstrap test/test.lua
OS:       	Linux
Arch:     	64
Compiler: 	GCC 10.1.0
CRT:      	libstdc++ 20200507
DEBUG:    	false
....
ninja: build stopped: subcommand failed.
FAILED: build/linux/_/bee
cd 3rd/bee.lua && ninja -f ninja/linux.ninja
ninja: build stopped: subcommand failed.
$ ninja --version
1.10.0
$ g++ --version
g++ (GCC) 10.1.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ uname -r
5.7.6-arch1-1

@wbthomason
Copy link

I believe this is the same as #160 (comment), which was related to actboy168/bee.lua#8. If @sumneko can update the version of bee.lua used by luamake in this project, hypothetically the issue is fixed (though I haven't tested the fix for actboy168/bee.lua#8 yet myself).

@aca
Copy link
Author

aca commented Jul 3, 2020

@wbthomason Thanks.

Cloning into '/home/rok/tmp/xxx/lua-language-server/3rd/rcedit'...
Submodule path '3rd/bee.lua': checked out '8ae1c1944b4190a75f0dfc539a6ea5910bebdc5f'
Submodule path '3rd/lni': checked out '8222dc4faa62183a594f44466ebcd39ab91632c7'

But even with latest "bee.lua" submodules. Get the same error as @intrntbrn

@aca
Copy link
Author

aca commented Jul 3, 2020

I just installed with commit 38939bd
Anyone having issues with nvim_lsp. Try this.

# you have to install it here, if not you have to customize nvim-lsp setting
cd ~/.cache/nvim/nvim_lsp/sumneko_lua
git clone https://github.com/sumneko/lua-language-server.git
git checkout 38939bd2c062c4a04e0b7cc84f2d92dec61a80b6
git submodule update --init --recursive
cd 3rd/luamake
ninja -f ninja/linux.ninja
cd ../..
./3rd/luamake/luamake rebuild

@actboy168
Copy link
Collaborator

This is a gcc bug.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96040

@runiq
Copy link

runiq commented Jul 10, 2020

The current version of the luamake submodule uses an old version of bee.lua and needs to be updated to actboy168/luamake@bf2ba0a. Until then, do this before the build step:

(cd 3rd/luamake && git fetch && git rebase master && git submodule update --init --recursive)

Then just follow the usual instructions.

@wbthomason
Copy link

The current version of the luamake submodule uses an old version of bee.lua and needs to be updated to actboy168/luamake@bf2ba0a.

@sumneko: Could you please update this submodule when you get a chance? Thanks!

@sumneko
Copy link
Collaborator

sumneko commented Jul 16, 2020

@wbthomason Have updated.

@wbthomason
Copy link

@sumneko It works great, thank you! The build no longer fails for me.
Also thanks @actboy168 for the fix in bee.lua!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compile Related to compiling the server from source
Projects
None yet
Development

No branches or pull requests

6 participants