Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to build with MSVC #112

Closed
upsuper opened this issue Feb 1, 2017 · 1 comment
Closed

Fail to build with MSVC #112

upsuper opened this issue Feb 1, 2017 · 1 comment

Comments

@upsuper
Copy link

upsuper commented Feb 1, 2017

I tried to build Servo with MSVC, but it fails from this crate.

The compiler complains that it cannot find "kernel32.lib", "user32.lib", etc. And after some investigation, it seems that the reason is that the configure script adds -TC to the compiler flag when doing the detection, which makes the compiler treat all these lib files as C source, and try looking for them only in the current directory rather than also searching in system paths.

I checked the config.log of Gecko when building with MSVC, and it seems there is no -TC flag there.

The complete log is:

$ cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading libz-sys v1.0.12
 Downloading pkg-config v0.3.9
 Downloading gcc v0.3.42
   Compiling libc v0.2.20
   Compiling mozjs_sys v0.0.0 (file:///C:/mozilla-source/mozjs)
   Compiling gcc v0.3.42
   Compiling pkg-config v0.3.9
   Compiling libz-sys v1.0.12
error: failed to run custom build command for `mozjs_sys v0.0.0 (file:///C:/mozilla-source/mozjs)`
process didn't exit successfully: `c:\mozilla-source\mozjs\target\debug\build\mozjs_sys-566feb6a71daf1b1\build-script-build` (exit code: 101)
--- stdout
[[ c:/mozilla-source/mozjs/mozjs/js/src/configure -ot c:/mozilla-source/mozjs/mozjs/js/src/configure.in ]] && touch c:/mozilla-source/mozjs/mozjs/js/src/configure || true
[[ c:/mozilla-source/mozjs/mozjs/js/src/old-configure -ot c:/mozilla-source/mozjs/mozjs/js/src/old-configure.in ]] && touch c:/mozilla-source/mozjs/mozjs/js/src/old-configure || true
! [[ c:/mozilla-source/mozjs/mozjs/js/src/configure.in -ot c:/mozilla-source/mozjs/mozjs/js/src/configure ]] && touch c:/mozilla-source/mozjs/mozjs/js/src/configure || true
! [[ c:/mozilla-source/mozjs/mozjs/js/src/old-configure.in -ot c:/mozilla-source/mozjs/mozjs/js/src/old-configure ]] && touch c:/mozilla-source/mozjs/mozjs/js/src/old-configure || true
if [[ c:/mozilla-source/mozjs/mozjs/js/src/configure -nt c:/mozilla-source/mozjs/target/debug/build/mozjs_sys-566feb6a71daf1b1/out/config.status ]] ; then \
          cd c:/mozilla-source/mozjs/target/debug/build/mozjs_sys-566feb6a71daf1b1/out && \
          PYTHON="c:/python27/python.exe" MOZ_TOOLS="/" \
          CC="" CPP="" CXX="" AR="" \
          c:/mozilla-source/mozjs/mozjs/js/src/configure --disable-jemalloc --disable-js-shell --disable-tests --build-backends=RecursiveMake --target=x86_64-pc-mingw32 --host=x86_64-pc-mingw32 --without-pthreads || (cat config.log && exit 1) ; \
        fi
Creating Python environment
New python executable in c:\mozilla-source\mozjs\target\debug\build\mozjs_sys-566feb6a71daf1b1\out\_virtualenv\Scripts\python.exe
Installing setuptools, pip, wheel...done.
running build_ext

building 'psutil._psutil_windows' extension

creating build

creating build\temp.win32-2.7

creating build\temp.win32-2.7\Release

creating build\temp.win32-2.7\Release\psutil

creating build\temp.win32-2.7\Release\psutil\arch

creating build\temp.win32-2.7\Release\psutil\arch\windows

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_VERSION=311 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -Ic:\python27\include -Ic:\mozilla-source\mozjs\target\debug\build\mozjs_sys-566feb6a71daf1b1\out\_virtualenv\PC /Tcpsutil/_psutil_windows.c /Fobuild\temp.win32-2.7\Release\psutil/_psutil_windows.obj

_psutil_windows.c

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_VERSION=311 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -Ic:\python27\include -Ic:\mozilla-source\mozjs\target\debug\build\mozjs_sys-566feb6a71daf1b1\out\_virtualenv\PC /Tcpsutil/_psutil_common.c /Fobuild\temp.win32-2.7\Release\psutil/_psutil_common.obj

_psutil_common.c

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_VERSION=311 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -Ic:\python27\include -Ic:\mozilla-source\mozjs\target\debug\build\mozjs_sys-566feb6a71daf1b1\out\_virtualenv\PC /Tcpsutil/arch/windows/process_info.c /Fobuild\temp.win32-2.7\Release\psutil/arch/windows/process_info.obj

process_info.c

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_VERSION=311 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -Ic:\python27\include -Ic:\mozilla-source\mozjs\target\debug\build\mozjs_sys-566feb6a71daf1b1\out\_virtualenv\PC /Tcpsutil/arch/windows/process_handles.c /Fobuild\temp.win32-2.7\Release\psutil/arch/windows/process_handles.obj

process_handles.c

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_VERSION=311 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -Ic:\python27\include -Ic:\mozilla-source\mozjs\target\debug\build\mozjs_sys-566feb6a71daf1b1\out\_virtualenv\PC /Tcpsutil/arch/windows/security.c /Fobuild\temp.win32-2.7\Release\psutil/arch/windows/security.obj

security.c

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_VERSION=311 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -Ic:\python27\include -Ic:\mozilla-source\mozjs\target\debug\build\mozjs_sys-566feb6a71daf1b1\out\_virtualenv\PC /Tcpsutil/arch/windows/inet_ntop.c /Fobuild\temp.win32-2.7\Release\psutil/arch/windows/inet_ntop.obj

inet_ntop.c

creating build\lib.win32-2.7

creating build\lib.win32-2.7\psutil

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:c:\python27\Libs /LIBPATH:c:\mozilla-source\mozjs\target\debug\build\mozjs_sys-566feb6a71daf1b1\out\_virtualenv\libs /LIBPATH:c:\mozilla-source\mozjs\target\debug\build\mozjs_sys-566feb6a71daf1b1\out\_virtualenv\PCbuild /LIBPATH:c:\mozilla-source\mozjs\target\debug\build\mozjs_sys-566feb6a71daf1b1\out\_virtualenv\PC\VS9.0 psapi.lib kernel32.lib advapi32.lib shell32.lib netapi32.lib iphlpapi.lib wtsapi32.lib ws2_32.lib /EXPORT:init_psutil_windows build\temp.win32-2.7\Release\psutil/_psutil_windows.obj build\temp.win32-2.7\Release\psutil/_psutil_common.obj build\temp.win32-2.7\Release\psutil/arch/windows/process_info.obj build\temp.win32-2.7\Release\psutil/arch/windows/process_handles.obj build\temp.win32-2.7\Release\psutil/arch/windows/security.obj build\temp.win32-2.7\Release\psutil/arch/windows/inet_ntop.obj /OUT:build\lib.win32-2.7\psutil\_psutil_windows.pyd /IMPLIB:build\temp.win32-2.7\Release\psutil\_psutil_windows.lib /MANIFESTFILE:build\temp.win32-2.7\Release\psutil\_psutil_windows.pyd.manifest

   Creating library build\temp.win32-2.7\Release\psutil\_psutil_windows.lib and object build\temp.win32-2.7\Release\psutil\_psutil_windows.exp

copying build\lib.win32-2.7\psutil\_psutil_windows.pyd -> psutil


Reexecuting in the virtualenv
checking for a shell... C:/mozilla-build/msys/bin/sh.exe
checking for host system type... x86_64-pc-mingw32
checking for target system type... x86_64-pc-mingw32
checking for the Android toolchain directory... not found
checking whether cross compiling... no
checking for pkg_config... not found
checking for yasm... c:/mozilla-build/yasm/yasm.EXE
checking yasm version... 1.3.0
checking for the target C compiler... 'c:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64/cl.EXE'
checking whether the target C compiler can be used... yes
checking the target C compiler version... 19.00.24215
checking for the target C++ compiler... 'c:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64/cl.EXE'
checking whether the target C++ compiler can be used... yes
checking the target C++ compiler version... 19.00.24215
checking for the host C compiler... 'c:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64/cl.EXE'
checking whether the host C compiler can be used... yes
checking the host C compiler version... 19.00.24215
checking for the host C++ compiler... 'c:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64/cl.EXE'
checking whether the host C++ compiler can be used... yes
checking the host C++ compiler version... 19.00.24215
checking for rustc... c:/Users/upsuper/.cargo/bin/rustc.EXE
checking rustc version... 1.14.0
checking for awk... C:/mozilla-build/msys/bin/gawk.EXE
checking for perl... C:/mozilla-build/msys/bin/perl.EXE
checking for minimum required perl version >= 5.006... 5.008008
checking for full perl installation... yes
checking for doxygen... not found
checking for xargs... C:/mozilla-build/msys/bin/xargs.EXE
checking for autoconf... C:/mozilla-build/msys/local/bin/autoconf-2.13
creating cache ./config.cache
checking host system type... x86_64-pc-mingw32
checking target system type... x86_64-pc-mingw32
checking build system type... x86_64-pc-mingw32
checking for gcc... cl.EXE
checking whether the C compiler (cl.EXE  ) works... yes
checking whether the C compiler (cl.EXE  ) is a cross-compiler... no
checking whether we are using GNU C... no
checking whether cl.EXE accepts -g... no
checking for c++... cl.EXE
checking whether the C++ compiler (cl.EXE  ) works... yes
checking whether the C++ compiler (cl.EXE  ) is a cross-compiler... no
checking whether we are using GNU C++... no
checking whether cl.EXE accepts -g... no
checking for ranlib... :
checking for ml64... /c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64/ml64
checking for ar... no
checking for ld... link
checking for strip... no
checking for windres... no
checking how to run the C preprocessor... cl.EXE -E -nologo
checking how to run the C++ preprocessor... cl.EXE -TP -E -nologo
checking for highest Windows version supported by this SDK... 0x0A00
checking for Windows SDK being recent enough... yes
checking for _getc_nolock... yes
checking for sb-conf... no
checking for ve... no
checking for make... /usr/local/bin/make
checking for X... no
checking that static assertion macros used in autoconf tests work... yes
checking for 64-bit OS... yes
checking whether the C++ compiler (cl.EXE  -TP -nologo -wd4345 -wd4351 -wd4800 -wd4819 -wd4595 -D_CRT_SECURE_NO_WARNINGS -wd5026 -wd5027 -Zc:sizedDealloc- -Zc:threadSafeInit- -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -wd4244 -wd4267 -wd4251 -we4553 -GR-  -LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE) actually is a C++ compiler... yes
checking NSPR selection... posix-wrapper
checking for valid optimization flags... yes
checking what kind of list files are supported by the linker... list
checking for posix_fadvise... no
checking for posix_fallocate... no
checking for malloc.h... yes
checking for alloca.h... no
checking for strndup... no
checking for posix_memalign... no
checking for memalign... no
checking for malloc_usable_size... no
checking for malloc.h... (cached) yes
checking whether malloc_usable_size definition can use const argument... yes
checking for valloc in malloc.h... no
checking for valloc in unistd.h... no
checking for setlocale... no
checking for localeconv... no
updating cache ./config.cache
creating ./config.data
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:841: checking host system type
configure:862: checking target system type
configure:880: checking build system type
configure:2216: checking for gcc
configure:2329: checking whether the C compiler (cl.EXE  ) works
configure:2345: cl.EXE -o conftest    conftest.c  1>&5
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 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 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:conftest.exe
/out:conftest.exe
conftest.obj
configure:2371: checking whether the C compiler (cl.EXE  ) is a cross-compiler
configure:2376: checking whether we are using GNU C
configure:2385: cl.EXE -E conftest.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

conftest.c
configure:2404: checking whether cl.EXE accepts -g
configure:2440: checking for c++
configure:2472: checking whether the C++ compiler (cl.EXE  ) works
configure:2488: cl.EXE -o conftest    conftest.C  1>&5
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 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 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:conftest.exe
/out:conftest.exe
conftest.obj
configure:2514: checking whether the C++ compiler (cl.EXE  ) is a cross-compiler
configure:2519: checking whether we are using GNU C++
configure:2528: cl.EXE -E conftest.C
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

conftest.C
configure:2547: checking whether cl.EXE accepts -g
configure:2581: checking for ranlib
configure:2613: checking for ml64
configure:2667: checking for ar
configure:2702: checking for ld
configure:2737: checking for strip
configure:2772: checking for windres
configure:2862: checking how to run the C preprocessor
configure:2942: checking how to run the C++ preprocessor
configure:3047: cl.EXE -c  -TC -nologo -wd4819  conftest.c 1>&5
conftest.c
configure:3072: cl.EXE -c  -TP -nologo -wd4345 -wd4351 -wd4800 -wd4819 -wd4595 -D_CRT_SECURE_NO_WARNINGS  conftest.C 1>&5
conftest.C
configure:3234: checking for highest Windows version supported by this SDK
configure:3277: checking for Windows SDK being recent enough
configure:3322: checking for _getc_nolock
configure:3354: cl.EXE -o conftest  -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0   conftest.c  1>&5
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
conftest.c
configure:3392: checking for sb-conf
configure:3392: checking for ve
configure:3532: checking for make
configure:3655: checking for X
configure:3722: cl.EXE -E -nologo  conftest.c >/dev/null 2>conftest.out
configure(3718): fatal error C1083: Cannot open include file: 'X11/Intrinsic.h': No such file or directory
configure: failed program was:
#line 3717 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
configure:3798: cl.EXE -o conftest  -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0   conftest.c -lXt  1>&5
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-lXt'
conftest.c
conftest.obj : error LNK2019: unresolved external symbol XtMalloc referenced in function main
conftest.exe : fatal error LNK1120: 1 unresolved externals
configure: failed program was:
#line 3791 "configure"
#include "confdefs.h"

int main() {
XtMalloc()
; return 0; }
configure:4710: cl.EXE -c   conftest.c 1>&5
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

conftest.c
configure(4706): error C2065: '__thumb2__': undeclared identifier
configure: failed program was:
#line 4703 "configure"
#include "confdefs.h"

int main() {
return sizeof(__thumb2__);
; return 0; }
configure:4955: checking that static assertion macros used in autoconf tests work
configure:4976: cl.EXE -c  -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0  conftest.c 1>&5
conftest.c
configure:4993: cl.EXE -c  -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0  conftest.c 1>&5
conftest.c
configure(4993): error C2118: negative subscript
configure: failed program was:
#line 4986 "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:5016: cl.EXE -c  -TP -nologo -wd4345 -wd4351 -wd4800 -wd4819 -wd4595 -D_CRT_SECURE_NO_WARNINGS -wd5026 -wd5027 -Zc:sizedDealloc- -Zc:threadSafeInit- -D_HAS_EXCEPTIONS=0  conftest.C 1>&5
conftest.C
configure:5033: cl.EXE -c  -TP -nologo -wd4345 -wd4351 -wd4800 -wd4819 -wd4595 -D_CRT_SECURE_NO_WARNINGS -wd5026 -wd5027 -Zc:sizedDealloc- -Zc:threadSafeInit- -D_HAS_EXCEPTIONS=0  conftest.C 1>&5
conftest.C
configure(5034): error C2118: negative subscript
configure: failed program was:
#line 5026 "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:6993: checking for 64-bit OS
configure:7002: cl.EXE -c  -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0  conftest.c 1>&5
conftest.c
configure:7777: checking whether the C++ compiler (cl.EXE  -TP -nologo -wd4345 -wd4351 -wd4800 -wd4819 -wd4595 -D_CRT_SECURE_NO_WARNINGS -wd5026 -wd5027 -Zc:sizedDealloc- -Zc:threadSafeInit- -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -wd4244 -wd4267 -wd4251 -we4553 -GR-  -LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE) actually is a C++ compiler
configure:7796: cl.EXE -o conftest  -TP -nologo -wd4345 -wd4351 -wd4800 -wd4819 -wd4595 -D_CRT_SECURE_NO_WARNINGS -wd5026 -wd5027 -Zc:sizedDealloc- -Zc:threadSafeInit- -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -wd4244 -wd4267 -wd4251 -we4553 -GR-   -LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE conftest.C  1>&5
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-LARGEADDRESSAWARE'
cl : Command line warning D9002 : ignoring unknown option '-NXCOMPAT'
conftest.C
configure:10819: checking NSPR selection
configure:11448: checking for valid optimization flags
configure:11459: cl.EXE -c  -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -wd4244 -wd4267 -we4553 -O2  conftest.c 1>&5
conftest.c
configure:12444: checking what kind of list files are supported by the linker
configure:12449: cl.EXE -o conftest.obj -c  -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -wd4244 -wd4267 -we4553  conftest.c 1>&5
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
conftest.c
configure:12451: cl.EXE -o conftest  -LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE conftest.list  kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib 1>&5
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 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
cl : Command line warning D9002 : ignoring unknown option '-LARGEADDRESSAWARE'
cl : Command line warning D9002 : ignoring unknown option '-NXCOMPAT'
cl : Command line warning D9024 : unrecognized source file type 'conftest.list', object file assumed
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:conftest.exe
/out:conftest.exe
conftest.list
kernel32.lib
user32.lib
gdi32.lib
winmm.lib
wsock32.lib
advapi32.lib
psapi.lib
conftest.list : fatal error LNK1107: invalid or corrupt file: cannot read at 0x14
configure:12455: cl.EXE -o conftest  -LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE -Wl,-filelist,conftest.list  kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib 1>&5
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 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
cl : Command line error D8021 : invalid numeric argument '/Wl,-filelist,conftest.list'
configure:12457: cl.EXE -o conftest  -LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE @conftest.list  kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib 1>&5
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 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
cl conftest.obj

cl : Command line warning D9002 : ignoring unknown option '-LARGEADDRESSAWARE'
cl : Command line warning D9002 : ignoring unknown option '-NXCOMPAT'
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:conftest.exe
/out:conftest.exe
conftest.obj
kernel32.lib
user32.lib
gdi32.lib
winmm.lib
wsock32.lib
advapi32.lib
psapi.lib
configure:12808: checking for posix_fadvise
configure:12840: cl.EXE -o conftest -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -wd4244 -wd4267 -we4553   -LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE conftest.c  kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib 1>&5
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-LARGEADDRESSAWARE'
cl : Command line warning D9002 : ignoring unknown option '-NXCOMPAT'
conftest.c
kernel32.lib
c1: fatal error C1083: Cannot open source file: 'kernel32.lib': No such file or directory
user32.lib
c1: fatal error C1083: Cannot open source file: 'user32.lib': No such file or directory
gdi32.lib
c1: fatal error C1083: Cannot open source file: 'gdi32.lib': No such file or directory
winmm.lib
c1: fatal error C1083: Cannot open source file: 'winmm.lib': No such file or directory
wsock32.lib
c1: fatal error C1083: Cannot open source file: 'wsock32.lib': No such file or directory
advapi32.lib
c1: fatal error C1083: Cannot open source file: 'advapi32.lib': No such file or directory
psapi.lib
c1: fatal error C1083: Cannot open source file: 'psapi.lib': No such file or directory
Generating Code...
configure: failed program was:
#line 12813 "configure"
#define posix_fadvise innocuous_posix_fadvise
#include "confdefs.h"
#undef posix_fadvise
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char posix_fadvise(); below.  */
#define posix_fadvise innocuous_posix_fadvise
#include <assert.h>
#undef posix_fadvise
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char posix_fadvise();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_posix_fadvise) || defined (__stub___posix_fadvise)
choke me
#else
posix_fadvise();
#endif

; return 0; }
configure:12808: checking for posix_fallocate
configure:12840: cl.EXE -o conftest -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -wd4244 -wd4267 -we4553   -LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE conftest.c  kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib 1>&5
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-LARGEADDRESSAWARE'
cl : Command line warning D9002 : ignoring unknown option '-NXCOMPAT'
conftest.c
kernel32.lib
c1: fatal error C1083: Cannot open source file: 'kernel32.lib': No such file or directory
user32.lib
c1: fatal error C1083: Cannot open source file: 'user32.lib': No such file or directory
gdi32.lib
c1: fatal error C1083: Cannot open source file: 'gdi32.lib': No such file or directory
winmm.lib
c1: fatal error C1083: Cannot open source file: 'winmm.lib': No such file or directory
wsock32.lib
c1: fatal error C1083: Cannot open source file: 'wsock32.lib': No such file or directory
advapi32.lib
c1: fatal error C1083: Cannot open source file: 'advapi32.lib': No such file or directory
psapi.lib
c1: fatal error C1083: Cannot open source file: 'psapi.lib': No such file or directory
Generating Code...
configure: failed program was:
#line 12813 "configure"
#define posix_fallocate innocuous_posix_fallocate
#include "confdefs.h"
#undef posix_fallocate
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char posix_fallocate(); below.  */
#define posix_fallocate innocuous_posix_fallocate
#include <assert.h>
#undef posix_fallocate
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char posix_fallocate();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_posix_fallocate) || defined (__stub___posix_fallocate)
choke me
#else
posix_fallocate();
#endif

; return 0; }
configure:13086: checking for malloc.h
configure:13099: cl.EXE -c -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -wd4244 -wd4267 -we4553  conftest.c 1>&5
conftest.c
configure:13135: checking for alloca.h
configure:13148: cl.EXE -c -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -wd4244 -wd4267 -we4553  conftest.c 1>&5
conftest.c
configure(13142): fatal error C1083: Cannot open include file: 'alloca.h': No such file or directory
configure: failed program was:
#line 13140 "configure"
#include "confdefs.h"

#include <alloca.h>
int main() {

; return 0; }
configure:13181: checking for strndup
configure:13213: cl.EXE -o conftest -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -wd4244 -wd4267 -we4553   -LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE conftest.c  kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib 1>&5
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-LARGEADDRESSAWARE'
cl : Command line warning D9002 : ignoring unknown option '-NXCOMPAT'
conftest.c
kernel32.lib
c1: fatal error C1083: Cannot open source file: 'kernel32.lib': No such file or directory
user32.lib
c1: fatal error C1083: Cannot open source file: 'user32.lib': No such file or directory
gdi32.lib
c1: fatal error C1083: Cannot open source file: 'gdi32.lib': No such file or directory
winmm.lib
c1: fatal error C1083: Cannot open source file: 'winmm.lib': No such file or directory
wsock32.lib
c1: fatal error C1083: Cannot open source file: 'wsock32.lib': No such file or directory
advapi32.lib
c1: fatal error C1083: Cannot open source file: 'advapi32.lib': No such file or directory
psapi.lib
c1: fatal error C1083: Cannot open source file: 'psapi.lib': No such file or directory
Generating Code...
configure: failed program was:
#line 13186 "configure"
#define strndup innocuous_strndup
#include "confdefs.h"
#undef strndup
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char strndup(); below.  */
#define strndup innocuous_strndup
#include <assert.h>
#undef strndup
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char strndup();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_strndup) || defined (__stub___strndup)
choke me
#else
strndup();
#endif

; return 0; }
configure:13181: checking for posix_memalign
configure:13213: cl.EXE -o conftest -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -wd4244 -wd4267 -we4553   -LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE conftest.c  kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib 1>&5
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-LARGEADDRESSAWARE'
cl : Command line warning D9002 : ignoring unknown option '-NXCOMPAT'
conftest.c
kernel32.lib
c1: fatal error C1083: Cannot open source file: 'kernel32.lib': No such file or directory
user32.lib
c1: fatal error C1083: Cannot open source file: 'user32.lib': No such file or directory
gdi32.lib
c1: fatal error C1083: Cannot open source file: 'gdi32.lib': No such file or directory
winmm.lib
c1: fatal error C1083: Cannot open source file: 'winmm.lib': No such file or directory
wsock32.lib
c1: fatal error C1083: Cannot open source file: 'wsock32.lib': No such file or directory
advapi32.lib
c1: fatal error C1083: Cannot open source file: 'advapi32.lib': No such file or directory
psapi.lib
c1: fatal error C1083: Cannot open source file: 'psapi.lib': No such file or directory
Generating Code...
configure: failed program was:
#line 13186 "configure"
#define posix_memalign innocuous_posix_memalign
#include "confdefs.h"
#undef posix_memalign
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char posix_memalign(); below.  */
#define posix_memalign innocuous_posix_memalign
#include <assert.h>
#undef posix_memalign
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char posix_memalign();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_posix_memalign) || defined (__stub___posix_memalign)
choke me
#else
posix_memalign();
#endif

; return 0; }
configure:13181: checking for memalign
configure:13213: cl.EXE -o conftest -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -wd4244 -wd4267 -we4553   -LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE conftest.c  kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib 1>&5
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-LARGEADDRESSAWARE'
cl : Command line warning D9002 : ignoring unknown option '-NXCOMPAT'
conftest.c
kernel32.lib
c1: fatal error C1083: Cannot open source file: 'kernel32.lib': No such file or directory
user32.lib
c1: fatal error C1083: Cannot open source file: 'user32.lib': No such file or directory
gdi32.lib
c1: fatal error C1083: Cannot open source file: 'gdi32.lib': No such file or directory
winmm.lib
c1: fatal error C1083: Cannot open source file: 'winmm.lib': No such file or directory
wsock32.lib
c1: fatal error C1083: Cannot open source file: 'wsock32.lib': No such file or directory
advapi32.lib
c1: fatal error C1083: Cannot open source file: 'advapi32.lib': No such file or directory
psapi.lib
c1: fatal error C1083: Cannot open source file: 'psapi.lib': No such file or directory
Generating Code...
configure: failed program was:
#line 13186 "configure"
#define memalign innocuous_memalign
#include "confdefs.h"
#undef memalign
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char memalign(); below.  */
#define memalign innocuous_memalign
#include <assert.h>
#undef memalign
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char memalign();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_memalign) || defined (__stub___memalign)
choke me
#else
memalign();
#endif

; return 0; }
configure:13244: checking for malloc_usable_size
configure:13276: cl.EXE -o conftest -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -wd4244 -wd4267 -we4553   -LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE conftest.c  kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib 1>&5
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-LARGEADDRESSAWARE'
cl : Command line warning D9002 : ignoring unknown option '-NXCOMPAT'
conftest.c
kernel32.lib
c1: fatal error C1083: Cannot open source file: 'kernel32.lib': No such file or directory
user32.lib
c1: fatal error C1083: Cannot open source file: 'user32.lib': No such file or directory
gdi32.lib
c1: fatal error C1083: Cannot open source file: 'gdi32.lib': No such file or directory
winmm.lib
c1: fatal error C1083: Cannot open source file: 'winmm.lib': No such file or directory
wsock32.lib
c1: fatal error C1083: Cannot open source file: 'wsock32.lib': No such file or directory
advapi32.lib
c1: fatal error C1083: Cannot open source file: 'advapi32.lib': No such file or directory
psapi.lib
c1: fatal error C1083: Cannot open source file: 'psapi.lib': No such file or directory
Generating Code...
configure: failed program was:
#line 13249 "configure"
#define malloc_usable_size innocuous_malloc_usable_size
#include "confdefs.h"
#undef malloc_usable_size
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char malloc_usable_size(); below.  */
#define malloc_usable_size innocuous_malloc_usable_size
#include <assert.h>
#undef malloc_usable_size
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char malloc_usable_size();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_malloc_usable_size) || defined (__stub___malloc_usable_size)
choke me
#else
malloc_usable_size();
#endif

; return 0; }
configure:13308: checking for malloc.h
configure:13344: checking whether malloc_usable_size definition can use const argument
configure:13355: cl.EXE -c -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -wd4244 -wd4267 -we4553  conftest.c 1>&5
conftest.c
configure:13384: checking for valloc in malloc.h
conftest.c
configure:13409: checking for valloc in unistd.h
conftest.c
configure(13412): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
configure:13439: checking for setlocale
configure:13471: cl.EXE -o conftest -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -wd4244 -wd4267 -we4553   -LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE conftest.c  kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib 1>&5
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-LARGEADDRESSAWARE'
cl : Command line warning D9002 : ignoring unknown option '-NXCOMPAT'
conftest.c
kernel32.lib
c1: fatal error C1083: Cannot open source file: 'kernel32.lib': No such file or directory
user32.lib
c1: fatal error C1083: Cannot open source file: 'user32.lib': No such file or directory
gdi32.lib
c1: fatal error C1083: Cannot open source file: 'gdi32.lib': No such file or directory
winmm.lib
c1: fatal error C1083: Cannot open source file: 'winmm.lib': No such file or directory
wsock32.lib
c1: fatal error C1083: Cannot open source file: 'wsock32.lib': No such file or directory
advapi32.lib
c1: fatal error C1083: Cannot open source file: 'advapi32.lib': No such file or directory
psapi.lib
c1: fatal error C1083: Cannot open source file: 'psapi.lib': No such file or directory
Generating Code...
configure: failed program was:
#line 13444 "configure"
#define setlocale innocuous_setlocale
#include "confdefs.h"
#undef setlocale
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char setlocale(); below.  */
#define setlocale innocuous_setlocale
#include <assert.h>
#undef setlocale
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char setlocale();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_setlocale) || defined (__stub___setlocale)
choke me
#else
setlocale();
#endif

; return 0; }
configure:13439: checking for localeconv
configure:13471: cl.EXE -o conftest -TC -nologo -wd4819 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -wd4244 -wd4267 -we4553   -LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE conftest.c  kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib 1>&5
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-LARGEADDRESSAWARE'
cl : Command line warning D9002 : ignoring unknown option '-NXCOMPAT'
conftest.c
kernel32.lib
c1: fatal error C1083: Cannot open source file: 'kernel32.lib': No such file or directory
user32.lib
c1: fatal error C1083: Cannot open source file: 'user32.lib': No such file or directory
gdi32.lib
c1: fatal error C1083: Cannot open source file: 'gdi32.lib': No such file or directory
winmm.lib
c1: fatal error C1083: Cannot open source file: 'winmm.lib': No such file or directory
wsock32.lib
c1: fatal error C1083: Cannot open source file: 'wsock32.lib': No such file or directory
advapi32.lib
c1: fatal error C1083: Cannot open source file: 'advapi32.lib': No such file or directory
psapi.lib
c1: fatal error C1083: Cannot open source file: 'psapi.lib': No such file or directory
Generating Code...
configure: failed program was:
#line 13444 "configure"
#define localeconv innocuous_localeconv
#include "confdefs.h"
#undef localeconv
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char localeconv(); below.  */
#define localeconv innocuous_localeconv
#include <assert.h>
#undef localeconv
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char localeconv();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_localeconv) || defined (__stub___localeconv)
choke me
#else
localeconv();
#endif

; return 0; }

--- stderr
configure: warning: Unknown version of the Microsoft (R) Manifest Tool.
Traceback (most recent call last):
  File "config.status", line 359, in <module>
    config_status(**args)
  File "c:\mozilla-source\mozjs\mozjs\python\mozbuild\mozbuild\config_status.py", line 121, in config_status
    write_mozinfo(os.path.join(topobjdir, 'mozinfo.json'), env, os.environ)
  File "c:\mozilla-source\mozjs\mozjs\python\mozbuild\mozbuild\mozinfo.py", line 154, in write_mozinfo
    build_conf = build_dict(config, env)
  File "c:\mozilla-source\mozjs\mozjs\python\mozbuild\mozbuild\mozinfo.py", line 32, in build_dict
    the_mozconfig = mozconfig.MozconfigLoader(config.topsrcdir).find_mozconfig(env)
  File "c:\mozilla-source\mozjs\mozjs\python\mozbuild\mozbuild\mozconfig.py", line 143, in find_mozconfig
    'does not exist in any of ' + ', '.join(potential_roots))
mozbuild.mozconfig.MozconfigFindException: MOZCONFIG environment variable refers to a path that does not exist in any of c:\mozilla-source\mozjs\mozjs, c:\mozilla-source\mozjs\target\debug\build\mozjs_sys-566feb6a71daf1b1\out
Creating config.status
make: *** [maybe-configure] Error 1
thread 'main' panicked at 'assertion failed: result.success()', build.rs:43
note: Run with `RUST_BACKTRACE=1` for a backtrace.
@upsuper upsuper added bug and removed bug labels Feb 1, 2017
@upsuper
Copy link
Author

upsuper commented Feb 2, 2017

This is not because of the configure failures that "kernel32.lib" etc. are not found. It is because I have MOZCONFIG set with some value, and Mozconfig fails to find that file. After I unset MOZCONFIG, it works. Closing this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant