Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2022-02-10
13:52 • Ticket [d109376adf] Cross-compilation for windows-arm64 status still Open wi... artifact: 3b8f016b33 user: jan.nijtmans
2005-03-09
07:15 • Closed ticket [1020445fff]: Tcl does not build on Win64-Itanium using makefile.v... artifact: f4fcf04082 user: hobbs
2004-09-10
12:10 • Ticket [1020445fff]: 1 change artifact: 55d18a88bc user: hobbs
2004-09-08
05:42 • Ticket [1020445fff]: 5 changes artifact: 3764343d5b user: davygrvy
05:25 • Ticket [1020445fff]: 5 changes artifact: 75c43eba62 user: davygrvy
05:06 • Ticket [1020445fff]: 4 changes artifact: 1ca8aa434f user: davygrvy
05:01 • Ticket [1020445fff]: 4 changes artifact: a970d9d445 user: davygrvy
04:04 • Ticket [1020445fff]: 4 changes artifact: 239a7e6f07 user: loewis
03:58 • Ticket [1020445fff]: 4 changes artifact: b7ec5e7651 user: davygrvy
03:39 • Ticket [1020445fff]: 4 changes artifact: 5aff61c5bd user: loewis
03:14 • Ticket [1020445fff]: 4 changes artifact: 6faa330732 user: davygrvy
01:19 • Open ticket [1020445fff]. artifact: 2697216ad2 user: hobbs
00:52 • Closed ticket [1020445fff]. artifact: f5cf19dd32 user: kennykb
2004-09-05
00:52 • Ticket [1020445fff]: 4 changes artifact: 2fde560cca user: kennykb
2004-09-02
03:48 • Ticket [1020445fff]: 4 changes artifact: d867e25746 user: loewis
02:00 • Ticket [1020445fff]: 4 changes artifact: f0bffdccf2 user: hobbs
01:42 • Ticket [1020445fff]: 4 changes artifact: 9f6cfbe78e user: loewis
00:42 • Ticket [1020445fff]: 7 changes artifact: b53e596284 user: hobbs
2004-09-01
14:18 • New ticket [1020445fff]. artifact: 1d73574f81 user: loewis

Tcl does not build on Win64-Itanium using makefile.vc

Closed / Fixed1020445fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-09-01 14:18:26
I'm trying to build Tcl for Win64-Itanium, using x86 as
the host system. I try to follow the instructions in
win\makefile.vc. Therefore, I do

[vc 2003]vc7\bin\vcvars32.bat
[SDK]setenv.bat /pre64 /retail

The latter fails because /pre64 is not support; I have
to use /XP64 instead. So I do that. Then I invoke

nmake -f makefile.vc MACHINE=IA64

This gives a MessageBox, with the title
[tcl]win\nmakehlp.exe, and the text

[tcl]win\nmakehlp.exe is not a valid Win32 application

This analysis is correct; nmakehlp.exe is a Win64
application, which cannot be executed on the build system.

Clicking OK a number of times, the build procedes,
until it gives

cl -nologo -c -W3 -YX -Fp.\Release\tcl_Dynamic\
-QIA64_Bx -O2 -Op -Gs -MD -I"..\win" -I"..\generic" 
-DTCL_PIPE_DLL=\"tclpip84.dll\"  -DBUILD_tcl -Fo.\R
elease\tcl_Dynamic\
@C:\DOCUME~1\MARTIN~1.VON\LOCALS~1\Temp\nm41B.tmp
cl : Command line warning D4002 : ignoring unknown
option '-QIA64_Bx'
tclWin32Dll.c
..\win\tclWin32Dll.c(1138) : error C2065: '_asm' :
undeclared identifier
[more errors omitted]
NMAKE : fatal error U1077: 'cl' : return code '0x2'

At this point, the build aborts.
hobbsplain2004-09-02 00:42:55
Logged In: YES 
user_id=72656

The _try { _asm ... } added for CPU id wasn't valid for
WIN64.  Since it's not critical, I have #ifdef checked for
it, but I'm moving this over to Kevin to see if he wants to
correct that bit of code.  Fixed in 8.4-branch and head,
along with other WIN64 corrections to tclWinDde.c and
tclWinReg.c.
loewisplain2004-09-02 01:42:51
Logged In: YES 
user_id=21627

What about the other problems, e.g. the incorrect
documentation in the makefile, and the failure to
cross-build properly because a host binary is build with the
target compiler?
hobbsplain2004-09-02 02:00:09
Logged In: YES 
user_id=72656

The makefile.vc is not the standard supported makefile - the
cygwin build system is.  While it may seem a bit odd for
Windows-only users, it is much easier to maintain the Tcl/Tk
and TEA build system across platforms.  You want to use that
with --enable-64bit for Win64 builds.
loewisplain2004-09-02 03:48:05
Logged In: YES 
user_id=21627

If makefile.vc is not supported (i.e. bugs reported against
it won't be fixed), could a note be added to that file
saying so? Also, win/README mentions makefile.vc, and
suggests that Cygwin is not needed. It would be good if the
mentioning of the makefile.vc process was removed, or that
the process is atleast mentioned as unsupported.
kennykbplain2004-09-05 00:52:51
Logged In: YES 
user_id=99768

It would be nice to do _getIndReg and retrieve the CPUID on
IA64 as well, but as Jeff points out, it isn't critical.  I
also am
making the (questionable?) presumption that Win64 vendors
have got their act together with keeping QueryPerformanceCounter
synchronized, so I'm #ifdef'ing the code that calls TclWinCPUID
out on IA64.
kennykb Closed ticket [1020445fff]. [History diff]2004-09-08 00:52:36
hobbsplain2004-09-08 01:19:44
Logged In: YES 
user_id=72656

reopened and assigned to Dave to address the makefile.vc
errors for compiling for WIN64.
davygrvyplain2004-09-08 03:14:09
Logged In: YES 
user_id=7549

Martin,

Your statement that "makefile.vc doesn't support Itanium" is 
is incorrect.  Should be "used to work".
loewisplain2004-09-08 03:39:41
Logged In: YES 
user_id=21627

That's good to hear. However, I could not quite figure out
how it is supposed to work. Do I really have to run vcvars32
first? I had hoped that the SDK alone is sufficient in this
scenario.

Also (and OTOH), does it support cross-compilation, or did
it use to work only when building on Itanium natively? I see
the build process generates a number of binaries for the
build machine - which would have to be build with the native
compiler (whatever that is).
davygrvyplain2004-09-08 03:58:22
Logged In: YES 
user_id=7549

According to 
http://www.microsoft.com/msdownload/platformsdk/sdkupdate
/contents.htm , the setenv switch might be /SVR64 these 
days.  But that's the docs for the Feb2003 one.  There's the 
newer July2004 (XPsp2) one currently, but I can't seem to 
install it due to some odd msxml3 sp4 vs. sp2 oddity with their 
dhtml on 
http://www.microsoft.com/msdownload/platformsdk/sdkupdate
/

PS. there's no reason to have to use the 64-bit compile of 
nmake when doing a cross.  Give it a shot, try setenv first.
loewisplain2004-09-08 04:04:46
Logged In: YES 
user_id=21627

Please try it yourself. Not running vcvars32.bat first
triggers an error at the top of makefile.vc, as that has an
explicit check for vcvars32.bat being run. That means that
native compiles of Tcl currently can't be supported, since
VC.NET cannot be installed on Win64.

OTOH, a cross-compile gives the message about nmakehlp.exe
that I reported above.
davygrvyplain2004-09-08 05:01:17
Logged In: YES 
user_id=7549

Then don't use the win64 compile of nmake
davygrvyplain2004-09-08 05:06:51
Logged In: YES 
user_id=7549

I'd love to try it here, but neither do I have VC7, nor did the 
Aug2004 (XPsp2) SDK contain a win64 compiler.  The Feb2003 
did, IIRC.
davygrvyplain2004-09-08 05:25:52
Logged In: YES 
user_id=7549

ohh, I get it.  The helper is built according to $(cc) during a 
cross.

Well, I can't really do much to fix it except advise in the areas 
I can run it.  As I neither have VC7 with it's wacked changes 
to vcvars32.bat to see in what way the envars are changed, 
I can't assist with this..
davygrvyplain2004-09-08 05:42:56
Logged In: YES 
user_id=7549

What's wrong with building for Win32 first, then running the 
clean target?  That should remove Release\Tcl_Dynamic\*.*, 
but leave nmakehlp.exe

Post a patch here when you get it worked-out.
hobbs Ticket [1020445fff]: 1 change [History diff]2004-09-10 12:10:13
hobbsplain2005-03-09 07:15:56
Logged In: YES 
user_id=72656

Just added a patch to the .vc's that allow building for ia64
with the platform SDK.  Confirmed build from Trent Mick.
Log in (anonymous is fine) to add a comment.