Closed Bug 687213 (VC11) Opened 13 years ago Closed 8 years ago

compile mozilla-central on Visual Studio 2012 (VC11)

Categories

(Core Graveyard :: Tracking, defect)

All
Windows 8
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: gps, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug, )

Details

Attachments

(2 files)

This is a tracking bug for compiling mozilla-central on Windows 8.

Things it should cover:

* Changes to build system to support Windows 8 and Visual Studio 2011
* Changes to source to support building against the Windows 8 SDK
* ARM support

Things it should not cover:

* UX changes to adapt the Windows 8 style
* Taking advantage of new features in Windows 8 (Metro, new SDK APIs, etc)

Once we support building mozilla-central on Windows 8 for all supported architectures, we should close this bug.
Depends on: 687225
Depends on: 687229
Depends on: 687268
Depends on: 694797
Depends on: 694801
Depends on: 694802, 694811
Summary: compile mozilla-central on Windows 8 → compile mozilla-central on Visual Studio 2011 (VC11)
Alias: VC11
Depends on: 694865
I managed to build mozilla-central successfully with the patches that I have in the dependency list.
Depends on: 701050
Depends on: 703135
Depends on: 712841
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:1039: checking host system type
configure:1060: checking target system type
configure:1078: checking build system type
configure:1158: checking for mawk
configure:1158: checking for gawk
configure:1394: checking for perl5
configure:1394: checking for perl
configure:2663: checking for gcc
configure:2776: checking whether the C compiler (cl  ) works
configure:2792: cl -o conftest    conftest.c  1>&5
Microsoft (R) C/C++ Optimizing Compiler Version 17.00.40825.2 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
conftest.c
Microsoft (R) Incremental Linker Version 11.00.40825.2
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:conftest.exe 
/out:conftest.exe 
conftest.obj 
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
configure: failed program was:

#line 2787 "configure"
#include "confdefs.h"

main(){return(0);}
There needs to be a bug for adding Windows 8 SDK detection in the configure scripts (like in configure.in with MOZ_NTDDI_WIN7). I don't know how to word it or where it goes so I am not creating the bug myself.

I bring it up because I have code in the patch for bug 689870 which depends on Windows 8 SDK headers being available.
Depends on: 731807
Depends on: 732124
Depends on: 732127
Has anyone managed to get fx built using vs11 tools and the dev kit included with the vs2011 install, without running into bug 732124? Either on Win7 or 8?
(In reply to Jim Mathies [:jimm] from comment #5)
IIRC, I could on Win7 with the VS11 dev preview but not with the beta.
Depends on: 744942
Depends on: 761279
Depends on: 773454
Depends on: 776876
Depends on: 776871
Depends on: 776898
Depends on: 776902
Depends on: 776912
Depends on: 776914
Depends on: 776918
Depends on: 777698
Depends on: 789827
As a note, VS11 defaults to targeting SSE2 processors. Disable with /arch:ia32.
Blocks: 833887
Summary: compile mozilla-central on Visual Studio 2011 (VC11) → compile mozilla-central on Visual Studio 2012 (VC11)
Jared, Jim, 2012 support really probably should be its own new bug.  Clone this one if you want to piggyback on the existing information collated here.
I'm told VC11 is no longer MSVC 2011, but rather MSVC 2012.  So there is no MSVC 2011.  Yay for awful version numbering schemes.  I'm glad our version numbering scheme doesn't cause horrible arguments and hatred from anyone!  ;-)
For clarification, VC11 is the C++ compiler, and MSVS2012 is the Visual Studio product.
!?!?  <insert Y U NO or maybe trollface meme here>  This version numbering deal is getting worse all the time.
It was only a coincidence that the year matched the version number.
Depends on: 836658
Attached file full error in text
I installed ActiveX SDK and this resolved the issues with comment 13
now I run the second command and it fails
$ ./build/pymake/make.py -C obj-ff-debug
make.py[0]: Entering directory 'c:\NPAPI\mozilla-central\obj-ff-debug'
No makefile found
Is there a work around for comment 2 yet?
(In reply to jimmyjxiao from comment #15)
> Is there a work around for comment 2 yet?

I've never tried it before.  Can you please attach your mozconfig here?
What please resolve this error with "targeting i386 on 64 bit computer" ???
(i compile SeaMonkey 64bit for Windows 8 on AMD64)

checking for make... /local/bin/make
checking for X... no
checking that static assertion macros used in autoconf tests work... yes
checking for 64-bit OS... yes
configure: error: You are targeting i386 but using the 64-bit compiler.

This is my mozconfig for SeaMonkey:

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/suite-opt
ac_add_options --enable-application=suite
ac_add_options --target=x86_64-pc-mingw32
ac_add_options --host=x86_64-pc-mingw32
mk_add_options MOZ_MAKE_FLAGS="-j4"
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --disable-angle
ac_add_options --disable-gamepad

HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

Vlada@PC1 /c/dev/mozilla-central
$ ./build/pymake/make.py -f client.mk configure
make.py[0]: Entering directory 'c:\dev\mozilla-central'
c:\dev\mozilla-central\client.mk:303:0$ python c:/dev/mozilla-central/config/pythonpath.py -I c:/dev/mozilla-central/tes
ting/mozbase/mozfile \
    c:/dev/mozilla-central/python/mozbuild/mozbuild/controller/clobber.py c:/dev/mozilla-central obj-i686-pc-mingw32
Clobber not needed.
TEST-PASS | check-sync-dirs.py | c:\dev\mozilla-central\js\src\build <= c:\dev\mozilla-central\build
Generating c:/dev/mozilla-central/configure using autoconf
c:\dev\mozilla-central\client.mk:274:0$ cd c:/dev/mozilla-central; /local/bin/autoconf-2.13
TEST-PASS | check-sync-dirs.py | c:\dev\mozilla-central\js\src\build <= c:\dev\mozilla-central\build
Generating c:/dev/mozilla-central/js/src/configure using autoconf
c:\dev\mozilla-central\client.mk:274:0$ cd c:/dev/mozilla-central/js/src; /local/bin/autoconf-2.13
c:\dev\mozilla-central\config\makefiles\autotargets.mk:59:0$ pymake.builtins mkdir -p "obj-i686-pc-mingw32/"
c:\dev\mozilla-central\client.mk:317:0$ cp  obj-i686-pc-mingw32/.mozconfig
cp: missing destination file operand after `obj-i686-pc-mingw32/.mozconfig'
Try `cp --help' for more information.
cd obj-i686-pc-mingw32
c:/dev/mozilla-central/configure
creating cache ./config.cache
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking build system type... i686-pc-mingw32
checking for mawk... no
checking for gawk... gawk
checking for python2.7... /c/mozilla-build/python/python2.7
Creating Python environment
New python executable in c:/dev/mozilla-central/obj-i686-pc-mingw32/_virtualenv\Scripts\python2.7.exe
Also creating executable in c:/dev/mozilla-central/obj-i686-pc-mingw32/_virtualenv\Scripts\python.exe
Installing setuptools................done.
Installing pip...................done.
running build_ext
building '_psutil_mswindows' extension
error: Unable to find vcvarsall.bat

Error processing command. Ignoring because optional. (optional:setup.py:python/psutil:build_ext:--inplace)
checking Python environment is Mozilla virtualenv... yes
checking for perl5... no
checking for perl... /bin/perl
checking for gcc... cl
checking whether the C compiler (cl  ) works... yes
checking whether the C compiler (cl  ) is a cross-compiler... no
checking whether we are using GNU C... no
checking whether cl accepts -g... no
checking for c++... cl
checking whether the C++ compiler (cl  ) works... yes
checking whether the C++ compiler (cl  ) is a cross-compiler... no
checking whether we are using GNU C++... no
checking whether cl accepts -g... no
checking for ranlib... :
checking for ml... no
checking for as... no
checking for ar... no
checking for ld... link
checking for strip... no
checking for windres... no
checking for midl... midl
checking for midl flags... none needed
checking for std::_Throw... no
checking for overridable _RAISE... yes
checking for winsdkver.h... yes
checking for highest Windows version supported by this SDK... 0x06020000
checking for Windows SDK being recent enough... yes
checking how to run the C preprocessor... cl -E -nologo
checking how to run the C++ preprocessor... cl -TP -E -nologo
checking for a BSD compatible install... /bin/install -c
checking whether ln -s works... no
checking for minimum required perl version >= 5.006... 5.006001
checking for full perl installation... yes
checking for doxygen... :
checking for autoconf... /bin/autoconf
checking for unzip... /c/mozilla-build/info-zip/unzip
checking for zip... /c/mozilla-build/info-zip/zip
checking for xargs... /bin/xargs
checking for rpmbuild... :
checking compiler version... Microsoft (R) C/C++ Optimizing Compiler Version 17.00.50727.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9002 : ignoring unknown option '--version'
cl : Command line error D8003 : missing source filename

checking for make... /local/bin/make
checking for X... no
checking that static assertion macros used in autoconf tests work... yes
checking for 64-bit OS... yes
configure: error: You are targeting i386 but using the 64-bit compiler.
------ config.log ------
#define CONFIGURE_STATIC_ASSERT_IMPL2(condition, line) typedef int static_assert_line_##line[(condition) ? 1 : -1]

int main() {
CONFIGURE_STATIC_ASSERT(0)
; return 0; }
configure:6753: cl -c  -TP -nologo  conftest.C 1>&5
conftest.C
configure:6770: cl -c  -TP -nologo  conftest.C 1>&5
conftest.C
configure(6770) : error C2118: negative subscript
configure: failed program was:
#line 6763 "configure"
#include "confdefs.h"

#define CONFIGURE_STATIC_ASSERT(condition) CONFIGURE_STATIC_ASSERT_IMPL(condition, __LINE__)
#define CONFIGURE_STATIC_ASSERT_IMPL(condition, line) CONFIGURE_STATIC_ASSERT_IMPL2(condition, line)
#define CONFIGURE_STATIC_ASSERT_IMPL2(condition, line) typedef int static_assert_line_##line[(condition) ? 1 : -1]

int main() {
CONFIGURE_STATIC_ASSERT(0)
; return 0; }
configure:7752: checking for 64-bit OS
configure:7761: cl -c  -TC -nologo  conftest.c 1>&5
conftest.c
configure: error: You are targeting i386 but using the 64-bit compiler.
*** Fix above errors and then restart with               "c:/mozilla-build/python/python.exe c:/dev/mozilla-central/buil
d/pymake/pymake/../make.py -f client.mk build"
c:\dev\mozilla-central\client.mk:322:0: command 'cd obj-i686-pc-mingw32 &&  MAKE="c:/mozilla-build/python/python.exe c:/
dev/mozilla-central/build/pymake/pymake/../make.py"  c:/dev/mozilla-central/configure  \
  || ( echo "*** Fix above errors and then restart with\
               \"c:/mozilla-build/python/python.exe c:/dev/mozilla-central/build/pymake/pymake/../make.py -f client.mk b
uild\"" && exit 1 )' failed, return code 1

Vlada@PC1 /c/dev/mozilla-central
$
Are you using start-msvc11-x64.bat? Use start-msvc11.bat instead.
(BTW here is not a right place to ask such questions.)
I using start-msvc11-x64.bat,
hg clone https://hg.mozilla.org/mozilla-central
edit mozconfig and ./build/pymake/make.py -f client.mk configure
- i compile SeaMonkey for the first time, but in 64bit awailable (compiled) only older builds ...

Now tested with start-msvc11.bat and with --disable-webgl too

ERROR: Invalid key name.
Type "REG QUERY /?" for usage.
configure: error: Couldn't find the DirectX SDK, needed for WebGL. Either install it (June 2010 version or newer), or re
configure with --disable-webgl.

I download it and try test with DirectX SDK ...
With "start-msvc11.bat" O.K. but it is really 64bit aplication ???

But with
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/suite-opt
ac_add_options --enable-application=suite
(in mozconfig) not SeaMonkey as destination aplication - see attachment please :-(

Where is please "wrong setting" ???

Sorry, where is please better place for my (O.T.) questions ???

Thank You ...
FireFox (only 32 bit] now i build suscefully, but SeaMonkey not :-(
What problem please if 'mapix.h not exist ?

c:\users\vlada\comm-central\mailnews\addrbook\src\nsAbWinHelper.h(9) : fatal error C1083: Cannot open include file: 'mapix.h': No such file or directory
You need to install Outlook 2010: MAPI Header Files.
http://www.microsoft.com/en-us/download/details.aspx?id=12905
Again, please ask the question at mozilla.dev.platform or somewhere, not here.
Thank You - i find out, at the moment i compile several hour SeaMonkey 32Bit and if success,
i try compile SM for AMD64 ...
Marking all tracking bugs which haven't been updated since 2014 as INCOMPLETE.
If this bug is still relevant, please reopen it and move it into a bugzilla component related to the work
being tracked. The Core: Tracking component will no longer be used.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: