Stream: beginners

Topic: Linker error running `roc glue` tests


view this post on Zulip David Smith (May 15 2023 at 23:31):

I'm seeing an error when running tests under glu_cli_run. I don't see them showing up in CI, so assume it has to do with my local configuration, but I'm running inside of a nix environment. Any tips for diagnosing?

$ cargo test glue_cli_run::union_without_padding

...

---- glue_cli_run::union_without_padding stdout ----
thread 'glue_cli_run::union_without_padding' panicked at '`roc glue` command had unexpected stderr: ld: warning: -undefined dynamic_lookup may not work with chained fixups
', crates/glue/tests/test_glue_cli.rs:220:13

view this post on Zulip Brendan Hansknecht (May 15 2023 at 23:50):

I think we are missing a flag related to disabling fix up chains. That said, I feel like we had the flag originally, but removed it because it became deprecated or something of that nature.

view this post on Zulip Brendan Hansknecht (May 15 2023 at 23:51):

So on new systems you get an error if you have it and on older systems you get an error if you don't. Or something like that. Don't recall exactly.

view this post on Zulip David Smith (May 16 2023 at 13:15):

I see there is some special casing for it here, which isn't included for the glue cli. I'm a little confused as to why it only showed up for me recently. I had run cargo test successfully on the same system, and have otherwise only updated the roc codebase.

view this post on Zulip Anton (May 16 2023 at 13:48):

It may have shown up only recently due to this commit

view this post on Zulip David Smith (May 16 2023 at 13:53):

Ah, that does look relevant!

view this post on Zulip Brendan Hansknecht (May 16 2023 at 16:29):

(deleted)

view this post on Zulip Brendan Hansknecht (May 16 2023 at 16:30):

Sorry...misread the commit.

Yeah we require -undefined dynamic_lookup because a generated shared library needs to look up symbols the platform.

view this post on Zulip Brendan Hansknecht (May 16 2023 at 16:31):

We should probably try to merge the two linked functions such that they can share the extra error handling and not diverge again. If that isn't possible, we should just add the workaround to the other function

view this post on Zulip David Smith (May 16 2023 at 21:24):

@Brendan Hansknecht, is this what you had in mind?

view this post on Zulip David Smith (May 16 2023 at 21:50):

(I'm just realizing now that this should have been in the #contributing stream. Getting mixed up being both a beginning roc user and beginning roc contributor. Sorry about that!)

view this post on Zulip Brendan Hansknecht (May 16 2023 at 21:51):

Don't worry about the streams too much

view this post on Zulip Brendan Hansknecht (May 16 2023 at 21:52):

And wasn't exactly what I had in mind, but looks like a totally perfect solution.

view this post on Zulip David Smith (May 17 2023 at 13:27):

@Brendan Hansknecht, would you mind reviewing this, or should I post to the Pull request for review channel?

view this post on Zulip Brendan Hansknecht (May 17 2023 at 13:30):

just pushed a comment


Last updated: Jul 06 2025 at 12:14 UTC