Reputation: 6717
This question is kind of related to my earlier question of compiling and linking ngspice.
ngspice depends on tcl/tk so I have to build it.
I managed to build tcl in release configuration but everything else is failing.
I created a batch based on the information given on this website.
@ECHO OFF
set "vcvars32_bat=C:\LegacyApp\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat"
REM SET VARIABLES
call "%vcvars32_bat%"
set "TCLDIR=..\..\tcl8.6.4"
echo Building tcl Release 32
cd tcl8.6.4\win\
nmake -f makefile.vc > ..\..\tcl_Release32.log 2>&1
cd ..\..\
echo Building tk Release 32
cd tk8.6.4\win\
nmake -f makefile.vc > ..\..\tk_Release32.log 2>&1
cd ..\..\
echo Building tcl Debug 32
cd tcl8.6.4\win\
nmake -f makefile.vc OPTS=symbols > ..\..\tcl_Debug32.log 2>&1
cd ..\..\
echo Building tk Debug 32
cd tk8.6.4\win\
nmake -f makefile.vc OPTS=symbols > ..\..\tk_Debug32.log 2>&1
cd ..\..\
pause
exit 0
I added a bunch of messages to the makefiles so I can see whats going on.
makefile.vc depends on rules.vc. Somehow a custom "make helper" is also involved.
Here is some partial output:
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
makefile.vc
rules.vc
vercl.x
===============================================================================
*** Compiler has 'Optimizations'
*** Compiler does not have 'Pentium 0x0f fix'
*** Linker does not have 'Win98 alignment problem'
*** Doing symbols
*** Intermediate directory will be '.\Debug_VC12\tcl_ThreadedDynamic'
*** Output directory will be '.\Debug_VC12'
*** Suffix for binaries will be 'tg'
*** Optional defines are '-DTCL_CFGVAL_ENCODING=\"cp1252\" -DSTDC_HEADERS -DTCL_THREADS=1 -DUSE_THREAD_ALLOC=1'
*** Compiler version 12. Target machine is IX86
*** Host architecture is AMD64
*** Compiler options '-W3 -DUNICODE -D_UNICODE -Ot -Oi -fp:strict -Gs -GS -GL -RTC1 -W3'
*** Link options '-ltcg'
cdebug = -Zi -WX -RTC1
ldebug = -debug -debugtype:cv
lflags = -nologo -machine:IX86 -ltcg -debug -debugtype:cv
dlllflags = -nologo -machine:IX86 -ltcg -debug -debugtype:cv -dll
conlflags = -nologo -machine:IX86 -ltcg -debug -debugtype:cv -subsystem:console
guilflags = -nologo -machine:IX86 -ltcg -debug -debugtype:cv -subsystem:windows
*** Dependency rules are not being used.
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
===============================================================================
*** Compiler has 'Optimizations'
*** Compiler does not have 'Pentium 0x0f fix'
*** Linker does not have 'Win98 alignment problem'
*** Doing symbols
*** Intermediate directory will be '.\Debug_VC12\itcl_ThreadedDynamic'
*** Output directory will be '.\Debug_VC12'
*** Suffix for binaries will be 'tg'
*** Optional defines are '-DTCL_CFGVAL_ENCODING=\"cp1252\" -DSTDC_HEADERS -DTCL_THREADS=1'
*** Compiler version 12. Target machine is IX86
*** Host architecture is AMD64
*** Compiler options ' -Ot -Oi -fp:strict -Gs -GS -GL -RTC1 -W3'
*** Link options '-ltcg'
link -nologo -machine:IX86 -ltcg -debug:full -debugtype:cv -subsystem:windows -dll -base:@D:\Include\CPP\TCLTK\tcl8.6.4\win\..\win\coffbase.txt,itcl -out:".\Debug_VC12\itcl40tg.dll" "D:\Include\CPP\TCLTK\tcl8.6.4\win\..\win\Debug_VC12\tclstub86.lib" @C:\Users\HIRSCH~1\AppData\Local\Temp\nm8789.tmp
LINK : fatal error LNK1117: syntax error in option 'debug:full'
NMAKE : fatal error U1077: '"C:\LegacyApp\Microsoft Visual Studio 12.0\VC\BIN\link.EXE"' : return code '0x45d'
Stop.
Note that nmake is called a second time with different options and I don't know why or from where.
Is there a known solution to the issues that I am experiencing?
EDIT: I am still on it. 'nmakehlp.exe' seems harmless. I edited a tracelog into it and the tool uses system calls to identify if compiler or linker options are valid. If I use it to see if the linker option '-debug:full' is valid it correctly identifies the error. I still am clueless when it comes to the additional calls to nmake. a textsearch on all files did not reveal where '-debug:full' or its fragments come from.
Upvotes: 1
Views: 507
Reputation: 6717
Version 8.5.18 does not have that issue so I just build that now instead of 8.6.4.
I use this batch to help with building.
@echo off
set "vcvars32_bat=D:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat"
set "VERSION=8.5.18"
set "TCL=tcl%VERSION%"
set "TK=tk%VERSION%"
set "TCLDIR=..\..\%TCL%"
echo %time% > Build.log
echo "%vcvars32_bat%" >> Build.log
call "%vcvars32_bat%" >> Build.log 2>&1
echo %time% >> Build.log
call:JMP_Build32 %TCL% symbols TCLDebug32.log
call:JMP_Build32 %TCL% "" TCLRelease32.log
call:JMP_Build32 %TK% symbols TKDebug32.log
call:JMP_Build32 %TK% "" TKRelease32.log
exit 0
:JMP_Build32
echo Building '%1' '%2' '%3'
cd %1\win\
echo %time%> ..\..\%3
del nmakehlp.exe >> ..\..\%3 2>&1
nmake -f makefile.vc OPTS=%2 >> ..\..\%3 2>&1
echo %time%>> ..\..\%3
cd ..\..\
goto:eof
The call to nmake -f makefile.vc
results in subsequent calls to other makefile.vc files in sister directories. If you face similar issues you should include those in your search.
Upvotes: 1