digitalmars.D - dmd.conf no longer working?
- Andrei Alexandrescu (8/8) Oct 22 2015 Hi folks, I'm having trouble setting up dmd on a fresh system. The short...
- ketmar (6/6) Oct 22 2015 i believe that envs now should be:
- Andrei Alexandrescu (7/12) Oct 22 2015 Tried both of them, nothing works. Also, the preexisting dmd on ubuntu
- ketmar (6/6) Oct 22 2015 hm. sorry, i forgot to mention that i'm using git HEAD. it seems
- Jacob Carlborg (5/6) Oct 22 2015 There's no point in having different sections on OS X, because all
- Andrei Alexandrescu (13/13) Oct 22 2015 OK, I think I figured the problem: Unicode!
- ketmar (1/1) Oct 22 2015 exactly! i just added BOM to dmd.conf, and got the same assertion.
- Walter Bright (2/3) Oct 23 2015 Time to file in Bugzilla.
- ketmar (2/3) Oct 23 2015 Andrei already did that:
- Jesse Phillips (5/18) Oct 22 2015 The BOM was such a stupid thing. UTF-8 should have never allowed
- Jacob Carlborg (9/15) Oct 22 2015 A couple of things:
- Marco Leise (13/32) Oct 22 2015 You can also combine common options under [Environment] like
- Jacob Carlborg (4/12) Oct 22 2015 Aha, cool.
- Kagamin (16/16) Oct 23 2015 Or ditch the whole thing and dogfood D parser for config:
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
Oct 22 2015
i believe that envs now should be: [Environment32] or [Environment64] seems that OS X version is the one with old [Environment], so it fails.
Oct 22 2015
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
Oct 22 2015
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?
Oct 22 2015
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
Oct 22 2015
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
Oct 22 2015
exactly! i just added BOM to dmd.conf, and got the same assertion.
Oct 22 2015
On 10/22/2015 12:31 PM, ketmar wrote:exactly! i just added BOM to dmd.conf, and got the same assertion.Time to file in Bugzilla.
Oct 23 2015
Time to file in Bugzilla.Andrei already did that: https://issues.dlang.org/show_bug.cgi?id=15237
Oct 23 2015
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. AndreiThe 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.
Oct 22 2015
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
Oct 22 2015
Am Thu, 22 Oct 2015 21:50:33 +0200 schrieb Jacob Carlborg <doob me.com>:On 2015-10-22 19:43, Andrei Alexandrescu wrote:You can also combine common options under [Environment] like this: [Environment] DFLAGS=3D-I/opt/dmd-2.069/import -L--export-dynamic -defaultlib=3Dphobos2 -= verrors=3D0 [Environment32] DFLAGS=3D%DFLAGS% -L-L/opt/dmd-2.069/lib32 -L-rpath -L/opt/dmd-2.069/lib32 [Environment64] DFLAGS=3D%DFLAGS% -L-L/opt/dmd-2.069/lib64 -L-rpath -L/opt/dmd-2.069/lib64 --=20 MarcoHi 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=3Dvalue' syntax, not '=EF=BB=BF[ENVIRONMENT]' What happened?=20 A couple of things: =20 * I recommend compiling with -v, it will output the path to dmd.conf =20 * It should be Environment32 and/or Environment64 for Linux. For OS X=20 it's Environment. It should _not_ be ENVIRONMENT =20 * You might want to tell us on which platform and how you installed the=20 compiler
Oct 22 2015
On 2015-10-22 23:05, Marco Leise wrote: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/lib64Aha, cool. -- /Jacob Carlborg
Oct 22 2015
Or ditch the whole thing and dogfood D parser for config: enum Environment { DFLAGS=`-I/opt/dmd-2.069/import -L--export-dynamic -defaultlib=phobos2 -verrors=0` } enum Environment32 { DFLAGS=`%DFLAGS% -L-L/opt/dmd-2.069/lib32 -L-rpath -L/opt/dmd-2.069/lib32` } enum Environment64 { DFLAGS=`%DFLAGS% -L-L/opt/dmd-2.069/lib64 -L-rpath -L/opt/dmd-2.069/lib64` }
Oct 23 2015