Last Comment Bug 687213 - (VC11) compile mozilla-central on Visual Studio 2012 (VC11)
(VC11)
: compile mozilla-central on Visual Studio 2012 (VC11)
Status: RESOLVED INCOMPLETE
:
Product: Core Graveyard
Classification: Graveyard
Component: Tracking (show other bugs)
: Trunk
: All Windows 8
: -- normal with 3 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: chris hofmann
Mentors:
https://developer.mozilla.org/en/Wind...
Depends on: 687033 686837 686843 687225 687229 687268 694797 694801 694802 694811 694865 701050 703135 712841 731807 732124 732127 744942 761279 773454 776871 776876 776898 776902 776912 776914 776918 777698 789827 836658
Blocks: 833887
  Show dependency treegraph
 
Reported: 2011-09-16 21:42 PDT by Gregory Szorc [:gps]
Modified: 2016-07-15 12:13 PDT (History)
27 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
full error in text (5.31 KB, text/plain)
2013-03-28 11:35 PDT, Jim page
no flags Details
How to compile destination SeaMonkey please ??? (34.24 KB, image/gif)
2013-09-02 06:51 PDT, Sladky Vladimir
no flags Details

Description Gregory Szorc [:gps] 2011-09-16 21:42:52 PDT
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.
Comment 1 :Ehsan Akhgari 2011-10-17 12:17:02 PDT
I managed to build mozilla-central successfully with the patches that I have in the dependency list.
Comment 2 imanip 2011-12-26 13:31:23 PST
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);}
Comment 3 Hugh Nougher [:Hughman] 2012-01-22 19:25:57 PST
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.
Comment 4 Gregory Szorc [:gps] 2012-02-29 10:50:29 PST
Leap Day William has delivered Visual Studio 2011 Beta to us today!

https://www.microsoft.com/visualstudio/11
https://blogs.msdn.com/b/jasonz/archive/2012/02/29/welcome-to-the-beta-of-visual-studio-11-and-net-framework-4-5.aspx
Comment 5 Jim Mathies [:jimm] 2012-03-22 12:04:54 PDT
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?
Comment 6 Matthew N. [:MattN] (In Taipei until Sep. 23) 2012-03-22 15:20:30 PDT
(In reply to Jim Mathies [:jimm] from comment #5)
IIRC, I could on Win7 with the VS11 dev preview but not with the beta.
Comment 7 Yuhong Bao 2012-10-24 09:18:21 PDT
As a note, VS11 defaults to targeting SSE2 processors. Disable with /arch:ia32.
Comment 8 Jeff Walden [:Waldo] (remove +bmo to email) 2013-01-23 14:41:05 PST
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.
Comment 9 Jeff Walden [:Waldo] (remove +bmo to email) 2013-01-23 14:47:34 PST
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!  ;-)
Comment 10 Jared Wein [:jaws] (please needinfo? me) 2013-01-23 14:49:15 PST
For clarification, VC11 is the C++ compiler, and MSVS2012 is the Visual Studio product.
Comment 11 Jeff Walden [:Waldo] (remove +bmo to email) 2013-01-23 15:08:42 PST
!?!?  <insert Y U NO or maybe trollface meme here>  This version numbering deal is getting worse all the time.
Comment 12 Yuhong Bao 2013-01-30 23:41:12 PST
It was only a coincidence that the year matched the version number.
Comment 13 Jim page 2013-03-28 11:35:39 PDT
Created attachment 730784 [details]
full error in text
Comment 14 Jim page 2013-03-28 15:12:55 PDT
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
Comment 15 jimmyjxiao 2013-08-08 14:58:45 PDT
Is there a work around for comment 2 yet?
Comment 16 :Ehsan Akhgari 2013-08-08 15:10:11 PDT
(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?
Comment 17 Sladky Vladimir 2013-09-02 03:51:50 PDT
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
$
Comment 18 Masatoshi Kimura [:emk] 2013-09-02 03:59:57 PDT
Are you using start-msvc11-x64.bat? Use start-msvc11.bat instead.
(BTW here is not a right place to ask such questions.)
Comment 19 Sladky Vladimir 2013-09-02 04:39:35 PDT
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 ...
Comment 20 Sladky Vladimir 2013-09-02 06:51:27 PDT
Created attachment 798524 [details]
How to compile destination SeaMonkey please ???

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 ...
Comment 21 Sladky Vladimir 2013-09-02 23:42:53 PDT
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
Comment 22 Masatoshi Kimura [:emk] 2013-09-03 06:15:49 PDT
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.
Comment 23 Sladky Vladimir 2013-09-03 09:06:51 PDT
Thank You - i find out, at the moment i compile several hour SeaMonkey 32Bit and if success,
i try compile SM for AMD64 ...
Comment 24 BMO Automation 2016-07-01 13:04:04 PDT
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.

Note You need to log in before you can comment on or make changes to this bug.