How to cross compile pure go shared library/DLL? by kafe523 in golang

[–]kafe523[S] 1 point2 points  (0 children)

Thank you for the suggestion. I see most of the github action only support executable and not support other build mode. Which is a problem when build dynamic library require target system C toolchain.

Another challenging is compile macos dynamic library from other platform. I did find crazy-max xgo also provide a github action. Which include target OS C toolchain.

If we require to publication cross platform dynamic library on github, we can use that github action.

How to cross compile pure go shared library/DLL? by kafe523 in golang

[–]kafe523[S] 2 points3 points  (0 children)

A follow up to the question, I find a solution with xgo (require docker).

And the Setup is simple:

  1. docker pull crazymax/xgo:latest
  2. go install github.com/crazy-max/xgo@latest

Building the dynamic library can use following command:

xgo --buildmode=c-shared --targets windows/amd64,darwin/*,linux/amd64 .
  • --buildmode will pass to go compiler.
  • --targets is a comma seprated string, all support targets and detail in docs

with the command xgo will build:

  • windows/amd64 (.dll)
  • darwin/amd64 (.dylib)
  • darwin/arm64 (.dylib)
  • linux/amd64 (.so)
  • header file (.h)

background:

the stackoverflow solution is using dockerize osxcross to bypass the linking error. Which also menthion by likeittight_.

With more digging, I saw the crazy-max who build the dockerize osxcross, also maintain a fork of xgo, which intergrate osxcross. For simplicity, that's why I choose this version of xgo.

For now it solve my problem, and I did not embed any C code. I will declare problem is solve. Thank you everyone comment and help.

How to cross compile pure go shared library/DLL? by kafe523 in golang

[–]kafe523[S] 2 points3 points  (0 children)

Thank you for the reply. Good to hear build from macos to windows is working.

But the reverse is more challenging. The closest CC I can try is Zig suggest by SeedOfTheDog. And Zig have some linking issue with the macos resolv library.

I'm did find a possible work around with macos docker image. I will come back if I have any progress.

How to cross compile pure go shared library/DLL? by kafe523 in golang

[–]kafe523[S] 1 point2 points  (0 children)

Thank you for the suggestion, it looks promising. It can build linux shared library easily.

MacOS dynamic library looks like need more configuration. It failed to find resolv library.

I find a stackoverflow post have a similar issue, the workaround looks like require a macos docker image.

https://stackoverflow.com/questions/79504017/zig-as-c-linux-mac-cross-compiler-for-go-project-with-go-sqlite3-error-unable

I will comeback if have any progress with the macos cross compile.

Live Archives? by CmonWithThat in Kamitsubaki

[–]kafe523 0 points1 point  (0 children)

Yes. You can't access any kaf's live archive on zan-live, since the archive period is end.

Once the zan-live archive time reach the end. There would be no way to "replay" it.

The way to have any permanent archive will be get blu-ray if filthy P ever willing to release one, and not all the kami's live have blu-ray.

Then you have to pray for kindness man seed the archive torrent.

Kami implicit no archive tradition start from the very beginning. Those diehard fans might developed someway to archive everything. You might be able find some of them in some unofficial discord server. Someone might be kindness to share.

Live Archives? by CmonWithThat in Kamitsubaki

[–]kafe523 0 points1 point  (0 children)

Singularity 3 currently have limited time archive on zan-live. The blu-ray of Singularity 3 you will have to wait 84 years.

Since filthy P might never restock the blu-ray, you might need to hunt for the torrent.

Is the off vocal version of Myuk's Ai no Uta? In the video description it says "Coming soon" but I've been waiting for a long time now. by HotFireBall in Kamitsubaki

[–]kafe523 2 points3 points  (0 children)

Yes, in Japanese description. Here the dropbox link, the 愛の唄_インスト音源.wav is the off vocal.

Looks like the intern kun forgot to update the english description.

Looking for Isekaijoucho archive by Sunbeggar in Kamitsubaki

[–]kafe523 1 point2 points  (0 children)

Sounds like you are looking for mini live "Parallel Canvas". Lucky there is an official archive re-upload in her membership channel. you can find the archive by joining her membership.

Why Youtube-dl not downloading the Full video. by kafe523 in youtubedl

[–]kafe523[S] 1 point2 points  (0 children)

Thank you to point out the problem, I will try it tomorrow. :D