Closed hughcars closed 4 months ago
We primarily use and test with Apple clang on Mac, so I'd recommend using that.
I have not used Homebrew clang, so I'm not sure how easy it is to get that to work. Looking at the build.log, I don't know what to make of the error -- the missing symbol is from a file (sdl_main.cpp
) compiled with the same compiler as the one used for linking. I'd assume that the linker will automatically link with the c++ standard library that it uses when generating code during compilation -- I'm not sure why this is not happening here.
@hughcars, were you able to resolve this?
Not yet. I've managed to side step it so far by looking in the crash message for the mfem method that fails, then manually calling that from within mfem. Ultimately this strategy is going to run out of road though so I'll have to figure this out. I have to use the brew clang mostly because of using llvm for other libraries, so I'm not sure I can get away with just using apple clang instead. Based on Veselin's comment, I suspect it might be that somehow it's finding something built with apple clang when it should have brew or vice versa.
You can try building GLVis and MFEM separately from your normal MFEM build -- for this you can use Apple clang. GLVis built this way can work with data sent from any other MFEM build, e.g. a build with a different compiler and with different optional libraries. GLVis does not use anything parallel from MFEM, so you don't loose anything by building serial MFEM for use by GLVis. Also, most optional packages that can be used by MFEM do not add any functionality to GLVis so building without them is perfectly fine. The one exception here, that I can think of, is NetCDF which adds support for reading NetCDF meshes which then allows GLVis to read these meshes too.
can we close this @hughcars ?
Changing to using apple clang isn't a particularly practical workflow, as I end up needing 3 builds of mfem locally (one inside of Palace, one for development of mfem patches, and then one for glvis). I have instead opted for reading the apple error backtraces when glvis crashes, and then calling the failing mfem methods directly to debug them, which has been fruitful. The separate builds can be particularly troublesome if I have to edit things within mfem in order to fix the glvis interaction, as that means developing with apple clang becomes necessary rather than llvm which is needed for all my other building.
Given I've unblocked myself can close this given support for llvm clang is not planned.
@hughcars, if you find a solution for the LLVM clang issues on Mac, we can probably add these fixes to GLVis and/or MFEM, if you want.
Building glvis from source, I'm having an issue with a linker error:
This is with a local mfem build that works. Attached is a build log. Having to build from source to have a debug build for ncmesh debugging. Any help appreciated. I think it might be a clash between the OS provided clang and the llvm one furnished by
brew
.build.log