http://bugs.winehq.org/show_bug.cgi?id=31057
Bug #: 31057 Summary: makefile(3) : fatal error U1034: syntax error : separator missing Product: Wine Version: 1.5.5 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: mathieu.malaterre@gmail.com Classification: Unclassified
Wine does install VS 2005 Express nicely. Nmake & cl.exe are working as should.
However when installing VS 2005 C++ SP1, everything starts failing. For instance nmake stops working, and report:
nmake
Microsoft (R) Program Maintenance Utility Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved.
makefile(3) : fatal error U1034: syntax error : separator missing Stop.
Steps:
$ rm -rf $HOME/.wine $ winetricks --no-isolate vc2005express $ wget http://download.microsoft.com/download/7/7/3/7737290f-98e8-45bf-9075-85cc6ae... $ wine VS80sp1-KB926748-X86-INTL.exe
hint: you may need to run twice 'wine VS80sp1-KB926748-X86-INTL.exe' to get it working. Sometimes using 'winetricks vcrun2005' helps out...
Anyway from wine then simply do:
$ wine cmd
"%VS80COMNTOOLS%vsvars32.bat" nmake
Here is the simple Makefiles I am using:
$ cat Makefile foo: main.cpp cl main.cpp
Thanks !
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #1 from Mathieu Malaterre mathieu.malaterre@gmail.com 2012-06-28 07:01:07 CDT --- Created attachment 40767 --> http://bugs.winehq.org/attachment.cgi?id=40767 Makefile
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #2 from Mathieu Malaterre mathieu.malaterre@gmail.com 2012-06-28 07:01:28 CDT --- Created attachment 40768 --> http://bugs.winehq.org/attachment.cgi?id=40768 main.cpp
http://bugs.winehq.org/show_bug.cgi?id=31057
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #40767|application/octet-stream |text/plain mime type| |
http://bugs.winehq.org/show_bug.cgi?id=31057
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #40768|text/x-c++src |text/plain mime type| |
http://bugs.winehq.org/show_bug.cgi?id=31057
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #3 from Dan Kegel dank@kegel.com 2012-06-28 11:31:03 CDT --- Even running the sp1 twice didn't let it install for me; see bug 31039.
http://bugs.winehq.org/show_bug.cgi?id=31057
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, Installer Depends on| |31039
--- Comment #4 from Austin English austinenglish@gmail.com 2012-06-28 12:43:42 CDT --- May be invalid, depends on bug 31039.
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #5 from Mathieu Malaterre mathieu.malaterre@gmail.com 2012-06-28 15:31:12 CDT --- I am using a somewhat patched wine 1.5.5 (*). I could not get wine 1.5.7 to simply install 'winetricks vc2005express'. So you may want to revert to an older wine to get SP1 to install.
(*) http://dev.carbon-project.org/debian/wine-unstable/
http://bugs.winehq.org/show_bug.cgi?id=31057
Dmitry Utkin loentar@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |loentar@gmail.com
--- Comment #6 from Dmitry Utkin loentar@gmail.com 2013-05-01 13:17:46 CDT --- I have same thing with Windows SDK provided NMAKE when nmake is started _under the same architecture_ as WINEARCH.
When I start 32-bit nmake.exe under 32-bit wineprefix (and win32 winearch) it cause that error.
When I start 64-bit nmake.exe under 64-bit wineprefix (and x64 winearch) it cause that error.
But, when I start 32-bit nmake.exe under 64-bit wineprefix (and x64 winearch) it works well.
This bug is reproduced even on that simple makefile as such:
---- all: echo ok ----
I have that makefile in the same dir as nmake.exe for clear experiment (without calling any vcvars32.bat).
My commands are:
---- cd "~/.wine~x86/drive_c/Program Files/Microsoft Visual Studio 10.0/VC/bin" WINEPREFIX=~/.wine~x86 WINEARCH=win32 wine cmd nmake ----
I can attach any logs or any additional info to help you fix that bug.
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #7 from Dmitry Utkin loentar@gmail.com 2013-05-06 06:42:25 CDT --- Looks like issue is related to Unicode support.
I you convert Makefile to UTF-16 using iconv, nmake works!
iconv -futf-8 -tutf-16 Makefile >Makefile1 mv Makefile Makefile~ mv Makefile1 Makefile
Example of Makefile that is in UTF-16 encoding is in attach.
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #8 from Dmitry Utkin loentar@gmail.com 2013-05-06 06:44:45 CDT --- Created attachment 44382 --> http://bugs.winehq.org/attachment.cgi?id=44382 Makefile in utf-16
nmake works with this Makefile (it's in UTF-16/UNICODE), but does not work with makefiles in multibyte encodings.
http://bugs.winehq.org/show_bug.cgi?id=31057
Hin-Tak Leung htl10@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |htl10@users.sourceforge.net
--- Comment #9 from Hin-Tak Leung htl10@users.sourceforge.net 2013-06-01 21:58:35 CDT --- This appears to be a regression. I am on the same machine and $WINEPREFIX (more or less) as 3 years ago, and I just haven't used vc in wine for that long. See bug 21890 /21394 - back in mid 2010, nmake used to work very well, with wine 1.1.{35-44}.
I just remembered - the last time I used it successfully was with gs 9.06, so it was August 2012, less than 10 months ago. It would have been with 1.5.10 or 1.5.11 .
I tried unsetting LANG and LC_* (maybe I need to go further with winserver, etc) but no improvements.
At first I suspect upstream code change. But doing iconv -f utf8 -t utf16 works, and it is just painful to do it for all 90+ included makefiles....
one possibility is that the same binary of nmake behaves differently depends on OS version...
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #10 from Dan Kegel dank@kegel.com 2013-06-01 22:14:41 CDT --- Can you confirm that the makefile has tabs, not spaces?
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #11 from Dmitry Utkin loentar@gmail.com 2013-06-03 05:05:57 CDT --- Created attachment 44638 --> http://bugs.winehq.org/attachment.cgi?id=44638 commands and tests
I made advanced testing. Results are in attachment.
http://bugs.winehq.org/show_bug.cgi?id=31057
Dmitry Utkin loentar@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #44638|0 |1 is obsolete| |
--- Comment #12 from Dmitry Utkin loentar@gmail.com 2013-06-03 05:08:02 CDT --- Created attachment 44639 --> http://bugs.winehq.org/attachment.cgi?id=44639 commands and tests
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #13 from Hin-Tak Leung htl10@users.sourceforge.net 2013-06-06 07:14:34 CDT --- (In reply to comment #10)
Can you confirm that the makefile has tabs, not spaces?
Yes. nmake is now aborting and complaining about the 2nd line (the first 20+ lines are comments). It isn't reaching the parts where tabs vs spaces matter. (and the makefiles are correct with tabs as far as I see).
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #14 from Hin-Tak Leung htl10@users.sourceforge.net 2013-06-12 06:56:05 CDT --- I have something different: I have both VC8 (2005) and VC9 (2008, part of sdk 7). nmake from vc8 is working, nmake in vc9 is broken. Both used to work. HTA.
http://bugs.winehq.org/show_bug.cgi?id=31057
dnyaneshwar d_dnyanu@rediffmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |d_dnyanu@rediffmail.com
http://bugs.winehq.org/show_bug.cgi?id=31057
Roman Kagan rkagan@mail.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rkagan@mail.ru
--- Comment #15 from Roman Kagan rkagan@mail.ru 2013-11-08 09:44:09 CST --- Me too:
wine-1.7.5 packaged with Fedora 19 nmake from WDK7.1 clean WINEPREFIX, with only a few basic MSI packages from WDK installed via msiexec.
Also experimented a bit around comment 6 and comment 7.
In my experiments WINEARCH didn't make any difference.
What did, however, was the presence of the byte-order mark at the beginning of the Makefile.
E.g.
# echo -e 'all:\n\techo ok' > Makefile # wine nmake.exe -nologo fixme:heap:HeapSetInformation (nil) 1 (nil) 0 makefile(3) : fatal error U1034: syntax error : separator missing Stop.
the same with UTF-8 BOM:
# echo -e '\xef\xbb\xbfall:\n\techo ok' > Makefile wine nmake.exe -nologo fixme:heap:HeapSetInformation (nil) 1 (nil) 0 echo ok fixme:file:NeedCurrentDirectoryForExePathW (L"echo"): partial stub ok
Ditto with the recipe from comment 7: if you use iconv ... -t utf-16le which omits BOM, nmake still fails to parse the Makefile correctly.
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #16 from Dmitry Timoshkov dmitry@baikal.ru 2013-11-08 10:08:21 CST --- Does it help if you make sure that all lines in Makefile end with \r\n and tabs are in proper starting positions?
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #17 from Roman Kagan rkagan@mail.ru 2013-11-08 10:19:34 CST --- (In reply to comment #16)
Does it help if you make sure that all lines in Makefile end with \r\n and tabs are in proper starting positions?
No. All that seem to matter is BOM.
# echo -e 'all:\n\techo ok' > Makefile # unix2dos Makefile unix2dos: converting file Makefile to DOS format ... # wine nmake.exe -nologo fixme:heap:HeapSetInformation (nil) 1 (nil) 0 makefile(3) : fatal error U1034: syntax error : separator missing Stop.
# echo -e 'all:\n\techo ok' > Makefile # unix2dos --add-bom Makefile unix2dos: converting file Makefile to DOS format ... # wine nmake.exe -nologo fixme:heap:HeapSetInformation (nil) 1 (nil) 0 echo ok fixme:file:NeedCurrentDirectoryForExePathW (L"echo"): partial stub ok
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #18 from Roman Kagan rkagan@mail.ru 2013-11-11 03:22:13 CST --- I seem to have narrowed it down to a problem with msvcrt.ungetwc() on a file lacking BOM:
with BOM (working):
# echo -e '\xef\xbb\xbfall:\n\techo ok' > Makefile # WINEDEBUG=trace+relay wine nmake.exe 2>&1 | grep -F msvcrt. ... 0009:Call msvcrt._wfsopen(0012ed70 L"makefile",00401368 L"rt,ccs=unicode",00000020) ret=0040a88e 0009:Ret msvcrt._wfsopen() retval=7ef14220 ret=0040a88e 0009:Call msvcrt.fgetwc(7ef14220) ret=00407fd8 0009:Ret msvcrt.fgetwc() retval=00000061 ret=00407fd8 0009:Call msvcrt.ungetwc(00000061,7ef14220) ret=0040a358 0009:Ret msvcrt.ungetwc() retval=00000061 ret=0040a358 0009:Call msvcrt.fgetwc(7ef14220) ret=00407fd8 0009:Ret msvcrt.fgetwc() retval=00000061 ret=00407fd8 0009:Call msvcrt.fgetwc(7ef14220) ret=00407fd8 0009:Ret msvcrt.fgetwc() retval=0000006c ret=00407fd8 0009:Call msvcrt.fgetwc(7ef14220) ret=00407fd8 0009:Ret msvcrt.fgetwc() retval=0000006c ret=00407fd8 0009:Call msvcrt.fgetwc(7ef14220) ret=00407fd8 0009:Ret msvcrt.fgetwc() retval=0000003a ret=00407fd8 0009:Call msvcrt.ungetwc(0000003a,7ef14220) ret=00409b56 0009:Ret msvcrt.ungetwc() retval=0000003a ret=00409b56 0009:Call msvcrt._wcsicmp(00422178 L"all",0040178c L"include") ret=0040a23a 0009:Ret msvcrt._wcsicmp() retval=fffffff8 ret=0040a23a ...
without BOM (non-working):
# echo -e 'all:\n\techo ok' > Makefile # WINEDEBUG=trace+relay wine nmake.exe 2>&1 | grep -F msvcrt. ... 0009:Call msvcrt._wfsopen(0012ed70 L"makefile",00401368 L"rt,ccs=unicode",00000020) ret=0040a88e 0009:Ret msvcrt._wfsopen() retval=7ef07220 ret=0040a88e 0009:Call msvcrt.fgetwc(7ef07220) ret=00407fd8 0009:Ret msvcrt.fgetwc() retval=00000061 ret=00407fd8 0009:Call msvcrt.ungetwc(00000061,7ef07220) ret=0040a358 0009:Ret msvcrt.ungetwc() retval=ffffffff ret=0040a358 0009:Call msvcrt.fgetwc(7ef07220) ret=00407fd8 0009:Ret msvcrt.fgetwc() retval=00000000 ret=00407fd8 0009:Call msvcrt.fgetwc(7ef07220) ret=00407fd8 0009:Ret msvcrt.fgetwc() retval=0000006c ret=00407fd8 0009:Call msvcrt.fgetwc(7ef07220) ret=00407fd8 0009:Ret msvcrt.fgetwc() retval=0000006c ret=00407fd8 0009:Call msvcrt.fgetwc(7ef07220) ret=00407fd8 0009:Ret msvcrt.fgetwc() retval=0000003a ret=00407fd8 0009:Call msvcrt.ungetwc(0000003a,7ef07220) ret=00409b56 0009:Ret msvcrt.ungetwc() retval=0000003a ret=00409b56 0009:Call msvcrt._wcsicmp(00422178 L"",0040178c L"include") ret=0040a23a 0009:Ret msvcrt._wcsicmp() retval=ffffff97 ret=0040a23a ...
Note that in the latter case ungetwc() fails but apparently nmake ignores the error, then the following fgetwc() returns null, which screws up everything else.
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #19 from Roman Kagan rkagan@mail.ru 2013-11-11 03:39:42 CST --- Created attachment 46500 --> http://bugs.winehq.org/attachment.cgi?id=46500 minimal reproducer
Minimal reproducer for the ungetwc() problem.
Build with MSVC:
cl -MD repro.c
or mingw32:
i686-w64-mingw32-gcc repro.c -o repro.exe
Run:
# echo -e '\xef\xbb\xbfhi there' > Makefile # wine repro.exe hi there # echo 'hi there' > Makefile # wine repro.exe #
http://bugs.winehq.org/show_bug.cgi?id=31057
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |testcase
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #20 from Roman Kagan rkagan@mail.ru 2013-11-11 04:50:23 CST --- Looking at the source code, there appears to be a mismatch between MSVCRT_fgetwc() and MSVCRT_ungetwc(): the latter ignores all the smartness of the former, and just feeds all the bytes of its argument to MSVCRT_ungetc() one by one.
However, in case of a file without BOM, the file position after the first fgetwc() is rightfully 1; as a result, only one of the two MSVCRT_ungetc() succeeds.
http://bugs.winehq.org/show_bug.cgi?id=31057
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|-unknown |msvcrt Ever Confirmed|0 |1
--- Comment #21 from Dan Kegel dank@kegel.com 2013-11-11 09:09:59 CST --- Confirming & setting component to msvcrt
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #22 from Roman Kagan rkagan@mail.ru 2013-11-11 14:04:10 CST --- Care to update the version as well? The bug is present in the current git master.
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #23 from Dan Kegel dank@kegel.com 2013-11-11 14:08:24 CST --- The version field means "the version this bug was first seen in", so it should not usually be updated.
http://bugs.winehq.org/show_bug.cgi?id=31057
bbeschow@cs.tu-berlin.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bbeschow@cs.tu-berlin.de
--- Comment #24 from bbeschow@cs.tu-berlin.de 2013-12-01 14:44:02 CST --- I could get nmake of the psdkwin7 package work again with wine 1.7.7 like this:
1) start winecfg 2) go to the "Libraries" tab 3) add new override for library "msvcr90" 4) select "Native (Windows)" after pressing the "Edit" button => have fun
http://bugs.winehq.org/show_bug.cgi?id=31057
Bug 31057 depends on bug 31039, which changed state.
Bug 31039 Summary: Visual C++ 2005 Express SP1 install fails http://bugs.winehq.org/show_bug.cgi?id=31039
What |Old Value |New Value ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
http://bugs.winehq.org/show_bug.cgi?id=31057
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |piotr.caban@gmail.com
--- Comment #25 from Piotr Caban piotr.caban@gmail.com --- It's probably fixed by commit 6122c2ba37a8871c6118d0596e9576b17660f581. Please retest.
http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #26 from bbeschow@cs.tu-berlin.de --- Yes, with current master I'm able to run nmake w/o the workaround for msvcr90.dll. Thanks for the fix!
http://bugs.winehq.org/show_bug.cgi?id=31057
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |6122c2ba37a8871c6118d0596e9 | |576b17660f581 Status|NEW |RESOLVED CC| |focht@gmx.net Resolution|--- |FIXED
--- Comment #27 from Anastasius Focht focht@gmx.net --- Hello folks,
reported fixed by commit http://source.winehq.org/git/wine.git/commitdiff/6122c2ba37a8871c6118d0596e9...
Thanks Piotr
Regards
https://bugs.winehq.org/show_bug.cgi?id=31057
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #28 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.10.