Thread overview | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
October 22, 2015 dmd.conf no longer working? | ||||
---|---|---|---|---|
| ||||
Hi folks, I'm having trouble setting up dmd on a fresh system. The short of it is nothing in dmd.conf seems to be taken into account. Furthermore, sections such as [Environment] are rejected with the error message: Error: Use 'NAME=value' syntax, not '[ENVIRONMENT]' What happened? Thanks, Andrei |
October 22, 2015 Re: dmd.conf no longer working? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | i believe that envs now should be: [Environment32] or [Environment64] seems that OS X version is the one with old [Environment], so it fails. |
October 22, 2015 Re: dmd.conf no longer working? | ||||
---|---|---|---|---|
| ||||
Posted in reply to ketmar | On 10/22/2015 01:58 PM, ketmar wrote:
> i believe that envs now should be:
>
> [Environment32]
>
> or
>
> [Environment64]
>
> seems that OS X version is the one with old [Environment], so it fails.
Tried both of them, nothing works. Also, the preexisting dmd on ubuntu fails like this:
dmd: inifile.c:141: void writeToEnv(StringTable*, char*): Assertion `p' failed.
Could this be a problem with my environment?
Andrei
|
October 22, 2015 Re: dmd.conf no longer working? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | hm. sorry, i forgot to mention that i'm using git HEAD. it seems to work ok in HEAD. just checked 2.068.2, freshly downloaded, and it seems to work fine (at least 32-bit version). it looks like you have something weird with your system. maybe some environment var set to something strange? |
October 22, 2015 Re: dmd.conf no longer working? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | OK, I think I figured the problem: Unicode! I have the following repro with DMD64 D Compiler v2.068.2 on Ubuntu 15 (the default installation). If there's no ~/dmd.conf, running 'dmd' alone displays the options. If there's a zero byte dmd.conf, things still work. If there's a dmd.conf in Unicode format (I suspect with the two signature bytes), dmd crashes with: dmd: inifile.c:141: void writeToEnv(StringTable*, char*): Assertion `p' failed. This was caused by the MonoDevelop editor, which saves files in the format. Emacs also happily loads these files and signals the format with a "U" in the status bar. Andrei |
October 22, 2015 Re: dmd.conf no longer working? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | exactly! i just added BOM to dmd.conf, and got the same assertion. |
October 22, 2015 Re: dmd.conf no longer working? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 2015-10-22 19:43, Andrei Alexandrescu wrote: > Hi folks, I'm having trouble setting up dmd on a fresh system. The short > of it is nothing in dmd.conf seems to be taken into account. > Furthermore, sections such as [Environment] are rejected with the error > message: > > Error: Use 'NAME=value' syntax, not '[ENVIRONMENT]' > > What happened? A couple of things: * I recommend compiling with -v, it will output the path to dmd.conf * It should be Environment32 and/or Environment64 for Linux. For OS X it's Environment. It should _not_ be ENVIRONMENT * You might want to tell us on which platform and how you installed the compiler -- /Jacob Carlborg |
October 22, 2015 Re: dmd.conf no longer working? | ||||
---|---|---|---|---|
| ||||
Posted in reply to ketmar | On 2015-10-22 19:58, ketmar wrote: > seems that OS X version is the one with old [Environment], so it fails. There's no point in having different sections on OS X, because all libraries are universal. -- /Jacob Carlborg |
October 22, 2015 Re: dmd.conf no longer working? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | Am Thu, 22 Oct 2015 21:50:33 +0200 schrieb Jacob Carlborg <doob@me.com>: > On 2015-10-22 19:43, Andrei Alexandrescu wrote: > > Hi folks, I'm having trouble setting up dmd on a fresh system. The short of it is nothing in dmd.conf seems to be taken into account. Furthermore, sections such as [Environment] are rejected with the error message: > > > > Error: Use 'NAME=value' syntax, not '[ENVIRONMENT]' > > > > What happened? > > A couple of things: > > * I recommend compiling with -v, it will output the path to dmd.conf > > * It should be Environment32 and/or Environment64 for Linux. For OS X it's Environment. It should _not_ be ENVIRONMENT > > * You might want to tell us on which platform and how you installed the compiler You can also combine common options under [Environment] like this: [Environment] DFLAGS=-I/opt/dmd-2.069/import -L--export-dynamic -defaultlib=phobos2 -verrors=0 [Environment32] DFLAGS=%DFLAGS% -L-L/opt/dmd-2.069/lib32 -L-rpath -L/opt/dmd-2.069/lib32 [Environment64] DFLAGS=%DFLAGS% -L-L/opt/dmd-2.069/lib64 -L-rpath -L/opt/dmd-2.069/lib64 -- Marco |
October 23, 2015 Re: dmd.conf no longer working? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Thursday, 22 October 2015 at 19:25:43 UTC, Andrei Alexandrescu wrote:
> OK, I think I figured the problem: Unicode!
>
> I have the following repro with DMD64 D Compiler v2.068.2 on Ubuntu 15 (the default installation). If there's no ~/dmd.conf, running 'dmd' alone displays the options.
>
> If there's a zero byte dmd.conf, things still work.
>
> If there's a dmd.conf in Unicode format (I suspect with the two signature bytes), dmd crashes with:
>
> dmd: inifile.c:141: void writeToEnv(StringTable*, char*): Assertion `p' failed.
>
> This was caused by the MonoDevelop editor, which saves files in the format. Emacs also happily loads these files and signals the format with a "U" in the status bar.
>
>
> Andrei
The BOM was such a stupid thing. UTF-8 should have never allowed a BOM and the byte order should have been defined for the other formats.
|
Copyright © 1999-2021 by the D Language Foundation