Showing posts with label firefox. Show all posts
Showing posts with label firefox. Show all posts

Wednesday, February 24, 2010

Firefox - debug build

I am on my way to doing that Firefox Lab from ever so long ago (2 weeks) but I just had the regular Firefox build on my computer so I had to go back and build the debug version. Unfortunately, I spent some of last night and today trying to figure out why it kept saying update.exe.manifest in mozilla-central/toolkit/mozapps/update/updater/ was not found (aside from the obvious, the file not being there)...it seemed it should be there but after trying a number of rebuild commands and talking on IRC in the #developer channel trying to get some ideas and having them say to do things I had already tried, I decided to scrap it all and start from scratch. I did basically the same thing I did in the beginning except this time I made the .mozconfig file contain the settings for the debug build in the first place rather than just the original build, and waited for an hour or more for everything to complete (hg clone ___ and make -f client.mk) and sure enough, updater.exe.manifest was there.
Should have just done that from the beginning...
Tomorrow will be a day of labs. I intend to do the Firefox Lab as well as the lab about fixing a bug in Thunderbird. It shall be good fun...isn't it always?? :)

Saturday, February 20, 2010

Firefox Build Finally Complete

And I have successfully built FireFox finally!! I scrapped my old cygwin gcc which seems to be a bit of a failure and traded it in for one packaged with this 'mozilla build' toolkit containing what seems to be everything we need to build mozilla tools ??? Well, it works, I've succeeded, and I will be working on the bug and the lab simultaneously now. Excellent.

Trying to complete my build of FireFox to work on lab

Sooo I am having a bit of trouble with my bug so I thought I would let my mind dwell deep into the caverns of JavaScript and hopefully it would come up with something while I tried to build FireFox. Unfortunately, while trying to build FireFox, after installing the SDK and hoping that it would all be good from here on out, it's telling me that my gcc that came with cygwin can not execute binary files??
To be exact...it says...

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"


Now...why in the world wouldn't my C compiler be working properly. It's obviously detected and it is evident that it is there...why in the world...would it...not be...working?
Frustrating.

Wednesday, February 3, 2010

Firefox Build

I began by typing into Google 'download firefox source code' and stumbled across this page. It was nice enough to give me a link to the source code and some guidance that winzip and winrar don't (at least at the time the article was written) have the ability to extract .*bz2 and .tar files properly, and to do it with 7-zip. I extracted it into a directory on my computer and proceeded to look for instructions on how to build Firefox on the web.

I opened up a few websites, but only really looked at one page in particular. The author seemed to explain things very well, and it was clear and easy to follow. He said he was new at building Firefox, as was I so that was a promising commonality, but the main difference is he did it on visual studio 2005 and I was running it on visual studio 2008, so I had to change a few things in the batch setup file, being the directory.

It was all good and well until we came to the .mozconfig file that we had to create. The first error was that it was saying I didn't have it set to create .mozconfig.mk automatically. After I fixed that, it was saying I didn't have MOZ_PROJECT_CO or something along those lines set to a variable, yet scanning through the files I found a MOZ_PROJECT_CO=browser line, so I do not know what it was talking about there. I went searching on the web and stumbled across this page from mozilla that had this set up for the .mozconfig file

echo '. $topsrcdir/browser/config/mozconfig' > mozconfig # let's build Firefox...
echo 'mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-ff-release' >> mozconfig # ...in this directory...
echo 'mk_add_options MOZ_MAKE_FLAGS="-j4"' >> mozconfig # ...quickly.


however that didn't work either, and had the same moz_project_co issue. I was two seconds away from asking in the firefox channel of irc and had typed out half of the message, but then on my way to pastebin to paste what was happening, I decided to try something. I made a combination of the two and ended up with this...

# Building Firefox Trunk with Debugging
. $topsrcdir/browser/config/mozconfig > mozconfig

# Put all obj files in one place, not in src tree
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-objdir >> mozconfig
ac_add_options --disable-static
ac_add_options --enable-shared

# Debug Build Setup Options
ac_add_options --disable-optimize
ac_add_options --enable-debug

# I'm using Canvas for my work
ac_add_options --enable-canvas


and voila! after a quick

make -f client.mk checkout


it began!! Success!! At least for the checkout... There were a few 'command not found's at the beginning of the build but that was something in the .mozconfig file and it seemed to have been minuscule. The line numbers of the issues were, 3, 8, and 12, and those are the lines that are blank, so of course no command is found on a blank line...

I then ran

make -f client.mk build


hoping that it would all work out, but unfortunately it did not. It said to build the installer, I would need makensis, and to build without the installer, to reconfigure using --disable-installer. It is late now, and I am tired, so I thought I would speed up the process and disable the installer. Lo and behold, it ran for a little bit longer but ... not long enough ... as a new error has been brought to the surface...an error unlike any other...and error, full of unorganized and very confusing lines.

/cygdrive/c/proj/mozilla/build/cygwin-wrapper /cygdrive/c/proj/moztools/bin/nsinstall -m 644 ../mozilla-config.h /cygdrive/c/proj/mozilla/config/nsStaticComponents.h ../dist/include
/cygdrive/c/proj/mozilla/build/cygwin-wrapper: line 75: /cygdrive/c/proj/moztools/bin/nsinstall: Permission denied
/cygdrive/c/proj/mozilla/build/cygwin-wrapper: line 75: /cygdrive/c/proj/moztools/bin/nsinstall: No error
make[4]: *** [export] Error 1
make[4]: Leaving directory `/cygdrive/c/proj/mozilla/firefox-objdir/config'
make[3]: *** [export_tier_base] Error 2
make[3]: Leaving directory `/cygdrive/c/proj/mozilla/firefox-objdir'
make[2]: *** [tier_base] Error 2
make[2]: Leaving directory `/cygdrive/c/proj/mozilla/firefox-objdir'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/cygdrive/c/proj/mozilla/firefox-objdir'
make: *** [build] Error 2


...Yea. Sooo...I guess something is wrong with cygwin-wrapper. That, or permission is denied to nsinstall. or both...line 75 in cygwin-wrapper is simply

exec $prog $args

Prog being the first argument after exec is run, and args being what follows after that...
I guess the issue is that nsinstall's permission is denied. I looked at it in windows explorer, and it does have a little administrators icon on the icon. Time to look to irc and see what they say...
I asked irc and there is no response. It is troublesome because recently my internet is not really working at home and I am stuck at the library most of the time. The only time my internet works reliably is after midnight...other than that downloads will stop not far in and productivity is hindered. I asked some irc folks but I guess it's too late for a response? Either way, I will continue to pick away at it, at 2 in the morning, after 5 unsuccessful hours in the library...maybe if I download these mozilla build tools, things will get better.

I downloaded the build tools that are defined as a prerequisite on Mozilla's development wiki, but unfortunately, it encountered a new error...

make[1]: Leaving directory `/c/proj/mozilla'
make -C /c/proj/mozilla/firefox-objdir
make[1]: Entering directory `/c/proj/mozilla/firefox-objdir'
Makefile:45: /cygdrive/c/proj/mozilla/config/config.mk: No such file or directory
Makefile:69: /cygdrive/c/proj/mozilla/browser/build.mk: No such file or directory
Makefile:91: /cygdrive/c/proj/mozilla/config/rules.mk: No such file or directory
make[1]: *** No rule to make target `/cygdrive/c/proj/mozilla/config/rules.mk'. Stop.
make[1]: Leaving directory `/c/proj/mozilla/firefox-objdir'
make: *** [build] Error 2

No rule to make target mozilla/config/rules.mk ehh ... well, that's odd because there's a rules.mk in the mozilla/config directory, so why do you need a rule to make it?? Bah!
I tried to just build it with the command make -f client.mk as it says in mozilla's site... only adding -B at the end to make all targets...and I will hope for the best. Sleep would be nice, but I think it's a thing of the past since I have to work on some C++ which is due tomorrow and I have not been able to find the time to work on it. I haven't watched tv for so long :(. I have re-enabled the installer to be built by the way since I am taking another route and using the mozilla build tools. An installer is definitely an integral part of any application, and it should be there.
Whoa...it's been running for a good 10 minutes. I may have something here. Maybe all I ever needed was that -B...never mind. Same problem. I don't understand why it's saying it's not making rules.mk when, for one, it's already made, and two, I did set a rule to make all targets (also known as rules.mk)...

make -B -f client.mk build ???
please.
nope
make -B -k -f client.mk build?
nope


So I have decided to scrap everything and just go with what it says on the mozilla developers website. If this works, then ... good. It should, why wouldn't it...? I have just run the first step, being

hg clone http://hg.mozilla.org/mozilla-central/


but it is taking forever. It's been about a half an hour and I don't think it's even half through. I can thank my internet connection for that. I am going to bed. In the morning, I will continue with the

make -f client.mk


Anndddd I tried to run make -f client.mk but unfortunately, I do need the Windows 7 sdk. The biggest problem with that is finding a connection that'll be able to get it in less than 6 hours, since it's 2.5 gb. My connection won't do it, since the sun is up and it'll continuously drop, but I am at school now and have begun the download...only 10 hours left...then hopefully there will be some success.

Saturday, January 23, 2010

Experience in Firefox Channel on IRC

I have been sitting and observing the #Firefox irc channel on moznet throughout the night and, by watching what's going on, I can see how effective IRC can truly be. It appears that anyone, even those unknown to anyone, can just pop in at any point in time and ask questions about whatever may me itching their curiousity in regards to Firefox (or whatever the channel they are in is related to), and will in most cases get an answer if someone there is capable of answering that question. It's really a thing of beauty for people who want to troubleshoot their Firefox browser, talk about potential add-ons, and just have general discussions about Firefox's capabilities or lack thereof. I look forward to using irc in my projects and for future projects that I take on in my lifetime. It appears that programmers have another best friend aside from Google, and I can see how once you become a regular user, how involved you can become as well as how knowledgeable you can become, and how you can soon start contributing the knowledge that you have to help those who need it and truly become a part of the community.
It should be fun.