www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - dmd from git segfaulting when used with wrong version of druntime

reply deadalnix <deadalnix gmail.com> writes:
Hi,

I'm running linux debian x86_64, it may matter.

The current version of dmd in git master segfault every single time it 
is ran with an old version of druntime. This is already an issue that 
the compiler segfault instead of providing any usefull error message (or 
at least a stack trace, which I can't get even with gdb for unknown 
reasons).

But worse : even with playing with the command line, I'm unable to get 
the right version of druntime used.

This means that I'm reduced to either fuck up my whole system by 
replacing druntime by the git one, or modify global config file to 
achieve similar results.

This means stop any meaning full work *IN* D when I work *ON* D. This is 
very problematic, and likely to stop me to work *ON* right now.

Is it possible to use a given druntime with some command line when 
calling dmd ? If it is, HOW ? If it isn't, I highly encourage this to be 
planned ASAP.
May 08 2012
next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 5/8/2012 1:05 PM, deadalnix wrote:
 I'm running linux debian x86_64, it may matter.

 The current version of dmd in git master segfault every single time it is ran
 with an old version of druntime. This is already an issue that the compiler
 segfault instead of providing any usefull error message (or at least a stack
 trace, which I can't get even with gdb for unknown reasons).

 But worse : even with playing with the command line, I'm unable to get the
right
 version of druntime used.

 This means that I'm reduced to either fuck up my whole system by replacing
 druntime by the git one, or modify global config file to achieve similar
results.

 This means stop any meaning full work *IN* D when I work *ON* D. This is very
 problematic, and likely to stop me to work *ON* right now.

 Is it possible to use a given druntime with some command line when calling dmd
?
 If it is, HOW ? If it isn't, I highly encourage this to be planned ASAP.

This is a result of fixing the ABI for structs on Linux 64. You'll have to recompile druntime with the new dmd. A recompile of druntime/phobos should be sufficient.
May 08 2012
next sibling parent reply deadalnix <deadalnix gmail.com> writes:
Le 08/05/2012 22:36, Walter Bright a écrit :
 This is a result of fixing the ABI for structs on Linux 64. You'll have
 to recompile druntime with the new dmd. A recompile of druntime/phobos
 should be sufficient.

Good news that is fixed ! I already did compile druntime and phobos with he new dmd, but I'm failing to use them without f***ing up my system. Can't I specify druntime and phobos using argument in command line ?
May 08 2012
parent reply Jacob Carlborg <doob me.com> writes:
On 2012-05-08 22:55, deadalnix wrote:
 Le 08/05/2012 22:36, Walter Bright a écrit :
 This is a result of fixing the ABI for structs on Linux 64. You'll have
 to recompile druntime with the new dmd. A recompile of druntime/phobos
 should be sufficient.

Good news that is fixed ! I already did compile druntime and phobos with he new dmd, but I'm failing to use them without f***ing up my system. Can't I specify druntime and phobos using argument in command line ?

Use can use DVM to compile DMD. It will set up a correctly working dmd.conf/sc.ini file. https://bitbucket.org/doob/dvm Example of folder structure: dlang |- dmd |- druntiem |- phobos In the dlang folder, run: $ dvm compile . -- /Jacob Carlborg
May 09 2012
parent Jacob Carlborg <doob me.com> writes:
On 2012-05-09 18:21, Andrej Mitrovic wrote:
 On 5/9/12, Jacob Carlborg<doob me.com>  wrote:
 Use can use DVM to compile DMD.

Is this feature available for Windows too?

Yes. -- /Jacob Carlborg
May 09 2012
prev sibling next sibling parent simendsjo <simendsjo gmail.com> writes:
On Wed, 09 May 2012 10:03:42 +0200, Jacob Carlborg <doob me.com> wrote:
  Use can use DVM to compile DMD. It will set up a correctly working  
 dmd.conf/sc.ini file.
  https://bitbucket.org/doob/dvm
  Example of folder structure:
  dlang
   |- dmd
   |- druntiem
   |- phobos
  In the dlang folder, run:
  $ dvm compile .

Another possibility is to add you own "trunk" in dvm/bin,env and compilers, and build dmd yourself when you need to.
May 09 2012
prev sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 5/9/12, Jacob Carlborg <doob me.com> wrote:
 Use can use DVM to compile DMD.

Is this feature available for Windows too?
May 09 2012
prev sibling parent reply Brad Roberts <braddr slice-2.puremagic.com> writes:
On Tue, 8 May 2012, deadalnix wrote:

 Hi,
 
 I'm running linux debian x86_64, it may matter.
 
 The current version of dmd in git master segfault every single time it is ran
 with an old version of druntime. This is already an issue that the compiler
 segfault instead of providing any usefull error message (or at least a stack
 trace, which I can't get even with gdb for unknown reasons).
 
 But worse : even with playing with the command line, I'm unable to get the
 right version of druntime used.
 
 This means that I'm reduced to either fuck up my whole system by replacing
 druntime by the git one, or modify global config file to achieve similar
 results.
 
 This means stop any meaning full work *IN* D when I work *ON* D. This is very
 problematic, and likely to stop me to work *ON* right now.
 
 Is it possible to use a given druntime with some command line when calling dmd
 ? If it is, HOW ? If it isn't, I highly encourage this to be planned ASAP.

You can use -defaultlib=libname to tell it where to find the libphobos2.a (which will contain the runtime if you built with the standard make files). However, the way I recommend is to drop a dmd.conf (or sc.ini on windows) file in the same directory as the built dmd executable that points to the right directories for your newly built druntime and phobos.
May 08 2012
parent deadalnix <deadalnix gmail.com> writes:
Le 09/05/2012 02:23, Brad Roberts a écrit :
 However, the way I recommend is to drop a dmd.conf (or sc.ini on windows)
 file in the same directory as the built dmd executable that points to the
 right directories for your newly built druntime and phobos.

I did that and it work great ! Thank you. (thank to other people too :D). BTW, wouldn't be a good idea to make dmd.conf's parameter less important than command line one ?
May 09 2012