| Ticket UUID: | 9280abbaf57fca3eb40a89403d9d891853209bb6 | ||
| Title: | Compiling core-8-branch with msvc6 32 bit results in compile error in tclInt.h(2456): missing ')' | ||
| Type: | Bug | Created on: | 2018-02-07 18:52:37 |
| Submitter: | oehhar | Assigned to: | jan.nijtmans |
| Subsystem: | - New Builtin Commands | Severity: | Minor |
| Priority: | 5 Medium | Last modified: | 2018-02-09 08:51:53 |
| Status: | Closed | Closed by: | oehhar |
| Resolution: | Fixed | Closed on: | 2018-02-09 08:51:53 |
| Version: | core-8-branch | ||
| Description: | ||||
|
When compiling current [core-8-branch] [4f6d4a2b15], I get the following compile error: C:\test\tcl-tip499-msgcat-custom-preferences-branch\win\..\generic\tclInt.h(2456) : fatal error C1012: unmatched parenthesis : missing ')' Compiling with MSVC 6 on 32 bit. All options (I broke the long cl line manually):
cl -nologo -c /D_ATL_XP_TARGETING /DUNICODE /D_UNICODE -W3
-FpC:\test\tcl-tip499-msgcat-custom-preferences-branch\win\Release\tcl_ThreadedDynamic\ -Op -QI0f -O2 -YX -DTCL_TOMMATH -DMP_PREC=4
-Dinline=__inline -DHAVE_ZLIB=1 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DTCL_CFGVAL_ENCODING=\"cp1252\" -DSTDC_HEADERS
-DTCL_THREADS=1 -DUSE_THREAD_ALLOC=1 -DNDEBUG -DTCL_CFG_OPTIMIZED -DNO_STRTOI64 -Zl -DSTATIC_BUILD
-I"C:\test\tcl-tip499-msgcat-custom-preferences-branch\win\..\win" -I"C:\test\tcl-tip499-msgcat-custom-preferences-branch\win\..\generic"
-I"C:\test\tcl-tip499-msgcat-custom-preferences-branch\win\..\libtommath"
-FoC:\test\tcl-tip499-msgcat-custom-preferences-branch\win\Release\tcl_ThreadedDynamic\tclStubLib.obj
C:\test\tcl-tip499-msgcat-custom-preferences-branch\win\..\generic\tclStubLib.c
tclStubLib.c
C:\test\tcl-tip499-msgcat-custom-preferences-branch\win\..\generic\tclInt.h(2456) : fatal error C1012: unmatched parenthesis : missing ')'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
| ||||
| User Comments: | ||||
sebres added on 2018-02-08 10:00:53:
Still worse, I assume your "nmakehlp.exe" was already build previously, therefore nmake runs further... I've checked out the clean copy and nmake fails still before compiling with: rules.vc(1315) : fatal error U1023: syntax error in expression After short analyze I found that "versions.vc" is wrong (TCL_MINOR_VERSION, etc. are empty), so TCL_VERSION substitutes into "TCL_MINOR_VERSION = TCL_PATCH_LEVEL =". This occurs because "nmakehlp.exe" was linked as 40KB pure zero-file (contains zero's only), so "valid" 16-bit application that return always an empty string. WiP sebres added on 2018-02-08 12:00:35:
Well the issue with compile to zero-filled "nmakehlp.exe" seems to be my VM-related issue, occurs because of the compiling in VM using shared folders on host system (I assume the cl/link somehow "conflict" with the mapped drive/shared folder driver, etc). Doing the same on local drive in the VM works pretty good and creates correct "nmakehlp.exe". sebres added on 2018-02-08 13:54:06:
After I've fixed my small problem with "nmakehlp.exe", all was compiled very well. @Harald: The last SDK that will stil work with VC6.0 is "Windows Server 2003 SP1 Platform SDK", Version 3790.1830 from 5/2/2005 works fine for me: https://www.microsoft.com/en-us/download/details.aspx?id=6510 After installation, you should pre-set the paths to SDK in your Env or in your VCVARS32.BAT. My VCVARS32 looks like:
rem [SB] use latest SDK (compatible with VS 6.0):
set PlatformSDK=C:\Program Files\Microsoft Platform SDK
set INCLUDE=%PlatformSDK%\Include;%INCLUDE%
set LIB=%PlatformSDK%\Lib;%LIB%
...
@Jan Could you reproduce it? sebres added on 2018-02-08 14:48:09:
@Harald: I've reproduced it however (sorry, was my bad - compiled on wrong system, too many test-machines ;) Fixed now in [ed8f5966a3], branch: fix-9280abbaf57fca3e-long-vs-wide) @Jan: Just BTW, if compiled for 32-bit (where Tcl_WideInt is not long), I got additionally several hundert warnings like: warning C4244: '=' : conversion from '__int64 ' to 'int ', possible loss of data Possibly we should write a macro for "safe" cast with expected truncate (to avoid the warning and for better control of such code-pieces later)? oehhar added on 2018-02-08 15:37:19:
Sergey, first off all, thank you a lot that you care so much. And congratualtion that you have found the issue. You are a real Wizard... My environment is similar to your described environment. The only difference is the platform sdk: I use Platform SDK (R2) 3790.2075 Ashok wrote once, that there is one slightly newer, which still works with MS-VC6. My one failed when building tclkits with Ashoks instructions. Thank you, Harald oehhar added on 2018-02-09 08:51:53:
Dear Jan and Sergej, good work. I have checked, everything works. Test suite is clean (compared to 8.7a1), but some registry test failures. I will open a separated bug for that. Thank you, Harald | ||||
