Wednesday, September 20, 2017

Is it easy to compile source code?

Starting from the previous week I have worked on compiling Mozilla Firefox (v 55.0.3) source code.
The first thing I did was getting a hard drive. After my professor has scared me with 40 Gb of source code I had to order it. 

Later on I figured that 40 Gb is a whole history of all the versions, bug fixes and changed front-end.
The version I got from this website is less then 2 Gb, so don't get scared! 

I have been following the instruction on Mozilla Developer website. Fortunately, I have had Visual Studio 2017 on my laptop with almost all the required C++ packages. Next step was downloading and setting up Rust.

And then the fun begins with opening a terminal from start-shell.bat from mozilla-build. The few commands you type: "mach bootstrap" and "mach build".

It takes a bit of time, but as soon as the build is ready, you just hit "mach run" and voila... you got a home-build version of Firefox(that's what they say in the documentation).

In reality the fun part is only about to start... You will have to deal with quite a few errors.

One of the issues I have had was the Rust error: "error[E0463]: can't find crate for 'std', note: the 'i686-pc-windows-msvc' target may not be installed".

The solution for that was a command: "rustup target add i686-pc-mingw32".
Quite a few of my classmates got some issues with Rust version, environment variables and executable files. So keep in mind that it won't necessary be an easy journey, but definitely you will get a lot of valuable experience.

And at the very end it's all worth it, since you got an excellent feeling of accomplishment and confidence as a programmer!

No comments:

Post a Comment

It's only a beginning

What have I learned for the past 8 months of Open Source Programming? I was convinced from the very beginning that this course would be i...