!lymvtcwDJ7ZA9Npq:lix.systems

Lix Development

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

Load older messages


SenderMessageTime
28 Jul 2025
@emilazy:matrix.orgemilyif you are trying to do preload type stuff I am not sure what the correct solution is (it may be "don't do that")20:52:11
@emilazy:matrix.orgemily but maybe you can install_name_tool to adjust the internal name 20:52:40
@emilazy:matrix.orgemily with -id or such 20:52:48
@raitobezarius:matrix.orgraitobezariuswhat i'm seeing is20:53:06
@raitobezarius:matrix.orgraitobezarius (a) if i set -flat_namespace, static initializers seems to run 20:53:15
@raitobezarius:matrix.orgraitobezarius(b) if i don't, they don't20:53:18
@raitobezarius:matrix.orgraitobezariusso how can I get static initializers to run in plugins on macOS? :D20:53:33
@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

Show newer messages


Back to Room ListRoom Version: 10