latex-lsp / texlab

An implementation of the Language Server Protocol for LaTeX
GNU General Public License v3.0
1.55k stars 53 forks source link

Support Freebsd OS #369

Closed MuhammadMuradG closed 3 years ago

MuhammadMuradG commented 3 years ago

Hi,

Is there a binary texlab for Freebsd OS. If not how I can build it on Ubuntu for Freebsd, if it is not possible, is there a plan to provide a binary support for freebsd soon.

Thanks in advanced.

pfoerster commented 3 years ago

Hi,

we do not currently provide binaries for FreeBSD. Building texlab for FreeBSD should be possible with the cross tool. I have never tried it but appearently they do support FreeBSD. You can try the following:

cross build --release --target x86_64-unknown-freebsd

If it does not end up working, you can post the compile logs here and I will try to sort things out. I think it should be relatively easy to extend the CI pipeline with a FreeBSD job using the cross tool. I will have a look at it once texlab 3.0.0 is ready.

MuhammadMuradG commented 3 years ago

Thanks for your prompt response.

Following is the compile log:

     Compiling html2md v0.2.10
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-freebsd/lib" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.html2md.821oro00-cgu.0.rcgu.o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.html2md.821oro00-cgu.1.rcgu.o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.html2md.821oro00-cgu.10.rcgu.o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.html2md.821oro00-cgu.11.rcgu.o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.html2md.821oro00-cgu.12.rcgu.o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.html2md.821oro00-cgu.13.rcgu.o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.html2md.821oro00-cgu.14.rcgu.o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.html2md.821oro00-cgu.15.rcgu.o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.html2md.821oro00-cgu.2.rcgu.o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.html2md.821oro00-cgu.3.rcgu.o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.html2md.821oro00-cgu.4.rcgu.o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.html2md.821oro00-cgu.5.rcgu.o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.html2md.821oro00-cgu.6.rcgu.o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.html2md.821oro00-cgu.7.rcgu.o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.html2md.821oro00-cgu.8.rcgu.o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.html2md.821oro00-cgu.9.rcgu.o" "-o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/libhtml2md-d093ac1b7d26a0b3.so" "-Wl,--version-script=/tmp/rustcoTrg6f/list" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-d093ac1b7d26a0b3.2og8mw7vzw4l0bwr.rcgu.o" "-shared" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/root/texlab/target/x86_64-unknown-freebsd/release/deps" "-L" "/root/texlab/target/release/deps" "-L" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-freebsd/lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libpercent_encoding-81832eced1f3dce5.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libmarkup5ever_rcdom-841883e72752dec2.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libhtml5ever-a31127a48a3397e8.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/liblog-0ca3fdf47985889d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libcfg_if-204e23c93ec41585.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libmarkup5ever-5b27ef84492f6733.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libstring_cache-9723c12f782c9285.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libprecomputed_hash-a8ab9e5514cd425f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libserde-272f50e658c18710.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libphf-a4a6a6f98d8a941a.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libphf_shared-53b5798f09f043fb.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libsiphasher-a9c354de2b9c0e4c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libtendril-74e8bd7730d8e637.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libutf8-d238a94b80b76a3d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libfutf-0a29d9da8014c01e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libdebug_unreachable-dd83463fe8b6c932.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libmac-e963a04ca25eba2d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libregex-c4196a13d6148599.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libthread_local-68f7f809e1fe94ba.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libregex_syntax-f89294accdd8a94f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libaho_corasick-47df63635f4b089e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/libmemchr-711c2abc999713e5.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcoTrg6f/liblazy_static-4a56fd51fafa980e.rlib" "-Wl,--no-whole-archive" "-Wl,--start-group" "-L" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-freebsd/lib" "-Wl,-Bdynamic" "-lstd-e8bd50e91075fa91" "-Wl,--end-group" "-Wl,-Bstatic" "/tmp/rustcoTrg6f/libcompiler_builtins-6179aa5ca803c189.rlib" "-Wl,-Bdynamic" "-lexecinfo" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lrt" "-lutil" "-lutil"
  = note: /usr/bin/ld: cannot find -lexecinfo
          collect2: error: ld returned 1 exit status

error: aborting due to previous error

error: could not compile `html2md`
pfoerster commented 3 years ago

Thank you for the compile log. It looks like one of our dependencies, namely html2md, does not compile on FreeBSD at the moment. For now, you can disable the citation feature (which converts BibTeX entries to markdown) to obtain a build of texlab, which does not use that crate. You can try the following:

cargo build --release --no-default-features --features "server"
MuhammadMuradG commented 3 years ago

I tried the following and the compilation succeeded, but the binary does not work:

cargo build --release --no-default-features --features "server"

So, I tried the following:

cross build --release --no-default-features --features "server" --target x86_64-unknown-freebsd

which is produce the following error:

Compiling texlab v2.2.2 (/root/texlab)
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-freebsd/lib" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/texlab-487ceaf3db4ddd14.texlab.bhok477k-cgu.3.rcgu.o" "-o" "/root/texlab/target/x86_64-unknown-freebsd/release/deps/texlab-487ceaf3db4ddd14" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/root/texlab/target/x86_64-unknown-freebsd/release/deps" "-L" "/root/texlab/target/release/deps" "-L" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-freebsd/lib" "-Wl,--start-group" "-Wl,--end-group" "-Wl,-Bstatic" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-freebsd/lib/libcompiler_builtins-6179aa5ca803c189.rlib" "-Wl,-Bdynamic" "-lutil" "-lutil" "-lexecinfo" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lrt" "-lutil" "-lutil"
  = note: /usr/bin/ld: cannot find -lexecinfo
          collect2: error: ld returned 1 exit status

error: aborting due to previous error

error: could not compile `texlab`
pfoerster commented 3 years ago

I looked again at the documentation of cross and i think that you have to build a GCC cross compiler before-hand. Maybe this gist can be helpful:

https://gist.github.com/bijanebrahimi/62596745808f8667c40ff91b07d9e7b8

MuhammadMuradG commented 3 years ago

I looked again at the documentation of cross and i think that you have to build a GCC cross compiler before-hand. Maybe this gist can be helpful: https://gist.github.com/bijanebrahimi/62596745808f8667c40ff91b07d9e7b8`

@pfoerster It seems as you mention, the problem was in the compiler. However, I have been able to build it in a Freebsd Virtual Machine, and it is work perfectly. Maybe, it is time to add binary file to repository as a release.

pfoerster commented 3 years ago

Maybe, it is time to add binary file to repository as a release.

This needs to be done automatically during the CI pipeline. To be honest, I do not want to spin up a VM every time I make a new release. This would quickly get out of hand otherwise. Closing this one in favor of #320.

MuhammadMuradG commented 3 years ago

@pfoerster Ok, how I can help to automate this process?

pfoerster commented 3 years ago

I already tried using the FreeBSD GitHub Action but it is way too slow since it needs to download a large VM in a macOS environment. A better approach would be to create another job that installs the Zig compiler for the C/C++ toolchain, which is much more lightweight. This can be done on a Ubuntu-18.04 runner. You can follow the following article:

https://actually.fyi/posts/zig-makes-rust-cross-compilation-just-work/

I think the same principle applies to FreeBSD. I will be very happy to review and test a PR that extends our CI workflows (main.yml and deploy.yml). You can start by forking this repository and updating the workflow files.

MuhammadMuradG commented 3 years ago

@pfoerster Well, I tried to build it with zig compiler, but the compiler fails and produce the following error:

error: linking with `/home/ubuntu/Projects/Texlab/zcc.sh` failed: exit code: 1
  |
  = note: "/home/ubuntu/Projects/Texlab/zcc.sh" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/home/ubuntu/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-freebsd/lib" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.html2md.7eap4rrg-cgu.0.rcgu.o" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.html2md.7eap4rrg-cgu.1.rcgu.o" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.html2md.7eap4rrg-cgu.10.rcgu.o" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.html2md.7eap4rrg-cgu.11.rcgu.o" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.html2md.7eap4rrg-cgu.12.rcgu.o" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.html2md.7eap4rrg-cgu.13.rcgu.o" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.html2md.7eap4rrg-cgu.14.rcgu.o" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.html2md.7eap4rrg-cgu.15.rcgu.o" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.html2md.7eap4rrg-cgu.2.rcgu.o" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.html2md.7eap4rrg-cgu.3.rcgu.o" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.html2md.7eap4rrg-cgu.4.rcgu.o" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.html2md.7eap4rrg-cgu.5.rcgu.o" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.html2md.7eap4rrg-cgu.6.rcgu.o" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.html2md.7eap4rrg-cgu.7.rcgu.o" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.html2md.7eap4rrg-cgu.8.rcgu.o" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.html2md.7eap4rrg-cgu.9.rcgu.o" "-o" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/libhtml2md-923ea1538c473d17.so" "-Wl,--version-script=/tmp/rustcqaqScg/list" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps/html2md-923ea1538c473d17.xwfoxsvfoxfqujg.rcgu.o" "-shared" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/home/ubuntu/Projects/Texlab/texlab/target/x86_64-unknown-freebsd/release/deps" "-L" "/home/ubuntu/Projects/Texlab/texlab/target/release/deps" "-L" "/home/ubuntu/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-freebsd/lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libpercent_encoding-e4ecf5054fbf11e7.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libmarkup5ever_rcdom-ff5ae311d8c3f3d8.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libhtml5ever-23471aff00cb71da.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/liblog-906b443f3563ec25.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libcfg_if-5222ece6dfd70946.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libmarkup5ever-fde220dede02c7d5.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libstring_cache-e6872a6fe422664f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libprecomputed_hash-dd8c5683d312d574.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libserde-f1b07a76212c0260.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libphf-0ef2aa0b552ea2b8.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libphf_shared-ad2acb0a90226694.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libsiphasher-a1c56c2e143bcbe3.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libtendril-81577a2e3f25e618.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libutf8-bd8390fc4b08854b.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libfutf-2ee0b39cab6445e2.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libdebug_unreachable-a64bf3cca794d165.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libmac-058e628339a49eaf.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libregex-d260dc74fd36e4c7.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libaho_corasick-a53299265fd5dda6.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libmemchr-e59db5018223991d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/libregex_syntax-121167579639c2f6.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcqaqScg/liblazy_static-f28ad5a622eb4dd9.rlib" "-Wl,--no-whole-archive" "-Wl,--start-group" "-L" "/home/ubuntu/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-freebsd/lib" "-Wl,-Bdynamic" "-lstd-2d60916020c484b5" "-Wl,--end-group" "-Wl,-Bstatic" "/tmp/rustcqaqScg/libcompiler_builtins-ac1bda4792cf293b.rlib" "-Wl,-Bdynamic" "-lexecinfo" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lrt" "-lutil" "-lutil"
  = note: warning: unsupported linker arg: --as-needed
          warning: unsupported linker arg: -z noexecstack
          warning: unsupported linker arg: --version-script=/tmp/rustcqaqScg/list
          warning: unsupported linker arg: -zrelro
          warning: unsupported linker arg: -znow
          warning: unsupported linker arg: -Bstatic
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: --whole-archive
          warning: unsupported linker arg: --no-whole-archive
          warning: unsupported linker arg: -Bdynamic
          warning: unsupported linker arg: -Bstatic
          warning: unsupported linker arg: -Bdynamic
          error: LibCInstallationNotAvailable

error: aborting due to previous error

error: could not compile `html2md`

To learn more, run the command again with --verbose.

After some search I found this issue ziglang/zig#2876 and as I understand this is what makes this error arise.

MuhammadMuradG commented 3 years ago

@pfoerster I write the following script to build gcc cross compile for freebsd on ubuntu: cross compiler. Is this will help?

pfoerster commented 3 years ago

@MuhammadMouradG This looks promising. Have you tried it out? How much time does it take to build the cross compiler?

MuhammadMuradG commented 3 years ago

@pfoerster For first part that downloads the important files will depend on the internet speed and as I remember it does not take a lot of time (300M). The most part that takes a lot of time is building the compiler. However, as I remember the all process (download, build and install) take around 1 Hour. I worked on the VM with 2 CPUs, I don't know if this will effect on the building time.

pfoerster commented 3 years ago

However, as I remember the all process (download, build and install) take around 1 Hour.

That is quite a lot of time. I think at this point we are better off adding another CI runner in addition to GitHub actions. I have just seen that Travis now supports FreeBSD. Give me a few days and I'll try to work something out.

clason commented 3 years ago

Maybe sourcehut? It's what neovim uses for xBSD CI.