[1.30] Configuration and Link errors when building, on system where 1.29 previously worked

I've been able to reproduce but

I've also exported CC=clang and CXX=clang++

This seems to be needed in order to trigger the problematic behavior. I can reproduce the issue on an Ubuntu Jammy container, but if I remove these, the problem goes away.

Why are you setting these variables? Are you trying to build the compiler itself with clang? Or do you want the compiler to work with clang when using the C backend?

You can use printchplenv --all to see some of the hidden settings that seem to be getting confused.

  • If you want to build Chapel with clang, just use export CHPL_HOST_COMPILER=clang instead of setting CC / CXX. This appears to work.
  • If you want Chapel to support the C backend with clang, export CHPL_TARGET_COMPILER=clang. This also appears to work.

My understanding of the situation here is that there are multiple problems:

  1. The LLVM 8 cmake thing (but I think this is unrelated to your linking issue). As an aside, how is it even finding LLVM 8 on your system? Ubuntu Jammy does not have an LLVM 8 package.
  2. Something about setting CC / CXX in this way is confusing the configuration, but only when printchplenv is run within make. This probably has to do with changes we made to the compiler build process (it now uses cmake). In my experiments, running printchplenv --all on its own does not show the error.
  3. I think the cmake infrastructure for building the compiler (which is new in this release) is not properly failing when there is an error running printchplenv, and it tries to go further but that only obscures the main issue.

For now, I would recommend using export CHPL_HOST_COMPILER=clang instead of setting CC / CXX.