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

相關問題