0

我想在Windows上使用Visual Studio 2005构建Firefox 3.6 Beta 4。我下载了发布源,最新版本的mozilla build,但得到错误“C编译器无法创建可执行文件”。我已经能够建立所有其他3.5和以前的版本没有任何问题。Windows 3.6上的Firefox 3.6编译错误VS2005 - C编译器无法创建可执行文件

问题发生在构建过程的开始,它正在测试它是否可以编译和创建可执行文件。

生成的输出...

$ make -f client.mk build 
Adding client.mk options from /c/dev/ff3.6/mozilla-1.9.2/.mozconfig: 
MOZ_OBJDIR=$(TOPSRCDIR)/obj-firefox 
MOZ_CO_PROJECT=browser 
make[1]: Entering directory `/c/dev/ff3.6/mozilla-1.9.2' 
cd /c/dev/ff3.6/mozilla-1.9.2/obj-firefox 
/c/dev/ff3.6/mozilla-1.9.2/configure 
Adding configure options from /c/dev/ff3.6/mozilla-1.9.2/.mozconfig: 
--disable-tests 
--with-windows-version=501 
--enable-application=browser 
--disable-vista-sdk-requirements 
loading 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 gawk... gawk 
checking for perl5... no 
checking for perl... /bin/perl 
checking for gcc... cl 
checking whether the C compiler (cl) works... no 
configure: error: installation or configuration problem: C compiler cannot create executables. 
*** Fix above errors and then restart with "make -f client.mk build" 
make[1]: *** [configure] Error 1 
make[1]: Leaving directory `/c/dev/ff3.6/mozilla-1.9.2' 
make: *** [/c/dev/ff3.6/mozilla-1.9.2/obj-firefox/Makefile] Error 2 

的是的config.log ...

This file contains any messages produced by compilers while 
running configure, to aid debugging if configure makes a mistake. 

configure:1019: checking host system type 
configure:1040: checking target system type 
configure:1058: checking build system type 
configure:1141: checking for gawk 
configure:1258: checking for perl5 
configure:1258: checking for perl 
configure:2350: checking for gcc 
configure:2463: checking whether the C compiler (cl) works 
configure:2479: cl -o conftest conftest.c 1>&5 
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86 
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 D9024 : unrecognized source file type 'c:/mozilla-build/msys/DTEST=2', object file assumed 
conftest.c 
Microsoft (R) Incremental Linker Version 8.00.50727.762 
Copyright (C) Microsoft Corporation. All rights reserved. 

/out:DTEST=2.exe 
/out:conftest.exe 
c:/mozilla-build/msys/DTEST=2 
conftest.obj 
LINK : fatal error LNK1181: cannot open input file 'c:/mozilla-build/msys/DTEST=2.obj' 
configure: failed program was: 

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

的.mozconfig是..

# Options for client.mk. 
mk_add_options [email protected]@/obj-firefox 
mk_add_options MOZ_CO_PROJECT=browser 

# Options for 'configure' (same as command-line options). 
ac_add_options --disable-tests 
ac_add_options --with-windows-version=501 
ac_add_options --enable-application=browser 
ac_add_options --disable-vista-sdk-requirements 

有什么想法?

回答

0

我不太了解MSYS,但似乎MSYS和/或配置向编译器传递了一些奇怪的选项。编译器似乎将“c:/ mozilla-build/msys/DTEST = 2”解释为源文件类型,这导致我怀疑/ T出现在命令行上(请参阅http://msdn.microsoft.com/en-us/library/032xwy55.aspx)。

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86 
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 D9024 : unrecognized source file type 'c:/mozilla-build/msys/DTEST=2', object file assumed 
conftest.c 
Microsoft (R) Incremental Linker Version 8.00.50727.762 
Copyright (C) Microsoft Corporation. All rights reserved. 

/out:DTEST=2.exe 
/out:conftest.exe 
c:/mozilla-build/msys/DTEST=2 
conftest.obj 
LINK : fatal error LNK1181: cannot open input file 'c:/mozilla-build/msys/DTEST=2.obj' 
configure: failed program was: 

可以运行配置脚本与-x选项并提取确切编译器命令行?

+0

我运行了“configure -x”,并得到错误,-x是一个无效的选项。我尝试了-x并得到了与上面类似的错误。所以,可能不会做你正确的建议。 我注意到,如果我只是在shell中输入“cl”本身,我会得到与上面类似的错误。看起来“cl”实际上是另一个脚本文件,它可能使用响应文件选项来调用Microsoft C编译器来传递其他命令行值。 – Ron 2009-12-15 14:49:41

+0

对不起。我的意思是运行'sh -x。/ configure'。这会将-x传递给执行脚本的shell,这会在执行脚本之前显示所有行。 – JesperE 2009-12-15 16:40:15

+0

只传递了-o选项编译选项。再一次,真奇怪的是,如果我只是在shell命令中单独运行“cl”,我会得到上述相同的错误。我在cl上做了一个“where”,它是适当的MSVC编译器。我没有使用完整的路径,并得到相同的错误。除了具有conftest.exe的行外,其他错误都是一样的。但是具有DTEST的线路存在。非常混乱,它就像一个响应文件或其他命令行参数被“插入”魔术般地:)插入到命令中。我试过“cl /?”和相同的错误。如果我从正常的DOS提示符下工作正常 – Ron 2009-12-15 19:24:19

0

我试着编译下面的文件“TESTFILE.b”。

我的文件路径/home/santy/dir1/TESTFILE.b

我编译文件中通过excuting的命令/家庭/ santy /> jcompile DIR1/TESTFILE.b以下路径

下面显示了错误。

cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release 
    TESTFILE.c 
    link @D:\Users\MSANTH~1\AppData\Local\Temp\jbuild385>D:\Users\MSANTH~1\AppData\Local\Temp\jbuild386 failed , command returned a code of 1181 
    LINK : warning LNK4044: unrecognized option '/DWIN32'; ignored 
    LINK : warning LNK4044: unrecognized option '/MD'; ignored 
    LINK : warning LNK4044: unrecognized option '/W3'; ignored 
    LINK : warning LNK4044: unrecognized option '/GR'; ignored 
    LINK : warning LNK4044: unrecognized option '/EHsc'; ignored 
    LINK : warning LNK4044: unrecognized option '/GF'; ignored 
    LINK : warning LNK4044: unrecognized option '/F5000000'; ignored 
    LINK : warning LNK4044: unrecognized option '/D_LARGEFILE_SOURCE'; ignored 
    LINK : warning LNK4044: unrecognized option '/D_LARGEFILE64_SOURCE'; ignored 
    LINK : warning LNK4044: unrecognized option '/D_FILE_OFFSET_BITS=64'; ignored 
    LINK : fatal error LNK1181: cannot open input file 'QA\TESTFILE.obj' 
    jcompile: QA\TESTFILE.j deleted 
    jcompile: QA\TESTFILE.c deleted 
jcompile: Returned an error code of 8 

CL版本:

微软(R)32位C/C++优化编译器版15.00.21022.08为80x86的 版权(C)微软公司。版权所有。

usage: cl [ option... ] filename... [ /link linkoption... ]

+0

如果您有一个与旧问题相关的新问题,通常最好是完全创建一个新问题 - 答案空间应保留为答案。 – Bubbles 2012-12-20 03:34:17

相关问题