www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - dmd 2.064

reply "seany" <seany uni-bonn.de> writes:
Trying to complie a hello world with both imports from tango 
(tango.io.Stdout) and std (std.string) givns me this :

/home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(341): Error: 
template definitions aren't allowed inside functions
/home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(350): Error: 
unexpected ( in declarator
/home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(351): Error: 
found '<=' when expecting ')'
/home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(350): Error: 
no identifier for declarator enforce(value)
/home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(350): Error: 
semicolon expected following function declaration
/home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(350): Error: 
Declaration expected, not 'cast'
/home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(355): Error: 
unexpected ( in declarator
/home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(355): Error: 
basic type expected, not 0
/home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(356): Error: 
found '0' when expecting ')'
/home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(355): Error: 
no identifier for declarator enforce(int)
/home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(355): Error: 
semicolon expected following function declaration
/home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(355): Error: 
Declaration expected, not '<='
/home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(359): Error: 
Declaration expected, not 'return'
/home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(360): Error: 
unrecognized declaration
/home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(151): Error: 
found ',' when expecting ')'
/home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(151): Error: 
found 'U' when expecting ')'
/home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(151): Error: 
Declaration expected, not ')'
/home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(152): Error: 
found ',' when expecting ')'
/home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(152): Error: 
found 'U' when expecting ')'
/home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(152): Error: 
Declaration expected, not ')'
/home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(153): Error: 
found ',' when expecting ')'


dmd.conf is :
DFLAGS=-I/home/apua/Software/dmd/Tango/ 
-I/home/apua/Software/dmd/Tango/tango 
-I/home/apua/Software/dmd/dmd2/src/phobos 
-I/home/apua/Software/dmd/dmd2/src/druntime/import 
-L-L/home/apua/Software/dmd/dmd2/linux/lib64 -L-L/home/apua/Softw$

The flags are correct, with corrections from dmd2 to dmd (which 
contains dmd 2.061) it works.

Where am I wrong?
Nov 18 2013
next sibling parent Jacob Carlborg <doob me.com> writes:
On 2013-11-18 14:28, seany wrote:
 Trying to complie a hello world with both imports from tango
 (tango.io.Stdout) and std (std.string) givns me this :

 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(341): Error: template
 definitions aren't allowed inside functions
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(350): Error:
 unexpected ( in declarator
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(351): Error: found
 '<=' when expecting ')'
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(350): Error: no
 identifier for declarator enforce(value)
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(350): Error:
 semicolon expected following function declaration
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(350): Error:
 Declaration expected, not 'cast'
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(355): Error:
 unexpected ( in declarator
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(355): Error: basic
 type expected, not 0
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(356): Error: found
 '0' when expecting ')'
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(355): Error: no
 identifier for declarator enforce(int)
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(355): Error:
 semicolon expected following function declaration
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(355): Error:
 Declaration expected, not '<='
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(359): Error:
 Declaration expected, not 'return'
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(360): Error:
 unrecognized declaration
 /home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(151): Error: found
 ',' when expecting ')'
 /home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(151): Error: found
 'U' when expecting ')'
 /home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(151): Error:
 Declaration expected, not ')'
 /home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(152): Error: found
 ',' when expecting ')'
 /home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(152): Error: found
 'U' when expecting ')'
 /home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(152): Error:
 Declaration expected, not ')'
 /home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(153): Error: found
 ',' when expecting ')'


 dmd.conf is :
 DFLAGS=-I/home/apua/Software/dmd/Tango/
 -I/home/apua/Software/dmd/Tango/tango
 -I/home/apua/Software/dmd/dmd2/src/phobos
 -I/home/apua/Software/dmd/dmd2/src/druntime/import
 -L-L/home/apua/Software/dmd/dmd2/linux/lib64 -L-L/home/apua/Softw$

 The flags are correct, with corrections from dmd2 to dmd (which contains
 dmd 2.061) it works.

 Where am I wrong?
Are you using the same version of DMD and Phobos? -- /Jacob Carlborg
Nov 18 2013
prev sibling parent reply "John Colvin" <john.loughran.colvin gmail.com> writes:
On Monday, 18 November 2013 at 13:28:45 UTC, seany wrote:
 Trying to complie a hello world with both imports from tango 
 (tango.io.Stdout) and std (std.string) givns me this :

 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(341): Error: 
 template definitions aren't allowed inside functions
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(350): Error: 
 unexpected ( in declarator
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(351): Error: 
 found '<=' when expecting ')'
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(350): Error: 
 no identifier for declarator enforce(value)
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(350): Error: 
 semicolon expected following function declaration
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(350): Error: 
 Declaration expected, not 'cast'
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(355): Error: 
 unexpected ( in declarator
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(355): Error: 
 basic type expected, not 0
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(356): Error: 
 found '0' when expecting ')'
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(355): Error: 
 no identifier for declarator enforce(int)
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(355): Error: 
 semicolon expected following function declaration
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(355): Error: 
 Declaration expected, not '<='
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(359): Error: 
 Declaration expected, not 'return'
 /home/apua/Software/dmd/dmd2/src/phobos/std/conv.d(360): Error: 
 unrecognized declaration
 /home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(151): 
 Error: found ',' when expecting ')'
 /home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(151): 
 Error: found 'U' when expecting ')'
 /home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(151): 
 Error: Declaration expected, not ')'
 /home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(152): 
 Error: found ',' when expecting ')'
 /home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(152): 
 Error: found 'U' when expecting ')'
 /home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(152): 
 Error: Declaration expected, not ')'
 /home/apua/Software/dmd/dmd2/src/phobos/std/traits.d(153): 
 Error: found ',' when expecting ')'


 dmd.conf is :
 DFLAGS=-I/home/apua/Software/dmd/Tango/ 
 -I/home/apua/Software/dmd/Tango/tango 
 -I/home/apua/Software/dmd/dmd2/src/phobos 
 -I/home/apua/Software/dmd/dmd2/src/druntime/import 
 -L-L/home/apua/Software/dmd/dmd2/linux/lib64 
 -L-L/home/apua/Softw$

 The flags are correct, with corrections from dmd2 to dmd (which 
 contains dmd 2.061) it works.

 Where am I wrong?
Looks like a dmd / phobos mismatch. You need to have the same release for both.
Nov 18 2013
parent reply "seany" <seany uni-bonn.de> writes:
On Monday, 18 November 2013 at 13:33:59 UTC, John Colvin wrote:

 Looks like a dmd / phobos mismatch. You need to have the same 
 release for both.
oh, it is the same phobos that came with the 2.064 zip file ..
Nov 18 2013
parent reply "John Colvin" <john.loughran.colvin gmail.com> writes:
On Monday, 18 November 2013 at 13:35:26 UTC, seany wrote:
 On Monday, 18 November 2013 at 13:33:59 UTC, John Colvin wrote:

 Looks like a dmd / phobos mismatch. You need to have the same 
 release for both.
oh, it is the same phobos that came with the 2.064 zip file ..
Do you have another dmd installed? Another dmd.conf perhaps? dmd looks for dmd.conf in this order: current working directory directory specified by the HOME environment variable directory dmd resides in /etc/
Nov 18 2013
parent reply "seany" <seany uni-bonn.de> writes:
On Monday, 18 November 2013 at 13:47:02 UTC, John Colvin wrote:

 Do you have another dmd installed? Another dmd.conf perhaps?

 dmd looks for dmd.conf in this order:
     current working directory
     directory specified by the HOME environment variable
     directory dmd resides in
     /etc/
I do not have it installed systemwide, I have two binaries in two different subfolders in my home folder, and the dmd.conf file is hacked to find the phobos using an absolute path. and the dmd.conf is in the same folder, in both cases. Both dmd.confs are edited so that the phobos coming with the same package is pointed at.
Nov 18 2013
next sibling parent reply "John Colvin" <john.loughran.colvin gmail.com> writes:
On Monday, 18 November 2013 at 13:57:17 UTC, seany wrote:
 On Monday, 18 November 2013 at 13:47:02 UTC, John Colvin wrote:

 Do you have another dmd installed? Another dmd.conf perhaps?

 dmd looks for dmd.conf in this order:
    current working directory
    directory specified by the HOME environment variable
    directory dmd resides in
    /etc/
I do not have it installed systemwide, I have two binaries in two different subfolders in my home folder, and the dmd.conf file is hacked to find the phobos using an absolute path. and the dmd.conf is in the same folder, in both cases. Both dmd.confs are edited so that the phobos coming with the same package is pointed at.
Does a straightforward phobos-only hello world work?
Nov 18 2013
parent "seany" <seany uni-bonn.de> writes:
On Monday, 18 November 2013 at 14:15:49 UTC, John Colvin wrote:
 On Monday, 18 November 2013 at 13:57:17 UTC, seany wrote:
 On Monday, 18 November 2013 at 13:47:02 UTC, John Colvin wrote:

 Do you have another dmd installed? Another dmd.conf perhaps?

 dmd looks for dmd.conf in this order:
   current working directory
   directory specified by the HOME environment variable
   directory dmd resides in
   /etc/
I do not have it installed systemwide, I have two binaries in two different subfolders in my home folder, and the dmd.conf file is hacked to find the phobos using an absolute path. and the dmd.conf is in the same folder, in both cases. Both dmd.confs are edited so that the phobos coming with the same package is pointed at.
Does a straightforward phobos-only hello world work?
nope, same problems with conv.d etc
Nov 18 2013
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2013-11-18 14:57, seany wrote:

 I do not have it installed systemwide, I have two binaries in two
 different subfolders in my home folder, and the dmd.conf file is hacked
 to find the phobos using an absolute path. and the dmd.conf is in the
 same folder, in both cases. Both dmd.confs are edited so that the phobos
 coming with the same package is pointed at.
If you need multiple versions of DMD I suggest you use DVM: https://github.com/jacob-carlborg/dvm -- /Jacob Carlborg
Nov 18 2013
parent reply "seany" <seany uni-bonn.de> writes:
i dont want to install them,  but keep them in my local home 
drive, like i have now, without any systemwide change, and the 
dvm page seem to incate that it only works for 32 bit?

I just wanted to give dmd 2.064 a test ride.
Nov 18 2013
parent reply Jacob Carlborg <doob me.com> writes:
On 2013-11-18 16:58, seany wrote:
 i dont want to install them,  but keep them in my local home drive, like
 i have now, without any systemwide change, and the dvm page seem to
 incate that it only works for 32 bit?
DVM installs the compilers and itself in ~/.dvm. On Windows it's somewhere in the user's home directory (can't recall exactly where right now). DVM only ships 32bit pre-compiled binaries. Any 64bit system can run 32bit binaries. By default it will install 32bit compilers. Use the --64bit flag to install the 64it compiler.
 I just wanted to give dmd 2.064 a test ride.
That's exactly what DVM is for. It's easy to install new compilers and give them a try. They won't interfere with each other. -- /Jacob Carlborg
Nov 18 2013
parent reply "seany" <seany uni-bonn.de> writes:
On Monday, 18 November 2013 at 21:14:18 UTC, Jacob Carlborg wrote:
 On 2013-11-18 16:58, seany wrote:
 i dont want to install them,  but keep them in my local home 
 drive, like
 i have now, without any systemwide change, and the dvm page 
 seem to
 incate that it only works for 32 bit?
DVM installs the compilers and itself in ~/.dvm. On Windows it's somewhere in the user's home directory (can't recall exactly where right now). DVM only ships 32bit pre-compiled binaries. Any 64bit system can run 32bit binaries. By default it will install 32bit compilers. Use the --64bit flag to install the 64it compiler.
 I just wanted to give dmd 2.064 a test ride.
That's exactly what DVM is for. It's easy to install new compilers and give them a try. They won't interfere with each other.
Hi! today i managed to redownload the dmd2.064,a nd rehack the dmd.conf, and now it runs, without previously mentioned errors, but ONLY WHEN tango is NOT linked. Should I rebuild tango?
Nov 20 2013
parent Jacob Carlborg <doob me.com> writes:
On 2013-11-20 15:26, seany wrote:

 Hi! today i managed to redownload the dmd2.064,a nd rehack the dmd.conf,
 and now it runs, without previously mentioned errors, but ONLY WHEN
 tango is NOT linked.
 Should I rebuild tango?
Yes, always rebuild all your libraries when updating the compiler. -- /Jacob Carlborg
Nov 20 2013