ffcv icon indicating copy to clipboard operation
ffcv copied to clipboard

Error when installing ffcv from ctime.

Open Godofnothing opened this issue 2 years ago • 3 comments

When trying to install ffcv following the instructions from the repo README.md, i.e creation of conda environment followed by pip install, I encounter the following issue when doing pip install ffcv:

 /root_dir/miniconda3/envs/pysparse/x86_64-conda-linux-gnu/include/c++/11.2.0/ctime:80:11: error: 'timespec_get' has not been declared in '::'
         80 |   using ::timespec_get;
            |           ^~~~~~~~~~~~
      error: command '/root_dir/miniconda3/envs/pysparse/bin/x86_64-conda-linux-gnu-cc' failed with exit code 1

Having commented these lines

//#if __cplusplus >= 201703L && defined(_GLIBCXX_HAVE_TIMESPEC_GET)
//#undef timespec_get
//namespace std
//{
// using ::timespec;
//  using ::timespec_get;
// } // namespace std
//#endif

I managed to install ffcv and it works fine, but what can be the potential cause of this error? Seems like it is related to compilers.

Godofnothing avatar Jan 23 '23 12:01 Godofnothing

Same issue

guigautier avatar Jan 23 '23 15:01 guigautier

I downgraded compilers from 1.5.2 to 1.5.0 and it seems to have sorted the problem for me

tavisshore avatar Feb 20 '23 20:02 tavisshore

@tavisshore good to know. Anyway, dumb solution with editing ctime works with a newer version of compilers, but it is cleaner solution.

Godofnothing avatar Feb 21 '23 08:02 Godofnothing