| |
| Posted by Kenji Hara | PermalinkReply |
|
Kenji Hara
| http://d.puremagic.com/issues/show_bug.cgi?id=9330
Summary: Cannot run dmd test suite with MSYS
Product: D
Version: unspecified
Platform: x86_64
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody@puremagic.com
ReportedBy: k.hara.pg@gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg@gmail.com> 2013-01-16 21:44:49 PST ---
DMD fails to invoke LINK.EXE for the build of `d_do_test.d`.
config file (C:\Users\khara\sc.ini) :
---
[Version]
version=7.51 Build 020
[Environment]
LIB="%HOME%\dmd2\windows\lib";%HOME%\dm\lib
DFLAGS="-I%HOME%\dmd2\src\phobos" "-I%HOME%\dmd2\src\druntime\import"
LINKCMD=%HOME%\dmd2\windows\bin\link.exe
---
environment variables:
---
> echo %HOME%
C:\Users\khara
command lines and outputs:
---
> cd C:\Users\khara\dmd2\src\dmd\test # move to test directory C:\MinGW\msys\1.0\bin\make # run makefile with GNU make in MSYS
Creating output directory: test_results
Building d_do_test tool
OS: win32
OPTLINK (R) for Win32 Release 8.00.12
Copyright (C) Digital Mars 1989-2010 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Warning 9: Unknown Option : KHARA\DMD2\WINDOWS\BIN\LINK.EXE
Users.obj
Error 2: File Not Found Users.obj
--- errorlevel 1
make: *** [test_results/d_do_test] Error 1
================
That is a specific problem for the MSYS environment. With cygwin environment, the problem does not occur.
When dmd invoked from MSYS make, getenv("HOME") returns "C:/Users/khara"
instead of "C:\Users\khara" (note that the path separator difference).
MinGW bug tracker report: http://sourceforge.net/tracker/?func=detail&atid=102435&aid=1100932&group_id=2435
When reading sc.ini, DMD will try to expanding %HOME% environment variable for LINKCMD, but it is expanded to "C:/Users/khara\dmd2\windows\bin\link.exe" under the MSYS, then dmd fails to invoke link command which has the mixtured path separators.
From the MSYS source code, LD_LIBRARY_PATH, TMPDIR, TMP, and TEMP have same
issue.
http://mingw.git.sourceforge.net/git/gitweb.cgi?p=mingw/msys-runtime;a=blob;f=winsup/cygwin/environ.cc;h=b88ca3d39d8d77a4d38be3fcd09e2fa8bbd0c265;hb=77f2469b25911ceebae6741cbd2fa1b0ff6b1d6e#l61
So, this is not actually the bug of DMD, but I think we should add a workaround to support development with MSYS.
To resolve the problem, DMD should normalize path separator on the link command invocation.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
|