Stream: compiler development

Topic: zig compiler - building for apt


view this post on Zulip Richard Feldman (Feb 07 2025 at 18:00):

if I remember right, I think Debian wants additions to apt to link libraries dynamically if those libraries are part of apt (or something like that)

view this post on Zulip Richard Feldman (Feb 07 2025 at 18:01):

if that's right, we might want to look into having the build be configurable to either statically or dynamically link libc, llvm, and lld

view this post on Zulip Richard Feldman (Feb 07 2025 at 18:01):

since dynamically is what apt might want

view this post on Zulip Richard Feldman (Feb 07 2025 at 18:03):

and of course anyone using Debian, Ubuntu, etc would want to do apt-get install roc, so it seems reasonable to think about that use case in advance :big_smile:

view this post on Zulip Anton (Feb 07 2025 at 18:37):

Richard Feldman said:

if I remember right, I think Debian wants additions to apt to link libraries dynamically if those libraries are part of apt (or something like that)

Yes:

Some software packages include in their distribution convenience copies of code from other software packages, generally so that users compiling from source don’t have to download multiple packages. Debian packages should not make use of these convenience copies unless the included package is explicitly intended to be used in this way. 16 If the included code is already in the Debian archive in the form of a library, the Debian packaging should ensure that binary packages reference the libraries already in Debian and the convenience copy is not used. If the included code is not already in Debian, it should be packaged separately as a prerequisite if possible. 17

From https://www.debian.org/doc/debian-policy/ch-source.html#embedded-code-copies

view this post on Zulip Anton (Feb 07 2025 at 18:39):

Richard Feldman said:

if that's right, we might want to look into having the build be configurable to either statically or dynamically link libc, llvm, and lld

I'll add this to my TODO's :)

view this post on Zulip Brendan Hansknecht (Feb 08 2025 at 01:51):

dynamically link llvm

llvm doesn't actually support this (at least not officially, I guess it could be tried though).

view this post on Zulip Brendan Hansknecht (Feb 08 2025 at 01:51):

from https://libc.llvm.org/

Warning: LLVM-libc is not yet ABI stable; currently only static linking is supported

view this post on Zulip Richard Feldman (Feb 08 2025 at 01:55):

huh, TIL!

view this post on Zulip Richard Feldman (Feb 08 2025 at 01:55):

well that certainly simplifies things haha

view this post on Zulip Richard Feldman (Feb 08 2025 at 01:55):

although I think llvm may have more dependencies than just libc, if I remember right

view this post on Zulip Richard Feldman (Feb 08 2025 at 01:56):

possibly z3?

view this post on Zulip Brendan Hansknecht (Feb 08 2025 at 02:12):

https://llvm.org/docs/GettingStarted.html#software

view this post on Zulip Richard Feldman (Feb 08 2025 at 02:37):

also for reference, zig itself recently landed in apt: https://ftp-master.debian.org/new/zig0.13_0.13.0+dfsg-1.html

view this post on Zulip Richard Feldman (Feb 08 2025 at 02:39):

and it appears that the name roc is available :grinning_face_with_smiling_eyes:

view this post on Zulip Sam Mohr (Feb 08 2025 at 02:40):

Beating the Rocq name confusion allegations, one package at a time

view this post on Zulip Sam Mohr (Feb 08 2025 at 02:40):

Really not worried about that, as an aside

view this post on Zulip Richard Feldman (Feb 08 2025 at 02:41):

also available on nixpkgs

view this post on Zulip Sam Mohr (Feb 08 2025 at 02:42):

Soooo maybe we should try to reserve those ASAP?

view this post on Zulip Richard Feldman (Feb 08 2025 at 02:48):

I don't think reserving them is really a thing

view this post on Zulip Richard Feldman (Feb 08 2025 at 02:48):

we talked about it years ago

view this post on Zulip Sam Mohr (Feb 08 2025 at 02:49):

At least for nixpkgs, I'm sure we could put out a v0.0.1 dummy. I think squatting would be okay here. We could even do it for our v0.0.0-alpha1

view this post on Zulip Sam Mohr (Feb 08 2025 at 02:49):

Other package managers, I'm not sure

view this post on Zulip Sam Mohr (Feb 08 2025 at 02:49):

I understand not wanting to set the expectation that we're making releases

view this post on Zulip Sam Mohr (Feb 08 2025 at 02:50):

But I think it's worse for us to lose roc

view this post on Zulip Sam Mohr (Feb 08 2025 at 02:50):

I'm sure the odds of that happening are really low

view this post on Zulip Sam Mohr (Feb 08 2025 at 02:50):

But, you never know

view this post on Zulip jan kili (Feb 08 2025 at 20:32):

Richard Feldman said:

also for reference, zig itself recently landed in apt: https://ftp-master.debian.org/new/zig0.13_0.13.0+dfsg-1.html

I wonder why it doesn't appear in Debian's package search or on Zig's installation guide page.

view this post on Zulip Richard Feldman (Feb 08 2025 at 20:39):

I think it's been newly added but hasn't made it into a stable distro release yet

view this post on Zulip Brendan Hansknecht (Feb 08 2025 at 20:42):

Kinda surprising it isn't in sid (unstable) yet if it was merged a month ago

view this post on Zulip Andrew Kelley (Feb 08 2025 at 20:52):

maybe it hasn't been approved by the ftp masters yet

view this post on Zulip Anton (Feb 26 2025 at 17:37):

I'm going to try to get roc on nixpkgs

view this post on Zulip Anton (Feb 28 2025 at 12:26):

What should our brief description be on nixpkgs for roc? This will show up if you search for Roc on https://search.nixos.org/packages
Examples:

view this post on Zulip Sam Mohr (Feb 28 2025 at 12:44):

"Fast, friendly, and functional programming language"

view this post on Zulip Richard Feldman (Feb 28 2025 at 15:06):

I'd just say "Fast, friendly, functional programming language"

view this post on Zulip Anton (Mar 03 2025 at 17:40):

I've got a package.nix file working on macos aarch64+x86 and linux aarch64+x86 now it's just the formalities :)

view this post on Zulip Anton (Mar 05 2025 at 15:24):

My PR is up on nixpkgs, please give it a thumbs up on github so it doesn't get forgotten in the ocean of nixpkgs commits :p


Last updated: Jul 06 2025 at 12:14 UTC