Tamarin Tracing: cross-platform build machinery broken on Windows

VERIFIED FIXED

Status

VERIFIED FIXED
11 years ago
9 years ago

People

(Reporter: jimb, Assigned: jimb)

Tracking

Details

Attachments

(6 attachments)

(Assignee)

Description

11 years ago
Discussed on mailing list:
https://mail.mozilla.org/pipermail/tamarin-devel/2008-June/000672.html

In my first attempt to build TT on Windows, I'm getting errors like the
below, using VS2005.  This is in r7a7f1a6cdee6, and the warnings can be
placated with patches like this:

@@ -633,7 +633,7 @@
 #define TEST_AX(i) do {                                                       \
                underrunProtect(5);                                     \
                *(--_nIns) = (0);               \
-               *(--_nIns) = ((uint8_t)(i));                    \
+               *(--_nIns) = ((uint8_t)((i)&0xff));     \
                *(--_nIns) = ((uint8_t)((i)>>8));               \
                *(--_nIns) = (0);               \
                *(--_nIns) = 0xa9;                                      \

But the code in question seems to date back much further that, so I must
be doing something wrong in the build; surely it hasn't been broken for
that long.  I've used the Mozilla tools package, and said:

$ python ../tamarin-tracing/configure.py --enable-shell --enable-debug
$ make

Edwin Smith says:
> I think what might be happening is bitrot on the x-platform build for
> windows.  I just looked in the VS2008 .vcproj settings for nanojit, and
> one of the suppressed warnings is #4310.  Adding that to the manifest
> and/or VS2005 project files, may just take care of it.
> 
> If we all agree (if not, i'll hear it soon!) that the One True Build
> shall be the x-platform build, and that IDE project file maintenance is
> strictly voluntary, then we need to collectivly whip the xp-build
> settings for the microsoft compilers into shape.  I beleive we're using
> the xp-build on all other platforms except windows, so this is the last
> bastion.

----

cl.exe -Fonanojit/Assembler.obj -MDd -DWIN32_LEAN_AND_MEAN -D_CONSOLE -DAVMPLUS_IA32 -DWIN32 -DMMGC_INTERIOR_PTRS -DSOFT_ASSERTS -D_CRT_SECURE_NO_DEPRECATE  -DDEBUG -D_DEBUG   -TP -W4 -WX -wd4291 -EHsc  -Zi    -I/c/m/tt/tamarin-tracing -I/c/m/tt/tamarin-tracing/core -I/c/m/tt/tamarin-tracing/nanojit -I/c/m/tt/tamarin-tracing/pcre  -c nanojit/Assembler.ii
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.
 
Assembler.ii
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(615) : error C2220: warning treated as error - no 'object' file generated
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(615) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(637) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(639) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(640) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(940) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(942) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(946) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(946) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(946) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(946) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(946) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(946) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(946) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(946) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1037) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1038) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1039) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1040) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1041) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1042) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1043) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1044) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1045) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1063) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1148) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1244) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1313) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1313) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1313) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1313) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1313) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1313) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1313) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1313) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1315) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1315) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1315) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1315) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1315) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1315) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1315) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1315) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1317) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1317) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1317) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1317) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1317) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1317) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1317) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1317) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1319) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1319) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1319) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1319) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1319) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1319) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1319) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1319) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1336) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1336) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1336) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1336) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1336) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1336) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1336) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1336) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1379) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1379) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1379) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1379) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1388) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1388) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1399) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1399) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1399) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1399) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1399) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1399) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1399) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1399) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1533) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1537) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1543) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1545) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1547) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1549) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1551) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1553) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1555) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1557) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1559) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1611) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1611) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1611) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1611) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1611) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1611) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1611) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1611) : warning C4310: cast truncates constant value
c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1844) : warning C4310: cast truncates constant value
make: *** [nanojit/Assembler.obj] Error 2
MOZMACMINI:tt-build$
(Assignee)

Updated

11 years ago
Assignee: nobody → jim
(Assignee)

Comment 1

11 years ago
Created attachment 326645 [details] [diff] [review]
Choose the compiler up front, and have c.getCompiler() return its name.

In the Configuration class, move the code to select a compiler and set
its acvars into the __init__ method, and make getCompiler return a
string identifying the compiler chosen, for consistency with other
methods.  Unlike COMPILER_IS_GCC, this gives us a value we can put in
a variable in the top-level Makefile and then test in manifest.mk
files to recognize any compiler.  Set the COMPILER variable in the
generated Makefile.

Instead of having getCompiler take a static_crt argument, have
Configuration's __init__ look for --enable-static-crt in the options
object it's passed.  It's fine to have Configuration know about
'--enable-static-crt': it's needed to set compiler options correctly,
so the understanding of what it means belongs here.  And even if
configuration.py is meant to be shared by many projects, it's *good*
to have consistency in configuration options.a
Attachment #326645 - Flags: review?(benjamin)
(Assignee)

Comment 2

11 years ago
Created attachment 326646 [details] [diff] [review]
Disable benign warnings under VS2005.
Attachment #326646 - Flags: review?(edwsmith)
(Assignee)

Comment 3

11 years ago
Created attachment 326647 [details] [diff] [review]
Fix manifest for Win32-specific files.
Attachment #326647 - Flags: review?(edwsmith)
(Assignee)

Comment 4

11 years ago
With these patches, Tamarin Tracing builds on Windows again, using the cross-platform build code.

Updated

11 years ago
Attachment #326646 - Flags: review?(edwsmith) → review?(brbaker)

Comment 5

11 years ago
Comment on attachment 326647 [details] [diff] [review]
Fix manifest for Win32-specific files.

Brent agreed to review, test, and push.  Once this lands all our platform builds will use the xp build scripts.
Attachment #326647 - Flags: review?(edwsmith) → review?(brbaker)

Updated

11 years ago
Attachment #326646 - Flags: review?(brbaker) → review+

Updated

11 years ago
Attachment #326647 - Flags: review?(brbaker) → review+

Comment 6

11 years ago
Tested the patch on windows, linux and mac. Pushed as 441:1232802bf046
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED

Comment 7

11 years ago
Actually just tried running the x-platform using VS2005 and getting the following warning when building. This warning is not produced in VS2008. Reopening issue.

TraitsEnv.ii
c:/hg/tamarin-tracing/core/TraitsEnv.cpp(929) : error C2220: warning treated as error - no 'object' file generated
c:/hg/tamarin-tracing/core/TraitsEnv.cpp(929) : warning C4244: 'initializing' : conversion from 'int' to 'const uint8_t', possible loss of data
c:/hg/tamarin-tracing/core/TraitsEnv.cpp(938) : warning C4244: 'initializing' : conversion from 'int' to 'const uint8_t', possible loss of data
make: *** [core/TraitsEnv.obj] Error 2
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Updated

11 years ago
Attachment #326645 - Flags: review?(benjamin) → review+

Comment 8

11 years ago
Is VS2005 still an important build target? 

Comment 9

11 years ago
Yes, at least for the XP build. Mozilla doesn't use 2008 officially, and probably won't in the near future.

Comment 10

11 years ago
OK then. We've generally tried to fix warnings at the code level when (reasonably) possible, and disabling warnings only as a last resort. This one I suspect can be fixed with judicious casting, but I don't have a VS2005 install with which to test. Anyone else want to take it?
(Assignee)

Comment 11

11 years ago
I see this now; the lines in question were introduced in 6984d3bf9e71 (Tue Jun 24).
Keywords: checkin-needed

Comment 12

11 years ago
That would be my fault. 
(Assignee)

Comment 13

11 years ago
Created attachment 327050 [details] [diff] [review]
Avoid VS2005 warnings re: truncating casts in TraintsEnv.cpp.

Use 'unsigned' for the masks.  The masks will always fit in bytes,
since the indices come from a 3-bit field, but I guess there could be
more binding kinds at some point in the future, and it's probably no
slower to use a full integer type for the masking.
Attachment #327050 - Flags: review?(stejohns)

Comment 14

11 years ago
Comment on attachment 327050 [details] [diff] [review]
Avoid VS2005 warnings re: truncating casts in TraintsEnv.cpp.

we've been avoiding "naked" C integer types in favor of C99 types, but in this case it's hard to imagine it could ever be a problem.
Attachment #327050 - Flags: review?(stejohns) → review+
(Assignee)

Comment 15

11 years ago
Landed: e0e71d4a9678
Status: REOPENED → RESOLVED
Last Resolved: 11 years ago11 years ago
Resolution: --- → FIXED

Comment 16

11 years ago
Created attachment 327805 [details] [diff] [review]
make it possible to uxe x-platform via cygwin

In order to compile using x-platform via cygwin you will need to either add the build directory to your path or move the build/cygwin-wrapper.sh into the path.
Attachment #327805 - Flags: review?(rwinchel)

Updated

11 years ago
Attachment #327805 - Flags: review?(rwinchel) → review+

Comment 17

11 years ago
Created attachment 327842 [details] [diff] [review]
Don't require cygwin-wrapper.sh to be in the path
Attachment #327842 - Flags: review?(brbaker)

Updated

11 years ago
Resolution: FIXED → INCOMPLETE

Updated

11 years ago
Attachment #327842 - Flags: review?(brbaker) → review+
(Assignee)

Comment 18

11 years ago
Brent and Edwin's patches seem to have landed in TT, so I'm closing this bug.
Resolution: INCOMPLETE → FIXED

Updated

11 years ago
Keywords: checkin-needed

Updated

9 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.