Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate libraries linker warning (i.e., '-lm') when importing std/math #22798

Open
ericvw opened this issue Oct 5, 2023 · 0 comments · May be fixed by #23292
Open

Duplicate libraries linker warning (i.e., '-lm') when importing std/math #22798

ericvw opened this issue Oct 5, 2023 · 0 comments · May be fixed by #23292

Comments

@ericvw
Copy link
Contributor

ericvw commented Oct 5, 2023

Description

When compiling and linking a Nim program that has import std/math explicitly or implicitly imported through another standard library, -lm is added multiple times to the link line, which results in the linker emitting a warning.

Nim Version

Nim Compiler Version 2.0.0 [MacOSX: amd64]
Compiled at 2023-10-05
Copyright (c) 2006-2023 by Andreas Rumpf

active boot switches: -d:release

Current Output

`ld: warning: ignoring duplicate libraries: '-lm'`

Expected Output

No linker warning emitted for `-lm` being specified multiple times.

Possible Solution

Remove

{.passl: "-lm".}
is one option.

I have yet to track down during the build and installation of nim where it adds -lm.

I'm unsure what the desired behavior is for which part of the nim compiler and standard library should be responsible for when -lm is added to the linkline.

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant