May 01, 2005 Re: installation on Win32 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Phlip | Phlip wrote: > Hi. > cd c:\ > unzip dm.zip i guess you mean dmd.zip, because i cant find dm.zip > unzip dmc.zip > add c:\dm\bin to the PATH, then get into dmd/samples/d, and: i guess you mean c:\dmd\bin > dmc hello.d i guess you mean dmd hello.d After doing these obvious corrections to your commands, i tried to reproduce you problem, using a very clean environment. The only way i can get the message: > Error: Error reading file 'object.d' and this is the exact message i got, when i renamed the dmd\bin\sc.ini file to something dmd.exe wont find. So, my guess is there is something wrong with your sc.ini file: the name, the location or the content. And the installation instructions on: http://www.digitalmars.com/d/dcompiler.html are *incomplete* if not wrong. |
May 01, 2005 Re: WELCOME | ||||
---|---|---|---|---|
| ||||
Posted in reply to Phlip | Phlip wrote:
>
> Waitaminute! That's just a warning. The compilation worked, and produced an
> executable. I can live with a warning. (I'l grep -v it out).
>
Does the executable actually run? If phobos.lib isn't found and isn't linked in, how can the program work? Or maybe it's lieing? :-O
What's the filesize of the executable?
-JJR
|
May 01, 2005 Re: WELCOME | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | John Reimer wrote: > Does the executable actually run? If phobos.lib isn't found and isn't linked in, how can the program work? Or maybe it's lieing? :-O The executable runs. What's probably happening is dmd sees two phobos.lib commands, and doesn't reconcile them. One can't be found, so produces a warning. The other one, found, produces the executable. Thanks everyone, and Sammy, please consider the reign of terror over. I'l be back soon to ask how to reflect an expression into a trace statement as text. You know - a job for the C Preprocessor ;-) -- Phlip http://www.c2.com/cgi/wiki?ZeekLand |
May 01, 2005 Re: WELCOME | ||||
---|---|---|---|---|
| ||||
Posted in reply to Phlip | On Sun, 1 May 2005 10:38:47 -0700, Phlip wrote: [snip] > Would "I have installed 4 different distros of Ruby on 6 different computers and each one worked right out of the box" be less off-putting? ;-) I do understand your frustration with this problem. And I know that me saying I've installed D on multiple machines (and now also with Cygwin) - out of the box - and they have always worked is not helping matters. But it is also a true statement. >> (C) Update your PATH symbol so that it includes "c:\dm\bin" and "c:\dmd\bin". You may have to reboot after doing this. > > Gaaarr! I pride myself in only rebooting my WinXP twice a week. The current boot was doing so well, otherwise. Oh well, we'll see which of Sybel's personalities we get this time... > > <pause to reboot> I did say "may". I hadn't noticed which Windows version you were using and as you know, earlier versions of Windows do require a reboot after messing about with the autoexec.bat file. I mentioned the possible need for a reboot also because other people are reading this discussion and it might trigger something for them. > Nope. > > C:\dmd\samples>dmd d\hello.d > Error: Error reading file 'object.d' > > From here, I can work around like this: > > C:\dmd\samples>dmd -IC:\dmd\src\phobos d\hello.d > link hello,,,user32+kernel32/noi; > OPTLINK (R) for Win32 Release 7.50B1 > Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved > > phobos.lib > Warning 2: File Not Found phobos.lib > OPTLINK : Warning 23: No Stack I can exactly reproduce the errors above. In order to do that, I need to 'hide' the c:\dmd\bin\sc.ini file. So at this stage, it seems like either that file is missing, or the logged on user does not have read rights to the file. ----------------------------------------------------------- F:\dmd\samples>rename \dmd\bin\sc.ini sc_hide.ini F:\dmd\samples>dmd d\hello.d Error: Error reading file 'object.d' F:\dmd\samples>dmd d\hello.d -If:\dmd\src\phobos link hello,,,user32+kernel32/noi; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved phobos.lib Warning 2: File Not Found phobos.lib OPTLINK : Warning 23: No Stack hello.obj(hello) Error 42: Symbol Undefined _main hello.obj(hello) Error 42: Symbol Undefined __acrtused_con OPTLINK : Warning 134: No Start Address --- errorlevel 2 F:\dmd\samples>rename \dmd\bin\sc_hide.ini sc.ini F:\dmd\samples>dmd d\hello.d f:\dmd\bin\..\..\dm\bin\link.exe hello,,,user32+kernel32/noi; F:\dmd\samples> -------------------------------------------------- > One final question: What's the argument to dmd to help the linker find phobos.lib? Well I thought that all one would need to do is add it to the command line, but I tried that and it failed too, but not as verbosely... ------------------------------------------------------ F:\dmd\samples>dmd d\hello.d f:\dmd\lib\phobos.lib -If:\dmd\src\phobos link hello,,,f:\dmd\lib\phobos.lib+user32+kernel32/noi; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved phobos.lib Warning 2: File Not Found phobos.lib F:\dmd\samples> ------------------------------------------------------ So, it still seems like there is something unusual going on with the sc.ini file. -- Derek Parnell Melbourne, Australia 2/05/2005 6:45:31 AM |
May 01, 2005 Re: WELCOME | ||||
---|---|---|---|---|
| ||||
Posted in reply to Derek Parnell | Derek Parnell wrote: > So, it still seems like there is something unusual going on with the sc.ini > file. /cygdrive/c/dmd/bin> ll sc.ini -rwxrwxrwx+ 1 plumlee mkpasswd 146 Nov 18 2002 sc.ini /cygdrive/c/dmd/bin> dump sc.ini sc.ini: Addr 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 2 4 6 8 A C E -------- ---- ---- ---- ---- ---- ---- ---- ---- ---------------- 00000000 5b56 6572 7369 6f6e 5d0d 0a76 6572 7369 [Version]..versi 00000010 6f6e 3d37 2e35 3120 4275 696c 6420 3032 on=7.51 Build 02 00000020 300d 0a0d 0a5b 456e 7669 726f 6e6d 656e 0....[Environmen 00000030 745d 0d0a 4c49 423d 2225 4050 255c 2e2e t]..LIB="%@P%\.. 00000040 5c6c 6962 223b 5c64 6d5c 6c69 620d 0a44 \lib";\dm\lib..D 00000050 464c 4147 533d 222d 4925 4050 255c 2e2e FLAGS="-I%@P%\.. 00000060 5c73 7263 5c70 686f 626f 7322 0d0a 4c49 \src\phobos"..LI 00000070 4e4b 434d 443d 2540 5025 5c2e 2e5c 2e2e NKCMD=%@P%\..\.. 00000080 5c64 6d5c 6269 6e5c 6c69 6e6b 2e65 7865 \dm\bin\link.exe 00000090 0d0a .. Note the linefeeds are 0d0a, meaning \r\n, not \n the way God intended... Switch to \n didn't work (which only means dmd correctly interpreted \r as a blank, which is also the way God intended...;). Also, I tested in CMD.EXE, not Bash, guys! -- Phlip http://www.c2.com/cgi/wiki?ZeekLand |
May 01, 2005 Re: WELCOME | ||||
---|---|---|---|---|
| ||||
Posted in reply to Phlip | Phlip wrote:
> Derek Parnell wrote:
>
>
>>So, it still seems like there is something unusual going on with the
>
> sc.ini
>
>>file.
>
>
> /cygdrive/c/dmd/bin> ll sc.ini
> -rwxrwxrwx+ 1 plumlee mkpasswd 146 Nov 18 2002 sc.ini
>
> /cygdrive/c/dmd/bin> dump sc.ini
> sc.ini:
>
> Addr 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 2 4 6 8 A C E
> -------- ---- ---- ---- ---- ---- ---- ---- ---- ----------------
> 00000000 5b56 6572 7369 6f6e 5d0d 0a76 6572 7369 [Version]..versi
> 00000010 6f6e 3d37 2e35 3120 4275 696c 6420 3032 on=7.51 Build 02
> 00000020 300d 0a0d 0a5b 456e 7669 726f 6e6d 656e 0....[Environmen
> 00000030 745d 0d0a 4c49 423d 2225 4050 255c 2e2e t]..LIB="%@P%\..
> 00000040 5c6c 6962 223b 5c64 6d5c 6c69 620d 0a44 \lib";\dm\lib..D
> 00000050 464c 4147 533d 222d 4925 4050 255c 2e2e FLAGS="-I%@P%\..
> 00000060 5c73 7263 5c70 686f 626f 7322 0d0a 4c49 \src\phobos"..LI
> 00000070 4e4b 434d 443d 2540 5025 5c2e 2e5c 2e2e NKCMD=%@P%\..\..
> 00000080 5c64 6d5c 6269 6e5c 6c69 6e6b 2e65 7865 \dm\bin\link.exe
> 00000090 0d0a ..
>
> Note the linefeeds are 0d0a, meaning \r\n, not \n the way God intended...
>
> Switch to \n didn't work (which only means dmd correctly interpreted \r as a
> blank, which is also the way God intended...;).
>
> Also, I tested in CMD.EXE, not Bash, guys!
>
/r/n is normal line ending for windows based text. I don't think that's related to the issue but good thought, nonetheless.
|
May 01, 2005 Re: WELCOME | ||||
---|---|---|---|---|
| ||||
Posted in reply to Phlip | Phlip wrote: > > Thanks everyone, and Sammy, please consider the reign of terror over. > Ok..., :-) I made some more testing. Here is what i found. The only unzip executable on my machine, is the one that comes with Cygwin. cygwin\bin is in my Path, but i work only under cmd.exe box. The first time i unzipped dmc and dmd, i was unable to execute dmd.exe, and the error message was "access denied". I checked the permissions on DM and DMD folders and they look strange. With the explorer, (i have Win XP), i changed the permissions to give all permissions to every one on this 2 folders and their contents. But nothing worked ok (even under cmd.exe). So i started over with a clean install, and unzipped with Winzip. This time every thing was Ok. The only way to get the Phobos related error message was to hide sc.ini. Now, i made on more test. I use the unzip from Infozip. Available at http://www.info-zip.org/pub/infozip/ And every thing is ok. This probably means that the unzip (Cygwin version) do domething special with the files permissions which confuse DMD. May i suggest, if you have cygwin\bin in your path, that you remove it, and you test Infozip unzip to see if it works for you. Sammy |
May 02, 2005 Re: WELCOME | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manfred Nowak |
Manfred,
all I did was to add,
/cygdrive/c/dmd/bin
to the PATH in the .bashrc file and everything is working fine! Good bye DOS command prompt. :-)
Thanks all.
jic
Manfred Nowak says...
>
>jicman <jicman_member@pathlink.com> wrote:
>
>[...]
>> I've tried a bunch of ways to get build and dmd to work with cygwin and I have not.
>[...]
>
>This is cygwin dmd/gdc and digitalmars dmd/build coinstalled on a winXPPro:
>
><copyPasted>
>manfred@home /cygdrive/e/dmd/samples/d
>$ which dmd
>/usr/bin/dmd
>
>manfred@home /cygdrive/e/dmd/samples/d
>$ which build
>/cygdrive/e/dmd/bin/build
>
>manfred@home /cygdrive/e/dmd/samples/d
>$ build hello
>e:\dmd\bin\..\..\dm\bin\link.exe hello,hello.exe,,user32
>+kernel32,hello.def/noi;
>
>manfred@home /cygdrive/e/dmd/samples/d
>$ hello
>hello world
>args.length = 1
>args[0] = 'e:\dmd\samples\d\hello.exe'
></copyPasted>
>
>So at first glance I do not believe that on a sane Win/cygwin/dmd installation there are any problems. If you meet this requirements I am willing to help.
>
>-manfred
|
May 02, 2005 Re: WELCOME | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sammy | Sammy wrote: > I made some more testing. Here is what i found. > > The only unzip executable on my machine, is the one that comes > with Cygwin. cygwin\bin is in my Path, but i work only > under cmd.exe box. Man, muscle memory will Undo me. Of course I unzipped with CygWin, and now the permissions are all -rwxrwxrwx+. I can imagine a CygWin might configure so new files get no execution permissions (that's more secure), but I can't imagine a system screwing up because text files have the x bit set too. (And CygWin maps x onto the NTFS file permissions that _deny_ executability to files that otherwise should execute, like EXE. So CygWin's tar command can expand EXEs that you then can't run...) > So i started over with a clean install, and unzipped with Winzip. This time every thing was Ok. The only way to get the Phobos related error message was to hide sc.ini. Okay. I zilched the folders and expanded with WinXP's Explorer, and... That was it! Thank you, everyone, for helping us discover D has an issue with too many x bits set!! Now here's your reward: http://www.greencheese.org/ZeekLand -- Phlip http://www.c2.com/cgi/wiki?ZeekLand |
May 02, 2005 Re: WELCOME | ||||
---|---|---|---|---|
| ||||
Posted in reply to jicman | jicman <jicman_member@pathlink.com> wrote:
> all I did was to add,
>
> /cygdrive/c/dmd/bin
[...]
Congrat. But the cygwin-PATH is set from the win32-PATH. Then the conclusion of this infomation is, that dmd\bin was not in your win32- path. This in turn would mean, that you did not set the win32-PATH and did not have dmd running under win32?
-manfred
|
Copyright © 1999-2021 by the D Language Foundation