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

build fails with gcc10, missing header in utils/demangle.cc #641

Open
mauneyc-LANL opened this issue May 25, 2020 · 1 comment
Open

build fails with gcc10, missing header in utils/demangle.cc #641

mauneyc-LANL opened this issue May 25, 2020 · 1 comment

Comments

@mauneyc-LANL
Copy link

After a system update on my laptop, which bumped my system gcc to 10.1.1-1, I began encountering an error on spack install

>> 163    /tmp/mauneyc/spack-stage/spack-stage-flecsi-1-naxy3b4vp77p3v6a6w6xulc5gdogmzr5/spack-src/flecsi/utils/dema
            ngle.cc:24:33: error: return type 'std::string' {aka 'class std::__cxx11::basic_string<char>'} is incomple
            te
     164       24 | demangle(const char * const name) {
     165          |                                 ^
  >> 166    make[2]: *** [CMakeFiles/FleCSI.dir/build.make:125: CMakeFiles/FleCSI.dir/flecsi/utils/demangle.cc.o] Erro
            r 1
  >> 167    /tmp/mauneyc/spack-stage/spack-stage-flecsi-1-3pxuibyz4zfrgg7vou7ireuspdvgdc6f/spack-src/flecsi/utils/dema
            ngle.cc:28:58: error: 'free' is not a member of 'std'
     168       28 |     abi::__cxa_demangle(name, NULL, NULL, &status), std::free};
     169          |                                                          ^~~~
  >> 170    /tmp/mauneyc/spack-stage/spack-stage-flecsi-1-3pxuibyz4zfrgg7vou7ireuspdvgdc6f/spack-src/flecsi/utils/dema
            ngle.cc:28:62: error: no matching function for call to 'std::unique_ptr<char, void (*)(void*)>::unique_ptr
            (<brace-enclosed initializer list>)'
     171       28 |     abi::__cxa_demangle(name, NULL, NULL, &status), std::free};

this error persists when using master branch.

adding #include <string> in utils/demangle.cc fixes the error.

This may be due to a change in GCC header dependencies. From the release notes on libstdc++ changes:

  • Reduced header dependencies, leading to faster compilation for some code.
@cferenba
Copy link
Member

@mauneyc-LANL - Thanks for reporting this. The fix is in !227 on gitlab which is awaiting merge.

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

No branches or pull requests

2 participants