Skip to content

CI: macOS Shared Lib#1836

Merged
WeiqunZhang merged 9 commits intoAMReX-Codes:developmentfrom
ax3l:ci-macOSshared
Mar 15, 2021
Merged

CI: macOS Shared Lib#1836
WeiqunZhang merged 9 commits intoAMReX-Codes:developmentfrom
ax3l:ci-macOSshared

Conversation

@ax3l
Copy link
Copy Markdown
Member

@ax3l ax3l commented Mar 4, 2021

Summary

CI for macOS: Build a shared library. This is the default in Spack.

I see issues with AppleClang 12.0 raising:

ld: can't use -undefined warning or suppress with -twolevel_namespace
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@RemiLehe reported this again here: #425 (comment)

  • reproduce issue
  • add fix

Additional background

Introduced in 1b6af3c to fix #425

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • are described in the proposed changes to the AMReX documentation, if appropriate

ax3l added 3 commits March 3, 2021 23:40
Build a shared library. This is the default in Spack.

I see issues with AppleClang 12.0 raising:
```
ld: can't use -undefined warning or suppress with -twolevel_namespace
```
2nd build should speed up with this.
@ax3l ax3l force-pushed the ci-macOSshared branch from e407b15 to 8150d7f Compare March 4, 2021 07:40
maybe with a leading underscore?
@ax3l
Copy link
Copy Markdown
Member Author

ax3l commented Mar 4, 2021

Dang, what's the symbol name so I can put it on the command line to the linker

Undefined symbols for architecture x86_64:
  "getLevelBld()", referenced from:
      amrex::Amr::InitAmr() in AMReX_Amr.cpp.o
ld: symbol(s) not found for architecture x86_64

Tried so many variants now, probably need to mangle it or so.

Thanks wikipedia and godbolt!
@ax3l ax3l force-pushed the ci-macOSshared branch from af39950 to 413fcb3 Compare March 5, 2021 21:35
@ax3l ax3l mentioned this pull request Mar 6, 2021
9 tasks
@WeiqunZhang WeiqunZhang merged commit fbef03f into AMReX-Codes:development Mar 15, 2021
@WeiqunZhang WeiqunZhang mentioned this pull request Mar 15, 2021
4 tasks
@ax3l ax3l deleted the ci-macOSshared branch March 15, 2021 19:33
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.

Problem building AMReX as a shared library with CMake on MacOS

3 participants