Showing posts with label build. Show all posts
Showing posts with label build. Show all posts

Wednesday, March 10, 2010

Thunderbird Build


I did the thunderbird build lab over the reading week. It involved updating a file so that it no longer displayed non-links in the link format.

I was having trouble building thunderbird first of all. I tried a number of times to rebuild but it kept getting this one error that would not allow me to open thunderbird. Whenever I ignored it or aborted it, the command prompt window would stop responding and close, and when I pressed cancel it closed it. A few days later I re-built it, however, and was successful.

I tried to reproduce the error but didn't realize that it would only reproduce once it was saved as a draft. I can attribute Scott's blog for that little tidbit. Since I had already read Scott's blog, I had a good idea of how to solve the issue. I opened up the mozTXTToHTMLConv.cpp file in the mozilla/netwerk/streamconv/converters directory and changed the necessary code, retested it and sure enough, success on all accounts (see picture).

Patch can be found here
Bug can be found here

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?? :)

Monday, February 15, 2010

Built Bespin Locally

In order to have full access to the files and to be able to test the environment properly, I have just built Bespin on my Windows laptop. I had to use cygwin and treat my computer like a Unix OS and I must say, it does a good job. The download/clone went flawlessly and I am now able to work on the bugs more effectively. I was unsure where to begin looking for the 'scrollbar cursor does not change' code in the repository but looking back at my bug page, a fellow by the name of Julian has implemented some code that could be useful for my bug. It seems that the code he edited was in this file:

plugins/supported/Editor/views/canvas.js


and is called from this file:

plugins/supported/Editor/views/text.js


This seems like a good place to start looking. Thank you Julian, wherever you are...

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.