Thread overview
[phobos] std.complex doesn't pass unittest
May 23, 2010
Shin Fujishiro
May 24, 2010
Walter Bright
May 24, 2010
Walter Bright
May 24, 2010
Don Clugston
May 24, 2010
Walter Bright
May 23, 2010
I must be missing something. I updated dmd to 2.046, updated druntime and phobos, and am trying make unittest on Linux.

make --no-print-directory -f GNUmakefile OS=posix BUILD=debug unittest
Testing generated/posix/debug/unittest/std/complex
std/complex.d(309): Error: 'this' is not a scalar, it is a Complex!(double)
std/complex.d(309): Error: 'this' is not of arithmetic type, it is a
Complex!(double)
std/complex.d(309): Error: 'this' is not of arithmetic type, it is a
Complex!(double)
std/complex.d(313): Error: 'this' is not a scalar, it is a Complex!(double)
std/complex.d(313): Error: 'this' is not of arithmetic type, it is a
Complex!(double)
std/complex.d(313): Error: 'z' is not of arithmetic type, it is a
Complex!(double)
std/complex.d(314): Error: 'this' is not a scalar, it is a Complex!(double)
std/complex.d(314): Error: 'this' is not of arithmetic type, it is a
Complex!(double)
std/complex.d(314): Error: 'z' is not of arithmetic type, it is a
Complex!(double)
std/complex.d(317): Error: Complex!(double) ^^= real is not supported
std/complex.d(152): Error: template instance
std.complex.Complex!(double).Complex.opOpAssign!(op,int) error instantiating
std/complex.d(460):        instantiated from here: opBinary!("^^",int)
std/complex.d(460): Error: template instance
std.complex.Complex!(double).Complex.opBinary!("^^",int) error instantiating
make[1]: *** [generated/posix/debug/unittest/std/complex] Error 1
make: *** [unittest] Error 2

I must have a local problem that you guys don't. What am I missing?

Andrei
May 24, 2010
Andrei Alexandrescu <andrei at erdani.com> wrote:
> I must be missing something. I updated dmd to 2.046, updated druntime and phobos, and am trying make unittest on Linux.
> 

Update dmd to svn trunk. Phobos r1532 or after needs dmd r488 (>2.046).

Shin
May 23, 2010

Shin Fujishiro wrote:
> Andrei Alexandrescu <andrei at erdani.com> wrote:
> 
>> I must be missing something. I updated dmd to 2.046, updated druntime and phobos, and am trying make unittest on Linux.
>>
>> 
>
> Update dmd to svn trunk. Phobos r1532 or after needs dmd r488 (>2.046).
>
>
> 

Right. Andrei, I changed the compiler to match TDPL on operator overloading. Had to change std.complex to match.
May 23, 2010
Thanks! I didn't compile dmd, but I got it and gcc can't find libstdc++.

I have 64-bit Ubuntu. What do I need to install? I tried:

sudo apt-get install ia32-libs lib32gcc1 lib32stdc++6 libc6-dev-i386 gcc-multilib

but I already have all of those. What do I need to compile dmd on Ubuntu64?


Thanks,

Andrei

On 05/23/2010 05:51 PM, Shin Fujishiro wrote:
> Andrei Alexandrescu<andrei at erdani.com>  wrote:
>> I must be missing something. I updated dmd to 2.046, updated druntime and phobos, and am trying make unittest on Linux.
>>
>
> Update dmd to svn trunk. Phobos r1532 or after needs dmd r488 (>2.046).
>
> Shin
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
May 23, 2010

Andrei Alexandrescu wrote:
> Thanks! I didn't compile dmd, but I got it and gcc can't find libstdc++.
>
> I have 64-bit Ubuntu. What do I need to install? I tried:
>
> sudo apt-get install ia32-libs lib32gcc1 lib32stdc++6 libc6-dev-i386 gcc-multilib
>
> but I already have all of those. What do I need to compile dmd on Ubuntu64?
>

To compile 32 bit programs under ub64:
 sudo apt-get install gcc-multilib libc6-i386 lib6-dev-i386

To run 32 bit programs:
 sudo apt-get install gcc-multilib
 sudo apt-get install g++-multilib
May 24, 2010
Are these instructions on your website?

Andrei

On 05/23/2010 10:34 PM, Walter Bright wrote:
> sudo apt-get install gcc-multilib libc6-i386 lib6-dev-i386
May 24, 2010
Did that and hit another one:

std/math.d(1611): Error: sqrt cannot be interpreted at compile time, because it has no available source code

Has this happen to you guys? I'm on the latest and greatest of everything. If I were any newer, I'd be from the future.


Andrei

On 05/23/2010 05:51 PM, Shin Fujishiro wrote:
> Andrei Alexandrescu<andrei at erdani.com>  wrote:
>> I must be missing something. I updated dmd to 2.046, updated druntime and phobos, and am trying make unittest on Linux.
>>
>
> Update dmd to svn trunk. Phobos r1532 or after needs dmd r488 (>2.046).
>
> Shin
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
May 24, 2010
On 24 May 2010 19:51, Andrei Alexandrescu <andrei at erdani.com> wrote:
> Did that and hit another one:
>
> std/math.d(1611): Error: sqrt cannot be interpreted at compile time, because it has no available source code
>
> Has this happen to you guys? I'm on the latest and greatest of everything. If I were any newer, I'd be from the future.

Tracked this down -- as a result of svn 499, you need to add @safe to sin cos tan sqrt and fabs in std.math.


>
>
> Andrei
>
> On 05/23/2010 05:51 PM, Shin Fujishiro wrote:
>>
>> Andrei Alexandrescu<andrei at erdani.com> ?wrote:
>>>
>>> I must be missing something. I updated dmd to 2.046, updated druntime and phobos, and am trying make unittest on Linux.
>>>
>>
>> Update dmd to svn trunk. Phobos r1532 or after needs dmd r488 (>2.046).
>>
>> Shin
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
May 24, 2010
Thanks for your assistance! I did so and got the "asm in @safe function" error for tan() so I made that @trusted.

After this I'm seeing:

Testing generated/posix/debug/unittest/std/algorithm generated/posix/debug/libphobos2.a(math_3f7_174.o): In function `_D3std4math4log2FNaNbeZe': /home/andrei/code/dmd/phobos/std/atomics.d:36: undefined reference to `_D3std4math4yl2xFNaNbeeZe'

The build is clean. The missing functions seem to be log2() and yl2x().


Andrei

On 05/24/2010 03:07 PM, Don Clugston wrote:
> On 24 May 2010 19:51, Andrei Alexandrescu<andrei at erdani.com>  wrote:
>> Did that and hit another one:
>>
>> std/math.d(1611): Error: sqrt cannot be interpreted at compile time, because it has no available source code
>>
>> Has this happen to you guys? I'm on the latest and greatest of everything. If I were any newer, I'd be from the future.
>
> Tracked this down -- as a result of svn 499, you need to add @safe to sin cos tan sqrt and fabs in std.math.
>
>
>>
>>
>> Andrei
>>
>> On 05/23/2010 05:51 PM, Shin Fujishiro wrote:
>>>
>>> Andrei Alexandrescu<andrei at erdani.com>    wrote:
>>>>
>>>> I must be missing something. I updated dmd to 2.046, updated druntime and phobos, and am trying make unittest on Linux.
>>>>
>>>
>>> Update dmd to svn trunk. Phobos r1532 or after needs dmd r488 (>2.046).
>>>
>>> Shin
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
May 24, 2010
See the changes needed for std.math here:

    http://d.puremagic.com/issues/show_bug.cgi?id=4220

I didn't check them in because I'm having more problems with svn.

Andrei Alexandrescu wrote:
> Thanks for your assistance! I did so and got the "asm in @safe function" error for tan() so I made that @trusted.
>
> After this I'm seeing:
>
> Testing generated/posix/debug/unittest/std/algorithm generated/posix/debug/libphobos2.a(math_3f7_174.o): In function `_D3std4math4log2FNaNbeZe': /home/andrei/code/dmd/phobos/std/atomics.d:36: undefined reference to `_D3std4math4yl2xFNaNbeeZe'
>
> The build is clean. The missing functions seem to be log2() and yl2x().
>
>
> Andrei
>
> On 05/24/2010 03:07 PM, Don Clugston wrote:
>> On 24 May 2010 19:51, Andrei Alexandrescu<andrei at erdani.com>  wrote:
>>> Did that and hit another one:
>>>
>>> std/math.d(1611): Error: sqrt cannot be interpreted at compile time,
>>> because
>>> it has no available source code
>>>
>>> Has this happen to you guys? I'm on the latest and greatest of
>>> everything.
>>> If I were any newer, I'd be from the future.
>>
>> Tracked this down -- as a result of svn 499, you need to add @safe to sin cos tan sqrt and fabs in std.math.
>>
>>
>>>
>>>
>>> Andrei
>>>
>>> On 05/23/2010 05:51 PM, Shin Fujishiro wrote:
>>>>
>>>> Andrei Alexandrescu<andrei at erdani.com>    wrote:
>>>>>
>>>>> I must be missing something. I updated dmd to 2.046, updated druntime and phobos, and am trying make unittest on Linux.
>>>>>
>>>>
>>>> Update dmd to svn trunk. Phobos r1532 or after needs dmd r488 (>2.046).
>>>>
>>>> Shin
>>>> _______________________________________________
>>>> phobos mailing list
>>>> phobos at puremagic.com
>>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>>
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>>
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
>