Error building Clang: 'iostream' file not found

Dear experts. I’m building O2 on Pop! OS v.22.04 and it stopped while building Clang. The error in the log file is the following:

test.cc:1:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~
1 error generated.

I tried sudo apt-get install libc++-dev with no success. I will appreciate any help you could give me!

Error.log (2.7 MB)

Hi @Jesus,

We updated Clang in alidist just this morning (from v13 to v15), and that includes a patch that should make this header available, in theory.

Could you update you alidist and try again?

Cheers,
Timo

Dear @twilken,

thank you for the suggestion, unfortunately it didn’t work. The person that I’m helping told me that now the log file indicates that the ostream file could not be found. He told me that he tried to fix it by linking his existing ostream file to the requested directory, with no success since now the ios file could not be found. I’m not sure how to help him now. Do you have a new suggestion?

Thank you once again for your time!

Cheers,

Jesus

Hi @Jesus,

I’m afraid it’s hard for me to debug this without a full log file.

What’s the content of sw/$(aliBuild architecture)/Clang/v15.0.7-2/include/c++/v1? And is that directory (or a parent directory) included in the default search path during the compilation?

Cheers,
Timo

Dear @twilken,

sorry for not including the log file! Apparently that directory (sw/pop22_x86-84/Clang/v15.0.7-2/include/c++/v1) doesn’t exist in our alice folder. In this case the attached log indicates ‘bits/stringfwd.h’ file not found.

Thank you for your help!

Cheers,

Jesus

clang.log (1.6 MB)

Hi @Jesus,

Could you make sure all the required packages mentioned on the tutorial page are installed on the system? I assume that Pop OS is close enough to Ubuntu for these packages to exist; if some do not, please replace them with the appropriate ones for your system.

https://alice-doc.github.io/alice-analysis-tutorial/building/prereq-ubuntu.html#install-required-system-packages

Looking at the log you posted, it looks to me like Clang is installing the correct headers, but bits/stringfwd.h should be provided by the system GCC.

Cheers,
Timo