Thread overview
Phobos master broken ?
May 04, 2015
Martin Krejcirik
May 04, 2015
Jonathan M Davis
May 04, 2015
Martin Krejcirik
May 04, 2015
Jonathan M Davis
May 04, 2015
Martin Krejcirik
May 05, 2015
anonymous
May 05, 2015
Martin Krejcirik
May 21, 2015
Walter Bright
May 21, 2015
Iain Buclaw
May 04, 2015
I can't seem to build phobos master on linux, unless I revert pull #3014 unittests

DMD v2.067-devel-b9dee9e DEBUG
std/math.d(2702): Error: number '0x1p-1024' is not representable
std/math.d(2705): Error: number '0x1p-1024' is not representable
std/math.d(2708): Error: number '0x1p-1024' is not representable
std/math.d(2713): Error: number '0x1p-128f' is not representable
std/math.d(2716): Error: number '0x1p-128f' is not representable
std/math.d(2719): Error: number '0x1p-128f' is not representable
make: *** [generated/linux/release/32/libphobos2.a] Error 1

Since it lasts about a month, I wonder if I am the only one having this problem ?
May 04, 2015
On Monday, 4 May 2015 at 14:32:16 UTC, Martin Krejcirik wrote:
> I can't seem to build phobos master on linux, unless I revert pull #3014 unittests
>
> DMD v2.067-devel-b9dee9e DEBUG
> std/math.d(2702): Error: number '0x1p-1024' is not representable
> std/math.d(2705): Error: number '0x1p-1024' is not representable
> std/math.d(2708): Error: number '0x1p-1024' is not representable
> std/math.d(2713): Error: number '0x1p-128f' is not representable
> std/math.d(2716): Error: number '0x1p-128f' is not representable
> std/math.d(2719): Error: number '0x1p-128f' is not representable
> make: *** [generated/linux/release/32/libphobos2.a] Error 1
>
> Since it lasts about a month, I wonder if I am the only one having this problem ?

The autotester doesn't show any such problems:

https://auto-tester.puremagic.com/

The only failure I see right now is what looks like a random test failure on 32-bit linux in druntime.

You list "DMD v2.067-devel-b9dee9e DEBUG." Does that mean that you're not using the latest dmd? Make sure that you're using dmd master and druntime master when building phobos master. Also make sure that all three repos are clean and up-to-date without any local changes.

- Jonathan M Davis
May 04, 2015
> You list "DMD v2.067-devel-b9dee9e DEBUG." Does that mean that you're not using the latest dmd? Make sure that you're using

I've tried making a fresh clone of dmd, druntime, phobos on a different computer, compiling:

make -f posix.mak MODEL=32

Still the same error. I've no problem compiling stable or whatever older version before the above mentioned pull request.
I'm on Debian wheezy for reference.
May 04, 2015
On Monday, 4 May 2015 at 17:15:11 UTC, Martin Krejcirik wrote:
>> You list "DMD v2.067-devel-b9dee9e DEBUG." Does that mean that you're not using the latest dmd? Make sure that you're using
>
> I've tried making a fresh clone of dmd, druntime, phobos on a different computer, compiling:
>
> make -f posix.mak MODEL=32
>
> Still the same error. I've no problem compiling stable or whatever older version before the above mentioned pull request.
> I'm on Debian wheezy for reference.

You might need to put DMD=path/to/dmd in front of make and give it the path to the dmd from master so that it uses that rather than the one installed on your system.

- Jonathan M Davis
May 04, 2015
> You might need to put DMD=path/to/dmd in front of make and give it the path to the dmd from master so that it uses that rather than the one installed on your system.

It picks up dmd from ../dmd/src by default, making it explicit makes no difference. I've tried 2.067.1 binary too.
May 05, 2015
On Monday, 4 May 2015 at 14:32:16 UTC, Martin Krejcirik wrote:
> I can't seem to build phobos master on linux, unless I revert pull #3014 unittests
>
> DMD v2.067-devel-b9dee9e DEBUG
> std/math.d(2702): Error: number '0x1p-1024' is not representable
> std/math.d(2705): Error: number '0x1p-1024' is not representable
> std/math.d(2708): Error: number '0x1p-1024' is not representable
> std/math.d(2713): Error: number '0x1p-128f' is not representable
> std/math.d(2716): Error: number '0x1p-128f' is not representable
> std/math.d(2719): Error: number '0x1p-128f' is not representable
> make: *** [generated/linux/release/32/libphobos2.a] Error 1
>
> Since it lasts about a month, I wonder if I am the only one having this problem ?

I encountered this when working with CentOS 6 (i.e. somewhat outdated). I just commented those asserts out to keep going and forgot about it then.

I think I read something (bugzilla issue, source comment, ...) that hinted at libc having to do with it, but I can't find it now. But CentOS 6's libc is indeed behind that of my usual Ubuntu 14.10 (2.12 vs 2.19).
May 05, 2015
> I think I read something (bugzilla issue, source comment, ...) that hinted at libc having to do with it, but I can't find it now. But CentOS 6's libc is indeed behind that of my usual Ubuntu 14.10 (2.12 vs 2.19).

Yeah, upgrading Debian from wheezy to jessie solved the issue.
May 21, 2015
On 5/4/2015 7:32 AM, Martin Krejcirik wrote:
> I can't seem to build phobos master on linux, unless I revert pull #3014 unittests
>
> DMD v2.067-devel-b9dee9e DEBUG
> std/math.d(2702): Error: number '0x1p-1024' is not representable
> std/math.d(2705): Error: number '0x1p-1024' is not representable
> std/math.d(2708): Error: number '0x1p-1024' is not representable
> std/math.d(2713): Error: number '0x1p-128f' is not representable
> std/math.d(2716): Error: number '0x1p-128f' is not representable
> std/math.d(2719): Error: number '0x1p-128f' is not representable
> make: *** [generated/linux/release/32/libphobos2.a] Error 1
>
> Since it lasts about a month, I wonder if I am the only one having this problem ?

The source is strtold(), part of the C standard library, is returning ERANGE.
May 21, 2015
On 5/21/15 12:13 AM, Walter Bright wrote:
> On 5/4/2015 7:32 AM, Martin Krejcirik wrote:
>> I can't seem to build phobos master on linux, unless I revert pull
>> #3014 unittests
>>
>> DMD v2.067-devel-b9dee9e DEBUG
>> std/math.d(2702): Error: number '0x1p-1024' is not representable
>> std/math.d(2705): Error: number '0x1p-1024' is not representable
>> std/math.d(2708): Error: number '0x1p-1024' is not representable
>> std/math.d(2713): Error: number '0x1p-128f' is not representable
>> std/math.d(2716): Error: number '0x1p-128f' is not representable
>> std/math.d(2719): Error: number '0x1p-128f' is not representable
>> make: *** [generated/linux/release/32/libphobos2.a] Error 1
>>
>> Since it lasts about a month, I wonder if I am the only one having
>> this problem ?
>
> The source is strtold(), part of the C standard library, is returning
> ERANGE.

Thanks. Should we cater to older compilers and disable those unittests, or just leave this be? -- Andrei
May 21, 2015
On 21 May 2015 at 17:17, Andrei Alexandrescu via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> On 5/21/15 12:13 AM, Walter Bright wrote:
>>
>> On 5/4/2015 7:32 AM, Martin Krejcirik wrote:
>>>
>>> I can't seem to build phobos master on linux, unless I revert pull #3014 unittests
>>>
>>> DMD v2.067-devel-b9dee9e DEBUG
>>> std/math.d(2702): Error: number '0x1p-1024' is not representable
>>> std/math.d(2705): Error: number '0x1p-1024' is not representable
>>> std/math.d(2708): Error: number '0x1p-1024' is not representable
>>> std/math.d(2713): Error: number '0x1p-128f' is not representable
>>> std/math.d(2716): Error: number '0x1p-128f' is not representable
>>> std/math.d(2719): Error: number '0x1p-128f' is not representable
>>> make: *** [generated/linux/release/32/libphobos2.a] Error 1
>>>
>>> Since it lasts about a month, I wonder if I am the only one having this problem ?
>>
>>
>> The source is strtold(), part of the C standard library, is returning
>> ERANGE.
>
>
> Thanks. Should we cater to older compilers and disable those unittests, or just leave this be? -- Andrei

Joys of having a compiler that represents all floating point numbers, and performs all CTFE operations natively.  There is at least some good news in that others don't follow in DMD's footsteps on this matter.