[Nix-dev] Re: Nix fatal error

Benjamin Franksen benjamin.franksen at bessy.de
Tue Oct 28 13:01:34 CET 2008


Pjotr Prins wrote:
>> So now I had a defunct system. I moved .nix-profile out of the way,
>> downloaded the latest release and now I get a compile error:
>> 
>> store-api.cc: In constructor 'nix::GCOptions::GCOptions()':
>> store-api.cc:15: error: 'ULLONG_MAX' was not declared in this scope
>> 
>> which (I guess) has to do with the now used gcc version.

I had the same problem when trying to initially compiler nix-0.12pre12824 on
a debian stable system. The problem is that limits.h has #ifdef's around
the ULLONG_MAX definition that enable it only for standard C99 but not for
C++. This can be worked around in nix by using the proper C++ idiom, i.e.
including <limits> (no ".h") and replacing ULLONG_MAX with
std::numeric_limits<unsigned long long>::max().

Cheers
Ben




More information about the nix-dev mailing list