lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

freebsd 13.2 can not compile ,, it bugs

Open jiadsii opened this issue 2 years ago • 11 comments

How are you using the lua-language-server?

Other

Which OS are you using?

Other

What is the issue affecting?

Other

Expected Behaviour

when i try to compile this in freebsd, it cannot coplete in once, and it reports error

Actual Behaviour

i think it never compile in freebsd 13.2

and i hope it can add a package for freebsd

Reproduction steps

i just do according to the document.

Additional Notes

No response

Log File

No response

jiadsii avatar Oct 08 '23 04:10 jiadsii

Does it work better on FreeBSD 14.0-RELEASE? What are the exact commands run and the error message encountered?

nospam2998 avatar Dec 21 '23 11:12 nospam2998

I am also on FreeBSD 13.2. Here's my output from make.sh, if that helps.

output.txt

brianreichtcs avatar Mar 12 '24 14:03 brianreichtcs

Thanks @brianreichtcs for logs and steps to reproduce. I get similar results with FreeBSD 14.0-RELEASE.

At least some of the errors seems to be from bee.lua, which is a submodule of lua-language-server. A brief look at the source code indicates that the BSD code merely points at the linux implementation. Without properly reading nor understand the details, I see mentions of inotify which natively is a linux specific API. An interesting quote from bee.lua#42 reads:

filewatch on freebsd is incomplete. filewatch depends on libinotify-kqueue, but unfortunately libinotify-kqueue doesn't work correctly.

Furthermore bee.lua#12 states that lua-language-server is unlikely to use filewatch, so the failing tests should be safe to ignore.

As far as I know, lua-language-server does not use filewatch, you can ignore this test.

Maybe it is possible add conditionals around irrelevant functionality and their tests? Either in bee.lua, lua-language-server or in the ports tree. I will unfortunately not be able to attempt that anytime soon though.

nospam2998 avatar Mar 12 '24 16:03 nospam2998

Fair enough :) I'm trying to work my team out of the FreeBSD business for exactly reasons like this. I thought given some more information maybe there'd be an existing solution, but didn't expect anyone to spend time on this to solve the issue for the 6 people it will impact. Thanks for looking it over, and thanks for all your efforts! Looking forward to using this package when we port over to Linux.

brianreichtcs avatar Mar 12 '24 16:03 brianreichtcs

These instructions seem to work on my FreeBSD 14.0 system - I needed to 'silence' two tests ...

# pkg install ninja

% git clone https://github.com/LuaLS/lua-language-server.git

% cd lua-language-server

% :> 3rd/bee.lua/test/test.lua

% :> test.lua

% ./make.sh

% ./bin/lua-language-server
Content-Length: 120

{"jsonrpc":"2.0","method":"$/status/report","params":{"text":"Lua","tooltip":"Cached files: 0/0\nMemory usage: 2M"}}

vermaden avatar Mar 14 '24 12:03 vermaden

These instructions seem to work on my FreeBSD 14.0 system - I needed to 'silence' two tests ...

# pkg install ninja

% git clone https://github.com/LuaLS/lua-language-server.git

% cd lua-language-server

% :> 3rd/bee.lua/test/test.lua

% :> test.lua

% ./make.sh

% ./bin/lua-language-server
Content-Length: 120

{"jsonrpc":"2.0","method":"$/status/report","params":{"text":"Lua","tooltip":"Cached files: 0/0\nMemory usage: 2M"}}

Skipping the tests as you demonstrated makes the build succeed. Thanks so much!

brianreichtcs avatar Apr 01 '24 14:04 brianreichtcs

For what it is worth, I tried and failed to package up a port. The attempt is available under this LuaLS branch.

Successful creation of a port would likely need to address a few issues. Among those:

  • This software has no release tar balls, and due to using submodules for dependencies it is only buildable from within its git repository.
  • All users launching this software needs to have write access to log files, which becomes under $PREFIX with my porting attempt.
  • The compiled resulting binary fails to start with an error message about not finding bootstrap.lua, it also appears to look for main.lua directly in the root of $PREFIX/.

I'm giving up on creating this port for now. I still think it would be great to properly package this stuff though.

nospam2998 avatar Jun 22 '24 15:06 nospam2998