luamake icon indicating copy to clipboard operation
luamake copied to clipboard

[question] consider *BSD support

Open drscream opened this issue 3 years ago • 19 comments

As your luamake is used in many other LUA project might you consider looking into BSD (FreeBSD, NetBSD) support?

If it's not possible because of missing build (or development) machine I'm more than welcome to sponsor shell access.

drscream avatar Jun 27 '22 08:06 drscream

As your luamake is used in many other LUA project might you consider looking into BSD (FreeBSD, NetBSD) support?

Of course.

If it's not possible because of missing build (or development) machine I'm more than welcome to sponsor shell access.

I would be very grateful if you could provide it.

actboy168 avatar Jun 27 '22 09:06 actboy168

You should have received an email with login details to two virtual machines. If you need anything feel free to contact me via mail.

drscream avatar Jun 28 '22 11:06 drscream

Thanks, if there is any progress I will sync in this issue.

actboy168 avatar Jun 29 '22 02:06 actboy168

NetBSD/FreeBSD is now supported, except

  • [x] install script
  • [x] bee.filewatch
  • [ ] bee.filesystem.fullpath

actboy168 avatar Jun 30 '22 02:06 actboy168

Awesome thanks a lot! Maybe the bee.filewatch and bee.filesystem.fullpath are supported in the future as well :-)

drscream avatar Jun 30 '22 07:06 drscream

Awesome thanks a lot! Maybe the bee.filewatch and bee.filesystem.fullpath are supported in the future as well :-)

I don't know much about netbsd, so I don't know how to implement fullpath. It's not an important api though, and it shouldn't matter much without it.

filewatch I already know how to implement it. But I need time.

actboy168 avatar Jul 01 '22 03:07 actboy168

Hi, could you also consider to support OpenBSD OS ?

I would like to build/use sumneko/lua-language-server with OpenBSD but for the moment, impossible without luamake support.

lcheylus avatar Aug 13 '22 17:08 lcheylus

@lcheylus Sorry, I don't have a test environment for OpenBSD. Maybe you can try to fix it and provide a pull request?

actboy168 avatar Aug 15 '22 01:08 actboy168

@lcheylus Sorry, I don't have a test environment for OpenBSD. Maybe you can try to fix it and provide a pull request?

OK, I have a WIP to port luamake on OpenBSD :

./compile/install.sh
[0/1] Run test.
OS:             OpenBSD
Arch:           x86_64
Compiler:       GCC 11.2.0
CRT:            libstdc++ 20210728
DEBUG:          false
.................................................................................................F..
Failed tests:
-------------
1) filewatch.test_2
3rd/bee.lua/test/test_filewatch.lua:67: expected: nil, actual: <userdata:/tmp/test_bee/temp/test1.txt>
stack traceback:
        3rd/bee.lua/test/test_filewatch.lua:67: in local 'assertHas'
        3rd/bee.lua/test/test_filewatch.lua:70: in local 'f'
        3rd/bee.lua/test/test_filewatch.lua:24: in upvalue 'test'
        3rd/bee.lua/test/test_filewatch.lua:36: in upvalue 'filewatch.test_2'

Ran 100 tests in 0.800 seconds, 99 successes, 1 failures

I will create a PR to add OpenBSD support to your tool.

lcheylus avatar Aug 16 '22 08:08 lcheylus

Same issue...

[0/1] Run test.
OS:             FreeBSD
Arch:           x86_64
Compiler:       GCC 11.3.0
CRT:            libstdc++ 20220421
DEBUG:          false
.................................................................................................F..
Failed tests:
-------------
1) filewatch.test_2
3rd/bee.lua/test/test_filewatch.lua:67: expected: nil, actual: <userdata:/tmp/test_bee/temp/test1.txt>
stack traceback:
        3rd/bee.lua/test/test_filewatch.lua:67: in local 'assertHas'
        3rd/bee.lua/test/test_filewatch.lua:70: in local 'f'
        3rd/bee.lua/test/test_filewatch.lua:24: in upvalue 'test'
        3rd/bee.lua/test/test_filewatch.lua:36: in upvalue 'filewatch.test_2'

Ran 100 tests in 0.398 seconds, 99 successes, 1 failures
FAILED: build/freebsd/obj/test.stamp
build/freebsd/bin/luamake 3rd/bee.lua/test/test.lua --touch build/freebsd/obj/test.stamp
ninja: build stopped: subcommand failed. 

@lcheylus, were you able to resolve that issue by chance? There is a chance the fix may be portable to FreeBSD.

seannaswell avatar Sep 08 '22 06:09 seannaswell

@seannaswell, strange seeing you here.

@lcheylus Does this mean that you were successful at compiling luamake using gcc-11.2.0p3? If so, what alterations did you make to the installation script to achieve success? Did you just accept the same parameters for OpenBSD as used for NetBSD?

(grunts, nonchalantly)...this "making it compatible" game gets old after a while...

anoduck avatar Sep 09 '22 05:09 anoduck

@anoduck, yeah, I'm also playing the making it compatible game...

seannaswell avatar Sep 09 '22 06:09 seannaswell

@seannaswell No, I still have an issue with test_filewatch.lua test. I didn't continue my work on porting luamake to OpenBSD since several weeks.

@anoduck Yes, I have a successfull build of luamake using gcc-11.2.0p3 on OpenBSD. I created a new Ninja configuration file compile/ninja/openbsd.ninja and modified some commands for paths, includes and libs.

lcheylus avatar Sep 12 '22 08:09 lcheylus

@lcheylus Wow...totally awesome!

In CURRENT though, gcc-11.2.0p3 conflicts with gcc-libs-8.4.0p12 which is required by blas, cblas, lapack, and py3-numpy. Assuming luamake is not compatible with the older gcc-8.4, it might be a while until these required dependencies are updated to the newer version of gcc.

anoduck avatar Sep 13 '22 06:09 anoduck

@actboy168 I built and test luamake/bee.lua with your last commits for OpenBSD support (https://github.com/actboy168/luamake/commit/b806f0f2de7a759b9f8e19a759578e3aeecd54e5) :

  • build OK on OpenBSD-current/amd64 (future version 7.2)
  • tests OK except for 3rd/bee.lua/test/test_filewatch.lua : same errors than with my port on OpenBSD

You were faster than me to commit OpenBSD support. I was just reviewing my code to create a pull-request, your modifications are very similar to mine.

lcheylus avatar Sep 15 '22 15:09 lcheylus

@lcheylus @seannaswell bee.lua now implements filewatch using libinotify-kqueue on *BSD.Linux and *BSD use the same code, but the results are not consistent. It might be a bug in libinotify-kqueue, or maybe I'm missing something. I might rewrite it with kqueue in the future.

actboy168 avatar Sep 23 '22 06:09 actboy168

Will give this a go here shortly, thanks for the update.

seannaswell avatar Oct 05 '22 17:10 seannaswell

@seannaswell would you be interested in testing out edgevpn

(Sorry, for hijacking the thread, the only way to contact a fellow bsd guy... who might be interested.)

anoduck avatar Oct 11 '22 08:10 anoduck

So, it was not pretty, but it appears the compilation of lua-language-server was successful for me as well. Which, I am so totally stoked about.

So, grateful for the help of everyone in this thread. Much love and thanks to you all.

anoduck avatar Nov 26 '22 06:11 anoduck

Just to confirm, bee.lua now appears to compile fine on FreeBSD. Many thanks.

seannaswell avatar Nov 30 '22 04:11 seannaswell