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

Fix an issue with library compilation on Macs #25844

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

lydia-duncan
Copy link
Member

Library compilation on Macs has recently started generating the error:

ld: warning: ignoring duplicate libraries: '<library name>'

I believe we added this extra library specification for a reason (linking is annoyingly fragile), and it seems likely that reason is no longer necessary, so it should be safe to remove the extra library specification in general. Experimentation with removing the extra library linking on linux makes this seem likely.

For many tests, this was part of the specified ".lastcompopts" file and so could be removed from the tests. For the tests of generating Makefiles, we needed to modify the compiler to not add this extra use of the library.

Tested:

  • the impacted tests locally on my Mac
  • full paratest on Linux

…periment

I believe we added this extra library specification for a reason (linking is
annoyingly fragile), so see if that reason was because of Macs and as a result
has now been fixed.

Seems to avoid the error message on my Mac, but need to check the behavior on
linux

----
Signed-off-by: Lydia Duncan <[email protected]>
Since the previous commit seemed okay on both Mac and Linux, go ahead and do the
same thing for these tests.  Testing on my Mac worked fine, checking Linux now

----
Signed-off-by: Lydia Duncan <[email protected]>
…ary warning

Since Macs seem to object to providing duplicate libraries now, avoid adding it
at the end of the generated makefile compilation line.

----
Signed-off-by: Lydia Duncan <[email protected]>
@lydia-duncan lydia-duncan merged commit da3943d into chapel-lang:main Aug 29, 2024
7 checks passed
@lydia-duncan lydia-duncan deleted the fixLibraryTestsOnMacs branch August 29, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants