Skip to main content

Building Mozilla Firefox

Trying to build Mozilla Firefox was such an experience. I have mixed feelings about if it's a good or bad one but nonetheless, I will share my experience.

I built mine on my macbook pro running version 10.12. The things I had and/or installed were the following:
-Terminal
-Xcode
-Homebrew
-Python
-Rust
-Mozilla Firefox Code

Downloading the Mozilla Firefox code was the simplest part, it took long but it was simple. The real challenge was trying to compile the code. The amount of time it takes to successfully build it is over an hour. Imagine reaching the end of the compilation, seeing that there is an error, and the compiler stopping. This was the case for six days! It took a long time to get this working.

At first I thought there was permission issues so I tried building with sudo. This was not the right thing to do as it messed up my future attempts to recompile the code. I was told to remove the object directory and start again without sudo.

The next thing that was suggested to me was to install or reinstall Rust. I thought I installed it already but it turned out that i didn't. I installed it and tried recompiling again. Like all the other times, it would go on and on and on with complete failure.

It turned out that I didn't actually have rust installed so I went ahead and installed it. I tried running again and I still got nothing. The errors I was getting were:

error: 'stdlib.h' file not found

/usr/local/Cellar/llvm/5.0.0/include/c++/v1/wchar.h:119:15: fatal error: 'wchar.h' file not found, err: true

/usr/local/Cellar/llvm/5.0.0/include/c++/v1/stdlib.h:94:15: fatal error: 'stdlib.h' file not found, err: true

/usr/local/Cellar/llvm/5.0.0/include/c++/v1/stdlib.h:94:15: fatal error: 'stdlib.h' file not found, err: true

After giving up and turning to my teacher for help, a student who literally just solved the same issue before my eyes was just standing there. The teacher asked him to help me and he said run this simple line in terminal. 

Xcode-select --install

I said to him, I already have terminal, he said, "So did I, but this worked for me." After running it, it prompted a gui dialog asking me to accept and install some things. After that, I deleted my object folder for one last time and I recompiled. Sure enough, after an hour, it compiled.

The odd thing is that even though it successfully compiled, the amount of warnings that were flying by in the terminal was significant. There are so many warnings. It's unusual to see something work with hundreds of warnings, but it works so I'm not complaining.

Overall, it was a good experience and I couldn't have done without my classmates and teachers help. They were a crucial part in my success. Working on an open source project with a community is the best way to work. Individual progress can be achieved, but community is greater by a long shot.

Comments

Popular posts from this blog

My first bug fix: Completed

Fixing bugs is a lot of work. Fixing bugs for an open source project is even more hard work. If you have no idea what you are doing, it is very difficult to contribute. Fortunately, the open source world welcomes new people. My experience with working in open source was difficult but so satisfying. I ran into a few bumps before I could actually start working. I talk about those bumps in my previous blog posts. I realized that I had no idea where to start. I had never worked with a project this big and I was intimidated. I did not know where to start. I was having a very hard time, my head was hurting, I was feeling dumb, and I was beginning to give up. But then help came to help me. One of the guys over at Mozilla was a big help. He took his time to email me personally to check up on me. I was shocked that he did that. I replied and we started chatting on IRC. He wanted to help me and he was very knowledgable. He suggested another bug for me to work on to get more familiar with t

My Journey of Fixing Bugs...Again

Last week, I left comments asking to be assigned to bugs in Thimble. I was excited to get started but I was informed that the bugs were already taken. And the worst part is that the person who was assigned is a fellow class member. I didn't know if I should be disappointed or happy for him. Anyways, as soon as I found out that none of my bugs were going to be assigned to me, I started commenting on other projects like Balrog, and I managed to land three bugs! Two in Balrog and one in network-pulse-api. I want to work on Balrog first. At first I was having a lot of trouble trying to build the Balrog project. I was running into errors and I kept figuring out how to fix them and I just couldn't get passed one. I was searching for days, i was just staring and not getting anywhere at one point. Finally, I decided to ask my teacher for help and he simply said, talk on IRC. I was a little skeptical but I did what he said and I was greeted and helped within minutes. The guy helpi

My Journey of Fixing Bugs

Fixing bugs in the open source world is completely new to me. It's something I've never done before and it is something that I am really looking forward to. Being able to say that I've contributed to so and so sounds very fulfilling. I am ready to start working on bugs. To start off, I picked three bugs and I left a comment asking to be assigned if no one else is assigned. So now I have to play the waiting game. I will be doing research on the bugs so I can be prepared for when/if I do get it assigned. I chose two bugs from Thimble and one bug from Firefox(Android OS). The android one seems simple, and can be found  here . I'm not really interested in this one but I'm using it as a backup to my backup. It seems to be just cleaning up and renaming. Which I think I can manage. The runner up to that bug is a bug from Thimble which can be found  here . This bug is a feature request that I think I am capable of fulfilling. It is to add line numbers to the console o