xtensor-stack / xtensor

C++ tensors with broadcasting and lazy computing
BSD 3-Clause "New" or "Revised" License
3.36k stars 398 forks source link

How can I compile xtensor with gcc-7.5 #2778

Closed guoxxiong closed 6 months ago

guoxxiong commented 7 months ago

I am keeping the default gcc-7.5 on ubuntu 18.04. No upgrade gcc, anyone have ideas to compile successfully. Thanks

tdegeus commented 7 months ago

Could you please list the error?

guoxxiong commented 7 months ago

error like this: xtensor/xexpression.hpp:172:9: internal compiler error: Segmentation fault

The same issue "2289" can be solved by upgrading gcc and g++ to 8.4. I wonder if it is possible to compile without upgrading gcc.

JohanMabille commented 7 months ago

Hi,

We've dropped support for gcc-7 as it is really outdated now. If you can't upgrade your system compiler, you can install micromamba, cd to xtensor, and then tun the following:

micromamba env create -f environment-dev.yml
micromamba activate xtensor
micromamba install compilers

And then you can pass the following variables to cmake: -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX. This way it should use the compiler in your micromamba environment instead of your system compiler.

github-actions[bot] commented 6 months ago

This issue is stale because it has been open for 30 days with no activity. It will be automatically closed in 14 days.

JohanMabille commented 6 months ago

Closing as we don't support gcc 7 anymore, the only solution is to upgrade the compiler (either the systme one, or using micromamba).