Dynaverse.net
Off Topic => Engineering => Topic started by: Bonk on March 07, 2006, 09:33:12 am
-
Has anybody here done it? Any tips?
I'm thinking of writing a Firefox extension or plugin in c++ and I understand I need a full Firefox source tree that builds on the development machine before beginning.
I'd prefer to use GnuWin32 packages instead of cygwin if possible. The multiple sets of instructions on building mozilla are starting to make my head hurt...
-
I can only say, I've never done such a thing. What kinda ideas do you have for an Extension?
Stephen
-
Hehe... top secret! ;) I don't really want to say what unless I can actually figure out how to do it.
-
Hehe... top secret! ;) I don't really want to say what unless I can actually figure out how to do it.
Afraid someone's going to steal your thunder? ;)
-
Nah, if someone else does it first I'd be more than happy to use it and save myself the effort. Though its pretty specialised, I highly doubt anyone else would go to the trouble. I want to use c++ which requires building Firefox from source first, as I flat out refuse to rely on the notoriously unreliable javascript (a javascript extension does not require building firefox).
I just don't want to say what it is I'm thinking of to avoid getting people's hopes up or announcing something prematurely and letting others and myself down.
-
Grrrrr... the configure script refuses to acknowledge my C compiler which I know works... >:(
checking whether the C compiler (cl ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
:huh:
This will take a little research...
-
Almost there... through a combination of the instructions here:
http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites_on_the_1.7_and_1.8_Branches
and here:
http://whereswalden.com/mozilla/msvcfree/
and the FAQs here:
http://developer.mozilla.org/en/docs/Mozilla_Build_FAQ#Win32-specific_questions
and the comments here:
http://whereswalden.com/mozilla/msvcfree/comments/
I figured out to call vcvars32.bat separately from the mozilla build environment script:
vcvars:
C:\PROGRA~1\MICROS~3\VC98\Bin\vcvars32.bat
my mozilla build environment script/batch:
set HOME=C:\home
set MSSDK=C:\Program Files\Microsoft Platform SDK
set MOZ_TOOLS=C:\moztools
set CYGWINBASE=C:\cygwin
set PATH=C:\Program Files\Microsoft Platform SDK\bin;C:\Perl\bin;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\bin\ide;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\bin;C:\Program Files\Microsoft Visual Studio\VC98\Bin;C:\cygwin\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\moztools\bin;C:\masm32\bin
C:
chdir C:\cygwin\bin
rename link.exe link_disabled.exe
bash --login -i
And I thought I was off to the races... however after 30 minutes of building it failed with this error:
nsViewManager.cpp(1695) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'E:\8966\vc98\p2\src\P2\main.c', line 494)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
make[4]: *** [nsViewManager.obj] Error 2
>:( Grrr.... gotta look that one up... hope I didn't run out of memory.... got 640MB in, that ought to do it...
-
Arg! MS tells me this:
FIX: You may receive the "Fatal error C1001 Internal complier error" error message when you compile the project in Visual C++ 6.0
SYMPTOMS
When you use large macros in Microsoft Visual C++ 6.0 and you compile the project, you may receive the following error message:
fatal error C1001: INTERNAL COMPILER ERROR
RESOLUTION
To resolve this problem, obtain the latest service pack for Visual C++ 6.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
834001 ([url]http://support.microsoft.com/kb/834001/[/url]) List of bugs that are fixed in Visual Studio 6.0 Service Pack 6
http://support.microsoft.com/?scid=kb;en-us;890892&spid=3042&sid=global
But the Firefox build instructions tell me this:
The standard compiler for Mozilla on Windows is Microsoft Visual C++, version 6. The GUI tools of the MSVC environment are not used, only the command-line tools CL (C/C++ compiler), LINK (linker), RC (resource compiler), and ML (assembler). Visual C++ Service Pack 5 and Visual C++ Processor Pack are required. Service Pack 6 is not supported. MSVC version 5 is not supported.
I'm using VC6SP5.... :huh:
I suspect I ran out of physical memory as I have a gajillion firefox windows open and firefox is currently using 133MB RAM.
-
Hmmm I wonder if its an STLPort issue:
http://lists.gnu.org/archive/html/nel-all/2004-09/msg00012.html
Perhaps the firefox 1.5.0.1 source is using a newer version even though the mozilla 1.8 branch is supposed to built with VC6SP5 on Win32....
-
Well, I rolled back my VC includes to the originals (undoing http://www.dinkumware.com/vc_fixes.html) and reapplied SP5... no dice. I guess I'll do a little digging on the STLPort version issue.
-
Looks like STLPort is not used in Mozilla...
However I took a look at nsViewManager.cpp(1695) and low and behold, I find this just before it...
// This gets around an internal compiler error C1001
// (compiler file 'E:\8799\vc98\p2\src\P2\main.c', line 494)
#ifdef WINCE
#pragma optimize( "", off )
#endif
AHA! Say I, but I'm not compiling for WinCE...
Perhaps I'll just comment out the #ifdef just to see what happens...
-
Well the build continued for another 40 minutes then died on:
JSConsole.cpp
../../../dist/include/js\jspubtd.h(52) : error C2146: syntax error : missing ';' before identifier 'jsint'
../../../dist/include/js\jspubtd.h(52) : fatal error C1004: unexpected end of file found
make[4]: *** [JSConsole.obj] Error 2
Grrr... >:( another reason for me to despise javascript... whoever came up with it ought to be flogged.
edit: Aha, but I do have a Firefox.exe! :woot: The error above must be in the installer creation...
edit2: hmmm it doesn't look quite right, the version number is not right on the resources.... and that jspubtd.h error just should not be, it is just a typedef line and it is correct... if I recall correctly this is an error that comes up due to a problem in the preceeding code (I came a cross it building eAccelerator 0.9.5-b1)
http://andre.stechert.org/urwhatu/2006/01/error_c2143_syn.html
gonna test the exe...
-
Well the Firefox.exe I built seems to work fine, I'm posting using it now. It seems a little faster than the official binary release. I'm gonna try and correct that error in the jspubtd.h file anyway to see if the installer build will complete.
BTW, the source I'm using is: ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.1/source/firefox-1.5.0.1-source.tar.bz2
edit: ah, its not the installer but rather a test app:
the problem is already known, too bad Google Groups does not know it
(there is a problem atm with Google Groups only picking up some of the
posting here). See the the thread "JSConsole.cpp : jspubdt.h syntax
error on Win2k (VC6 SP5)" here in this group
(news:obadnS0ysqLDE0TeRVn-oA@mozilla.org),
https://bugzilla.mozilla.org/show_bug.cgi?id=324173 has been filed about
this. Anyway, at this time the build has basically already been finished
(what failed building here is a testing application), take a look if you
can find a firefox.exe under ff-dbg/dist/bin.
http://groups.google.com/group/mozilla.dev.builds/browse_thread/thread/ccec96a66fc244c7/105127ac314f49bd
Hmmm, I'm not sure about the workaround posted on the bugzilla thread:
https://bugzilla.mozilla.org/show_bug.cgi?id=324173
-
The origins of source code (http://ars.userfriendly.org/cartoons/?id=20060309)
-
I found an easier way to my goal:
http://www.dynaverse.net/forum/index.php/topic,163353880.msg1122693011.html#msg1122693011
Which will tell you what I'm up to... I may still play with browser plugins though...
-
so are you trying to make a browser just for SFC (ie no more GSA) ;) lol
-
Not exactly a gsa replacement. It's kind of hard to explain, all will be revealed eventually. :)