www.digitalmars.com         C & C++   DMDScript  

D - DMD 0.64 release

reply "Walter" <walter digitalmars.com> writes:
Made many suggested changes to the linux setup. Hopefully fixed bad section
name bug.

http://www.digitalmars.com/d/changelog.html
May 12 2003
next sibling parent reply John Reimer <jjreimer telus.net> writes:
On Mon, 12 May 2003 02:18:12 -0700, Walter wrote:

 Made many suggested changes to the linux setup. Hopefully fixed bad section
 name bug.
 
 http://www.digitalmars.com/d/changelog.html

Hi walter, Working better! But I still get one relocation error. It's completely different: ../../bin/dmd -I/home/john/dmd/src/phobos hello.d gcc hello.o -o hello -lphobos -lpthread -lm /usr/bin/ld: /usr/lib/gcc-lib/i586-pc-linux-gnu/3.2.2/../../../libphobos.a(gc.o): bad relocation section name `.rel.gnu.linkonce.t_d_new?' Otherwise still links to a runnable hello. As you can see, dmd still can't seem to access my dmd.conf even in /etc. If I don't include the -I switch, it just complains about not being able to find object.d again. I still don't know why. Nice to see the linker step integration in place. Thanks! later, John
May 12 2003
next sibling parent reply Olaf Rogalsky <olaf.rogalsky theorie1.physik.uni-erlangen.de> writes:
John Reimer wrote:

 gcc hello.o -o hello -lphobos -lpthread -lm
 /usr/bin/ld:
 /usr/lib/gcc-lib/i586-pc-linux-gnu/3.2.2/../../../libphobos.a(gc.o): bad
 relocation section name `.rel.gnu.linkonce.t_d_new?'

the error message: ~/dmd>dmd -I/home/rogalsky/dmd/src/phobos samples/d/hello.d 2>&1|od -ctx1 0000000 g c c h e l l o . o - o h 67 63 63 20 68 65 6c 6c 6f 2e 6f 20 2d 6f 20 68 0000020 e l l o - l p h o b o s - l 65 6c 6c 6f 20 2d 6c 70 68 6f 62 6f 73 20 2d 6c 0000040 p t h r e a d - l m \n / u s 70 74 68 72 65 61 64 20 2d 6c 6d 20 0a 2f 75 73 0000060 r / b i n / l d : / u s r / l 72 2f 62 69 6e 2f 6c 64 3a 20 2f 75 73 72 2f 6c 0000100 i b / l i b p h o b o s . a ( g 69 62 2f 6c 69 62 70 68 6f 62 6f 73 2e 61 28 67 0000120 c . o ) : b a d r e l o c a 63 2e 6f 29 3a 20 62 61 64 20 72 65 6c 6f 63 61 0000140 t i o n s e c t i o n n a m 74 69 6f 6e 20 73 65 63 74 69 6f 6e 20 6e 61 6d 0000160 e ` . r e l . g n u . l i n k 65 20 60 2e 72 65 6c 2e 67 6e 75 2e 6c 69 6e 6b 0000200 o n c e . t _ d _ n e w 250 004 ' \n 6f 6e 63 65 2e 74 5f 64 5f 6e 65 77 a8 04 27 0a The culprit is the section name ".rel.gnu.linkonce.t_d_new\250\004"! Hope this helps. Is it possible to get the assembler output of dmd, or is there no intermediate assembly stage. Olaf -- +----------------------------------------------------------------------+ I Dr. Olaf Rogalsky Institut f. Theo. Physik I I I Tel.: 09131 8528440 Univ. Erlangen-Nuernberg I I Fax.: 09131 8528444 Staudtstrasse 7 B3 I I rogalsky theorie1.physik.uni-erlangen.de D-91058 Erlangen I +----------------------------------------------------------------------+
May 12 2003
next sibling parent "Walter" <walter digitalmars.com> writes:
"Olaf Rogalsky" <olaf.rogalsky theorie1.physik.uni-erlangen.de> wrote in
message news:3EBFB609.F06CD2DD theorie1.physik.uni-erlangen.de...
 Is it possible to get the assembler output of dmd,

Yes. Run dumpobj or obj2asm on the .o file.
May 12 2003
prev sibling parent "Walter" <walter digitalmars.com> writes:
Thanks, that was the clue I needed. -Walter
May 13 2003
prev sibling parent reply "Walter" <walter digitalmars.com> writes:
"John Reimer" <jjreimer telus.net> wrote in message
news:pan.2003.05.12.12.05.41.484927 telus.net...
 gcc hello.o -o hello -lphobos -lpthread -lm
 /usr/bin/ld:
 /usr/lib/gcc-lib/i586-pc-linux-gnu/3.2.2/../../../libphobos.a(gc.o): bad
 relocation section name `.rel.gnu.linkonce.t_d_new?'

This is fixed now.
 Otherwise still links to a runnable hello.  As you can see, dmd still
 can't seem to access my dmd.conf even in /etc. If I don't include the -I
 switch, it just complains about not being able to find object.d again.
 I still don't know why.

Did you edit the contents of /etc/dmd.conf?
May 13 2003
parent John Reimer <jjreimer telus.net> writes:
 Otherwise still links to a runnable hello.  As you can see, dmd still
 can't seem to access my dmd.conf even in /etc. If I don't include the -I
 switch, it just complains about not being able to find object.d again.
 I still don't know why.

Did you edit the contents of /etc/dmd.conf?

Yes, I did. I think this is a problem peculiar to my system (or me). Since I don't see anybody else reporting trouble with this.
May 13 2003
prev sibling next sibling parent Bill Cox <bill viasic.com> writes:
Closer... I get another linker warning (but hello still linked).

/usr/bin/ld: ../dmd/lib/libphobos.a(gc.o): bad relocation section name 
`.rel.gnu.linkonce.t_d_new?'

Again, I'm on Linux 7.3 with gcc version 29.6.  I've also got gcc 3.3 
(experimental) version on my machine.  It shows the same behavior.

BTW: Kudos on the linux port!

Bill

Walter wrote:
 Made many suggested changes to the linux setup. Hopefully fixed bad section
 name bug.
 
 http://www.digitalmars.com/d/changelog.html
 
 
 

May 12 2003
prev sibling next sibling parent reply Bill Cox <bill viasic.com> writes:
I tried to go a bit further than hello.d...

I compiled d2html.d, using dmd -c d2html.d, and then
gcc -o d2html d2html.o ~/dmd/lib/libphobos.a -lpthread -lm

I'm using gcc 2.94.  When I type "d2html hello.d", it crashes with a 
segv.  Using ddd, I printed the backtrace:

#0  0x00000000 in ?? ()
#1  0x0804f1c2 in _Dgcx_Gcx_fullcollectshell_FZk ()
#2  0x0804f0b6 in _Dgcx_Gcx_fullcollectshell_FZk ()
#3  0x0804e1db in _Dgcx_GC_malloc_FkZPv ()
#4  0x0804db1a in _d_newclass ()
#5  0x0804bc42 in _Dstream_Stream_readExact_FPvkZv ()
#6  0x0804bd86 in _Dstream_Stream_read_FJeZv ()
#7  0x080494a2 in _Dmain ()
#8  0x0804a482 in main ()
#9  0x42017499 in __libc_start_main () from /lib/i686/libc.so.6

Bill

Walter wrote:
 Made many suggested changes to the linux setup. Hopefully fixed bad section
 name bug.
 
 http://www.digitalmars.com/d/changelog.html
 
 
 

May 12 2003
next sibling parent reply John Reimer <jjreimer telus.net> writes:
On Mon, 12 May 2003 08:57:42 -0400, Bill Cox wrote:

 I tried to go a bit further than hello.d...
 
 I compiled d2html.d, using dmd -c d2html.d, and then
 gcc -o d2html d2html.o ~/dmd/lib/libphobos.a -lpthread -lm
 
 I'm using gcc 2.94.  When I type "d2html hello.d", it crashes with a 
 segv.  Using ddd, I printed the backtrace:
 
 #0  0x00000000 in ?? ()
 #1  0x0804f1c2 in _Dgcx_Gcx_fullcollectshell_FZk ()
 #2  0x0804f0b6 in _Dgcx_Gcx_fullcollectshell_FZk ()
 #3  0x0804e1db in _Dgcx_GC_malloc_FkZPv ()
 #4  0x0804db1a in _d_newclass ()
 #5  0x0804bc42 in _Dstream_Stream_readExact_FPvkZv ()
 #6  0x0804bd86 in _Dstream_Stream_read_FJeZv ()
 #7  0x080494a2 in _Dmain ()
 #8  0x0804a482 in main ()
 #9  0x42017499 in __libc_start_main () from /lib/i686/libc.so.6

I decided to give this a try on my system, and surprisingly came up with similar results. With gcc 3.2.2, running "d2html hello.d", the program crashes with the segmentation fault. Following Bills lead, I printed out a very similar backtrace: #0 0x00000000 in ?? () #1 0x0804f176 in _Dstream_MemoryStream__ctor_FZC12MemoryStream () #2 0x0804f06a in _Dstream_MemoryStream__ctor_FZC12MemoryStream () #3 0x0804e18f in _Dstream_MemoryStream__ctor_FZC12MemoryStream () #4 0x0804dace in _Dstream_MemoryStream__ctor_FZC12MemoryStream () #5 0x0804bbf6 in _Dstream_Stream_readExact_FPvkZv () #6 0x0804bd3a in _Dstream_Stream_read_FJaZv () #7 0x08049456 in _Dmain () #8 0x0804a436 in main () #9 0x400acb97 in __libc_start_main () from libc.so.6
May 12 2003
parent John Reimer <jjreimer telus.net> writes:
well perhaps not so similar.
May 12 2003
prev sibling parent "Carlos Santander B." <carlos8294 msn.com> writes:
"Bill Cox" <bill viasic.com> escribiσ en el mensaje
news:3EBF9A46.5030006 viasic.com...
| I tried to go a bit further than hello.d...
|
| I compiled d2html.d, using dmd -c d2html.d, and then
| gcc -o d2html d2html.o ~/dmd/lib/libphobos.a -lpthread -lm
| ...

Last I remember, d2html didn't work because d2html.kwd doesn't exist. I'm
just downloading 0.64 so I can't see if it's included or not (but I think
not). However, I tried to compile it with 0.63 and I get "Error 42: Symbol
Undefined __d_arraycatn".

-------------------------
Carlos Santander


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.478 / Virus Database: 275 - Release Date: 2003-05-06
May 12 2003
prev sibling parent reply "Carlos Santander B." <carlos8294 msn.com> writes:
(dmd 0.64 on Win32)

void main() {
    double d;
    printf('%f',d.isnan);
}

I get: no property 'isnan' for type 'double'. The same happens when using
float or real, or for isinfinite, isnormal. I thought this was already
implemented.

By the way, maybe this a language (english) issue, but why this
inconsistency: float.infinity and float.isinfinite?

—————————————————————————
Carlos Santander



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.481 / Virus Database: 277 - Release Date: 2003-05-13
May 13 2003
parent reply "Walter" <walter digitalmars.com> writes:
"Carlos Santander B." <carlos8294 msn.com> wrote in message
news:b9s739$2s7v$1 digitaldaemon.com...
 (dmd 0.64 on Win32)

 void main() {
     double d;
     printf('%f',d.isnan);
 }

 I get: no property 'isnan' for type 'double'. The same happens when using
 float or real, or for isinfinite, isnormal. I thought this was already
 implemented.

That's done with math.isnan(d).
 By the way, maybe this a language (english) issue, but why this
 inconsistency: float.infinity and float.isinfinite?

There isn't a float.isinfinite. float.infinity does not return a true or false, but returns the infinity value.
May 13 2003
parent reply "Carlos Santander B." <carlos8294 msn.com> writes:
"Walter" <walter digitalmars.com> escribiσ en el mensaje
news:b9sctm$6t$1 digitaldaemon.com...
|
| ...
| That's done with math.isnan(d).
|
| ...
| There isn't a float.isinfinite. float.infinity does not return a true or
| false, but returns the infinity value.
| ...
|

Then the docs need to be fixed.

What I meant with the inconsistency between isinfinite and infinity is that
the first ends with e and the other with y. That's why I said it might be
that just english is that way, but it's kinda confussing.

—————————————————————————
Carlos Santander
"Walter" <walter digitalmars.com> escribiσ en el mensaje
news:b9sctm$6t$1 digitaldaemon.com...
|
| ...
| That's done with math.isnan(d).
|
| ...
| There isn't a float.isinfinite. float.infinity does not return a true or
| false, but returns the infinity value.
| ...
|

Then the docs need to be fixed.

What I meant with the inconsistency between isinfinite and infinity is that
the first ends with e and the other with y. That's why I said it might be
that just english is that way, but it's kinda confussing.

—————————————————————————
Carlos Santander
May 13 2003
parent reply "Carlos Santander B." <carlos8294 msn.com> writes:
"Carlos Santander B." <carlos8294 msn.com> escribiσ en el mensaje
news:b9sdds$qo$1 digitaldaemon.com...
| "Walter" <walter digitalmars.com> escribiσ en el mensaje
| news:b9sctm$6t$1 digitaldaemon.com...
| |
| | ...
| | That's done with math.isnan(d).
| |
| | ...
| | There isn't a float.isinfinite. float.infinity does not return a true or
| | false, but returns the infinity value.
| | ...
| |
|
| Then the docs need to be fixed.
|
| What I meant with the inconsistency between isinfinite and infinity is
that
| the first ends with e and the other with y. That's why I said it might be
| that just english is that way, but it's kinda confussing.
|


Ignore that second part I said. I was too tired to read well.

What I wanted to know is if I do

if (cond)
    d=double.infinity
else
    d=someOtherValue;

How do I check if d is infinity or not?

—————————————————————————
Carlos Santander


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.481 / Virus Database: 277 - Release Date: 2003-05-13
May 14 2003
parent reply "Walter" <walter digitalmars.com> writes:
"Carlos Santander B." <carlos8294 msn.com> wrote in message
news:b9tku6$1f4n$1 digitaldaemon.com...
 How do I check if d is infinity or not?

math.isinf(d)
May 14 2003
parent "Carlos Santander B." <carlos8294 msn.com> writes:
"Walter" <walter digitalmars.com> escribiσ en el mensaje
news:b9tqb5$1m32$3 digitaldaemon.com...
|
| "Carlos Santander B." <carlos8294 msn.com> wrote in message
| news:b9tku6$1f4n$1 digitaldaemon.com...
| > How do I check if d is infinity or not?
|
| math.isinf(d)
|
|

Yes, I discovered it after my post. Thanks.

—————————————————————————
Carlos Santander


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.481 / Virus Database: 277 - Release Date: 2003-05-13
May 14 2003