TIGRE icon indicating copy to clipboard operation
TIGRE copied to clipboard

Installation Error: 'strtoll' has not been declared in '__gnu_cxx'

Open ecoArcGaming opened this issue 1 year ago • 6 comments

Hi, I am trying to install TIGRE's Python version in a Conda environment. My current setup is gcc --version 10.4.0, g++ --version 10.4.0, nvcc --version cuda_11.5. When running python setup.py install --user, I get a list of errors in the following format:

`/me/miniconda3/envs/tigre/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:95:1: error: '__BEGIN_NAMESPACE_STD' does not name a type
   95 | __BEGIN_NAMESPACE_STD
....
/me/miniconda3/envs/tigre/x86_64-conda-linux-gnu/include/c++/10.4.0/cstdlib:244:22: error: 'llabs' has not been declared in '__gnu_cxx'
  244 |   using ::__gnu_cxx::llabs;
      |                      ^~~~~
/me/miniconda3/envs/tigre/x86_64-conda-linux-gnu/include/c++/10.4.0/cstdlib:245:22: error: 'div' has not been declared in '__gnu_cxx'
  245 |   using ::__gnu_cxx::div;
      |                      ^~~
/me/miniconda3/envs/tigre/x86_64-conda-linux-gnu/include/c++/10.4.0/cstdlib:246:22: error: 'lldiv' has not been declared in '__gnu_cxx'
  246 |   using ::__gnu_cxx::lldiv;
      |                      ^~~~~
/me/miniconda3/envs/tigre/x86_64-conda-linux-gnu/include/c++/10.4.0/cstdlib:248:22: error: 'atoll' has not been declared in '__gnu_cxx'
  248 |   using ::__gnu_cxx::atoll;
      |                      ^~~~~
/me/miniconda3/envs/tigre/x86_64-conda-linux-gnu/include/c++/10.4.0/cstdlib:249:22: error: 'strtof' has not been declared in '__gnu_cxx'
  249 |   using ::__gnu_cxx::strtof;
      |                      ^~~~~~
/me/miniconda3/envs/tigre/x86_64-conda-linux-gnu/include/c++/10.4.0/cstdlib:250:22: error: 'strtoll' has not been declared in '__gnu_cxx'
  250 |   using ::__gnu_cxx::strtoll;
      |                      ^~~~~~~
In file included from /me/miniconda3/envs/tigre/x86_64-conda-linux-gnu/include/c++/10.4.0/algorithm:62,
                 from ../Common/CUDA/projection.cpp:3:
/me/miniconda3/envs/tigre/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/stl_algo.h: In function 'void std::random_shuffle(_RAIter, _RAIter)':
/me/miniconda3/envs/tigre/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/stl_algo.h:4604:13: error: 'rand' is not a member of 'std'; did you mean 'rank'?
 4604 |      + std::rand() % ((__i - __first) + 1);`

How can I resolve this? I have tried previous gcc versions but had to change to the current version to get past some errors that occur earlier in the compilation.

ecoArcGaming avatar Jan 28 '25 16:01 ecoArcGaming

I have no idea... This seems an issue on your gcc, but I really have never seen an error like this, so no idea.

That said, you should install with pip intall . , try that.

AnderBiguri avatar Jan 28 '25 16:01 AnderBiguri

I have no idea... This seems an issue on your gcc, but I really have never seen an error like this, so no idea.

That said, you should install with pip intall . , try that.

Same errors when using pip. I have no idea what is going on.

ecoArcGaming avatar Jan 28 '25 16:01 ecoArcGaming

I don't manage this package, but I know the people who do: https://anaconda.org/ccpi/tigre maybe that helps? Its not 100% up to date but will generally work.

AnderBiguri avatar Jan 28 '25 16:01 AnderBiguri

the conda version has some dependency conflicts with other packages I'm using, so this didn't work for me

ecoArcGaming avatar Jan 29 '25 16:01 ecoArcGaming

Unfortunately I don't think I'll be able to help you debug this, it does really look like local gcc, perhaps CUDA, conflicts, rather than anything TIGRE specifically. Note that none of the erroring files are TIGRE, but some C++ files in miniconda.

AnderBiguri avatar Jan 29 '25 17:01 AnderBiguri

Gotchu. Thanks for the help!

ecoArcGaming avatar Jan 29 '25 17:01 ecoArcGaming