!lymvtcwDJ7ZA9Npq:lix.systems

Lix Development

422 Members
(Technical) development of Lix, the package manager, a Nix implementation. Please be mindful of ongoing technical conversations in this channel.142 Servers

Load older messages


SenderMessageTime
28 Jul 2025
@raitobezarius:matrix.orgraitobezarius install_name_tool is not even a thing at this step I suppose? 20:53:46
@raitobezarius:matrix.orgraitobezariusor meson should do it for me?20:53:51
@raitobezarius:matrix.orgraitobezariusbut if removing flat_namespace means moving everything to lazy initialization in the C++ codebase20:54:16
@raitobezarius:matrix.orgraitobezariusi'm not going to do that cleanup20:54:19
@raitobezarius:matrix.orgraitobezariusi'd rather take this or disable the entire plugin feature for macOS20:54:26
@emilazy:matrix.orgemilyI believe the static initializers should run before any other code in the loaded library20:56:44
@emilazy:matrix.orgemilythough after a quick Google, it may be that you are doing the linking a bit wrong20:57:06
@emilazy:matrix.orgemilye.g. https://github.com/ziglang/zig/issues/13319 https://issues.chromium.org/issues/4027645620:57:21
@emilazy:matrix.orgemily (I haven't tried using static initializers in a dlopen()ed library myself so I have no particular expertise here) 20:57:31
@emilazy:matrix.orgemily (my guess is that if -flat_namespace fixes it it's a cursed side effect) 20:57:51
@raitobezarius:matrix.orgraitobezarius
Static initializers in Rust are not supported and do not work
correctly on Apple platforms, failing compilation and even crashing
lld on iOS.

Replace the Rust-side static initializer with the use of linkme to
collect the registration functions and use a C++ static initializer
to do the registration of the Rust tests.
20:59:14
@raitobezarius:matrix.orgraitobezariuspromising20:59:15
@raitobezarius:matrix.orgraitobezarius

Dyld sees the first padding nulllptr and stops processing initializers further.

21:00:00
@raitobezarius:matrix.orgraitobezariusexciting21:00:01
@raitobezarius:matrix.orgraitobezariusthe end of the chromium thread being "this still doesn't work"21:01:19
@raitobezarius:matrix.orgraitobezariusI think I will need help on this because I don't have the time budget to go down on a linker journey with Apple macOS21:01:38
@raitobezarius:matrix.orgraitobezariusWe can track the usage of flat_namespace as wrong and as an issue, document what we know and process this async21:02:02
@raitobezarius:matrix.orgraitobezarius https://gerrit.lix.systems/c/lix/+/3698/26 awesome 21:08:04
@raitobezarius:matrix.orgraitobezariusthe CI passed but my tests did not21:08:08
@jade_:matrix.orgjade_that looks right, no?21:08:09
@raitobezarius:matrix.orgraitobezarius
In reply to @jade_:matrix.org
that looks right, no?
the underscore yes
21:08:18
@raitobezarius:matrix.orgraitobezariusthe defined yes21:08:22
@jade_:matrix.orgjade_oh yeah it does that21:08:25
@raitobezarius:matrix.orgraitobezariusdlopening it with two level namespaces does not run the static initializers21:08:40
@raitobezarius:matrix.orgraitobezariusi cannot see logs, i cannot register store21:08:45
@raitobezarius:matrix.orgraitobezariusthe plugin is literally useless21:08:49
@jade_:matrix.orgjade_you shouldn't need/want static initializers is the thing21:09:01
@jade_:matrix.orgjade_we are trying to kill those and nix_plugin_entry is guaranteed to be called21:09:11
@jade_:matrix.orgjade_so anything that you'd like to statically initialize can be initialized with that21:10:17
@raitobezarius:matrix.orgraitobezariussure but they're not fully killed yet21:11:06

Show newer messages


Back to Room ListRoom Version: 10