qcscine / sparrow

https://scine.ethz.ch
BSD 3-Clause "New" or "Revised" License
78 stars 15 forks source link

make failed because of multiple errors #24

Closed JohannaXiao closed 10 months ago

JohannaXiao commented 10 months ago

Hello! I'm trying to install sparrow on a cluster, but it cannot succeed in make action, then give me following errors. Is there somebody can help me with these issues? Thanks very much error.log

weymutht commented 10 months ago

Thanks for giving Sparrow a try! It appears that you're using version 4.8.2 of GCC. However, this version is too old; you need a C++ compiler supporting the C++17 standard. I recommend GCC 7.3.0 or higher.

JohannaXiao commented 10 months ago

Thanks for giving Sparrow a try! It appears that you're using version 4.8.2 of GCC. However, this version is too old; you need a C++ compiler supporting the C++17 standard. I recommend GCC 7.3.0 or higher.

Thanks for replying me so quickly! I tried to use following version:gcc (conda-forge gcc 13.2.0-2) 13.2.0. But it still didn't work. And may the errors are same error1.log

weymutht commented 10 months ago

I still see that files in /usr/include/c++/4.8.2 are included. Could you please post the output of CMake so that we can make sure that a suitable compiler is used?

JohannaXiao commented 10 months ago

I still see that files in /usr/include/c++/4.8.2 are included. Could you please post the output of CMake so that we can make sure that a suitable compiler is used?

Yes, I see. It seems I didn't really change it. I attached the Cmakefiles here.(I'm not sure which one you need) Thanks again! CMakeFiles.zip

weymutht commented 10 months ago

Thanks, but what I need is the output of the CMake command which you run on the console. This command looks something like the following cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install ...

JohannaXiao commented 10 months ago

cmakeOutput.log

Thanks, but what I need is the output of the CMake command which you run on the console. This command looks something like the following cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install ...

Okk,Here!

weymutht commented 10 months ago

Thanks! However, is this a clean, fresh run, i.e., after you deleted the entire build folder? You should ensure that there are no leftovers from previous runs.

JohannaXiao commented 10 months ago

Thanks! However, is this a clean, fresh run, i.e., after you deleted the entire build folder? You should ensure that there are no leftovers from previous runs.

I think so. I do make clean before build again.

weymutht commented 10 months ago

Please remove the entire build folder manually, and then post the output of CMake again.

JohannaXiao commented 10 months ago

Please remove the entire build folder manually, and then post the output of CMake again.

Thanks very much. I deleted the build folder and cmake again.Here is the cmake output and the make error log.

cmakeOutput1.log error2.log

weymutht commented 10 months ago

Thanks a lot! It might be that the new compiler is too new. I tested Sparrow with GCC 7.3.0, GCC 8.3.0, GCC 9.2.0, GCC 10.1.0, clang 8.0.0, and the Intel compiler from oneAPI 2021.4. Maybe you have access to a compiler which is very close to one of these versions?

JohannaXiao commented 10 months ago

Thanks a lot! It might be that the new compiler is too new. I tested Sparrow with GCC 7.3.0, GCC 8.3.0, GCC 9.2.0, GCC 10.1.0, clang 8.0.0, and the Intel compiler from oneAPI 2021.4. Maybe you have access to a compiler which is very close to one of these versions?

Hi again! I changed the version to 10.4.0. It works well at the beginning. But it still failed. And here is the log file. Thanks again! output.log

weymutht commented 10 months ago

I'm not entirely sure why the linker can't find this. However, after googling around a bit, it seems that other people had the same problem when working in a conda environment (see, e.g., https://github.com/google/glog/issues/843). So, the next thing I would try is to compile Sparrow without any conda environment activated.

JohannaXiao commented 10 months ago

I'm not entirely sure why the linker can't find this. However, after googling around a bit, it seems that other people had the same problem when working in a conda environment (see, e.g., google/glog#843). So, the next thing I would try is to compile Sparrow without any conda environment activated.

Ok, but I have to work in conda environment(no root permission). I tried several times again. It still gave me the same error :(

weymutht commented 10 months ago

Maybe you could try yet another compiler?

JohannaXiao commented 10 months ago

Maybe you could try yet another compiler?

It works when the machine is rebooted. I don't know exactly how it works. It just works. And the version of GCC is 11.4.0. Thanks for your help!