mozilla :: #introduction

14 May 2017
09:15dhughehi I cannot use bootstrap to install on point linux (debian). I get an error saying " support for this Linux distro not yet available."
09:15dhugheCan anyone help please?
09:18araihave you cloned mozilla-central?
09:18dhughehi arai
09:18dhugheyes I did
09:18araiso, you're now running "./mach bootstrap", right?
09:19dhugheNo I am trying the long command ...
09:19araimozilla-central contains "mach" file in the root
09:20araiyou can run "./mach bootstrap" there to run the same thing as
09:20dhughewget -O && python
09:20arai(of course it will fail
09:20araianyway, first, can you check if "./mach bootstrap" shows the same error?
09:20dhugheI tried to edit the file...
09:20dhugheyes just a minute ....
09:22dhugheIs there a way to check what is returned with platform.linux_distribution() ??
09:22araipython -c 'import platform; print(platform.linux_distribution())[0]'
09:23dhughehow do I run that Python command?
09:23araiit's just a command
09:23araitype it in terminal
09:24dhugheahh ok
09:25dhughetype the whole thing : i python -c 'import platform; print(platform.linux_distribution())[0]'
09:25dhugheinto the terminal?
09:25araiexcept the leading "i"
09:25milindlthe [0] needs to be inside the parenthesis, right? But in any it'll print before throwing error
09:26milindl*in any case
09:26araipython -c 'import platform; print(platform.linux_distribution()[0])'
09:31dhugheIt says PointLinux
09:31dhugheGreat... progress!
09:31dhugheSorry what dir do I run ./mach bootstrap from?
09:34dhugheError running mach: ['bootstrap'] The error occurred in code that was called by the mach command. This is either a bug in the called code itself or in the way that mach is calling it. You should consider filing a bug for this issue. If filing a bug, please include the full output of mach, including this error message. The details of the failure are a
09:34dhugheNotImplementedError: Bootstrap support for this Linux distro not yet available. File "/home/daniel/mozilla-central/python/mozboot/mozboot/", line 25, in bootstrap bootstrapper = Bootstrapper() File "/home/daniel/mozilla-central/python/mozboot/mozboot/", line 199, in __init__ raise NotImplementedError('Bootstrap support
09:34araistop stop
09:34dhughejust got that error
09:34araiwhen posting long line, please use
09:35arai(otherwise you might be kicked automatically
09:35araianyway, you saw the same error :)
09:35araiit's time to fix the bootstrap system
09:36araiopen python/mozboot/mozboot/ in mozilla-central and add your distro name in DEBIAN_DISTROS list
09:37dhugheYes I tried that but will give it a go again ...
09:41dhughejust tried running the long bootstrap thinggy and got the same error ...
09:42arailong bootstrap?
09:42araiyou mean ?
09:42araiwith wget
09:42araiyou don't need to run it if you have mozilla-central locally
09:43araijust run "./mach bootstrap"
09:43araiit uses local copy
09:43dhugheI mean wget -O && python
09:43dhugheok just a min...
09:44arai(also, if you've run it in python/mozboot/mozboot/, it will overwrite
09:45dhugheooooooooh it looks like its working...!!
09:47dhugheerrr do I chose Fireforx desktop Artifact mode? or just Desktop?
09:47araiit depends on what area you're going to touch
09:47araiwhat language do you prefer?
09:48araiif you're going to touch C++ part of the system, you'll need Desktop
09:48dhugheI dont mind
09:48dhugheI thought desktop had to use c++?
09:48araiif you're going to touch JS/HTML/CSS part of the system, Artifact mode will work
09:48araithere are many components inside Firefox, and some parts are purely JS/HTML/CSS
09:48araiand that part doesn't need compiling C++
09:48dhugheI like all the languages so I dont mind
09:49araithen, just Desktop
09:49arai(actually, you can switch to either one later
09:51dhugheI am crossing my fingers it will work ...
09:51dhugheI already cloned the source so it shouldnt do all that again?!
09:52araiyes, you don't need to run hg clone again
09:52araijust running "./mach build" will build Firefox
09:53dhugheso thats the next step after this has finished?
09:53araiyes, basically
09:53dhugheahh good
09:53araiif you're going to build with custom configuration, you need to prepare mozconfig file
09:53araibut in most case you can skip the step
09:54araiand Firefox will be built with default configuration
10:04dhughethanks arai
10:04dhughesee you soon!
10:05araiit the build process works, it would be nice to file a bug against the bootstrap system and post the patch there
10:05araito support your distro
10:05dhugheyes great idea
10:06dhughedo we raise the bug on bugzilla?
10:07araijust like bug 906177
10:07firebot FIXED, Make bootstrap compatible with Elementary OS
10:07araithat added elementary OS support
10:07dhugheahhh ok
10:08dhugheoh dear i just got a build error
10:08dhughehere we go...
10:08dhugherust error...
10:08araiI think you need to modify your .profile or similar thing, to reflect the rust environment's configuration
10:09araibasically, add `source /Users/arai/.cargo/env` to it
10:09araior, simply run it in the terminal
10:09arai`source ~/.cargo/env`
10:09dhughethe bootstrap script did warn about rust ...
10:10araiI thought it says similar thing
10:11dhughehow do I run it in the terminal?
10:11araijust type `source .cargo/env` (without quotes) and hit enter
10:11araiif it doesn't work, you might need to install rust and cargo manually
10:12araiI don't remember how that's handled on linux
10:12dhugheI think I just need to add rustc into my path
10:20dhugheoh Im stuck again
10:20araiwhat error?
10:20dhughethe rust thing
10:21araido you have ~/.cargo ?
10:21dhughethe bootstrap script should have installed rust and cargo
10:22dhughesorry what dir do i run source .cargo/env from?
10:23araias long as you use "source ~/.cargo/env"
10:23dhugheah ok
10:23dhughejust a min
10:29dhugheI had to type source ~/.cargo/env
10:29dhughethen the shell recognizes that cargo and rust are installed
10:33dhughedont know how to add rust to my path :(
10:33araiwhat does "source ..." say?
10:34dhugheI just typed source ~/.cargo/env in and then it worked
10:34araiwhat does "echo $PATH" say?
10:34dhugherust --version
10:34dhughethat works after I typed it in
10:34dhugheand before it doesnt
10:34araiif it works, your PATH contains the right path
10:35dhugheI cant do it now as Im building :)
10:35araiat least in the current terminal
10:35dhugheyes only after I type source ~/.cargo/env
10:35araiif you put it into .profile or similar thing, it will be reflected to all terminal
10:35dhugheI think I can open another terminal....
16:59dhughehow do I add rust to my PATH in Linux please?
17:00dhugheI cant believe there is no infro on this anywhere!!
17:01araido you have ~/.cargo/env ?
17:02ckousikdhughe: you can find rustc binary under ~/.cargo/bin
17:02ckousikyou can add that to your path as $HOME/.cargo/bin
17:02dhugheIm searching now
17:03dhughesorry where is ~/.cargo/bin?
17:04arai"~" means your home folder
17:04dhughedoes ~ mean home?
17:06dhugheI dont see any cargo folder there
17:06dhugheit is defo installed
17:06ckousikls -al
17:06ckousikls -al | grep .cargo
17:07dhughedrwxr-xr-x 3 daniel daniel 4096 May 14 10:57 .cargo
17:07ckousikcat .cargo/env
17:08dhugheexport PATH="$HOME/.cargo/bin:$PATH"
17:09dhughe?? that
17:10ckousikdid it work
17:11ckousikyou should be able to run "rustc"
17:11dhugheI think so ..
17:12dhughedaniel@latitude:~$ rust --version bash: rust: command not found
17:12dhughecargo is ok but rust is not found
17:12ckousikrun rustc
17:12dhugheyes but rust --version should work too
17:12araithere is not "rust" command
17:13dhugheno just did and command not found
17:14ckousikarai: rustc and cargo binaries are in the same folder so shouldn't he be able to call both from the command line?
17:15ckousikdhughe: what does the shell say?
17:15arai"rustc --version"
17:15dhughebash: rust: command not found
17:16dhughedaniel@latitude:~$ cargo --version cargo 0.18.0 (fe7b0cdcf 2017-04-24)
17:16arairust compiler is "rustc", not "rust"
17:16dhughestrange innit
17:16dhugheahh yes
17:17dhughethank you!!
17:19dhughebut when I restart the shell its back to command not found
17:20araiso you should put the command to your .profile or .bashrc or something
17:20ckousikrun echo "export PATH="$HOME/.cargo/bin:$PATH" >> .bashrc
17:20dhugheyes I cant find those files
17:21ckousikfiles starting with '.' are hidden
17:21ckousikls -a
17:23dhugherun echo "export PATH="$HOME/.cargo/bin:$PATH" >> .bashrc ---- didnt do anything
17:24ckousikit added that line to .bashrc
17:24dhugheOk but I restarted the shell and command not found
17:24ckousikcould you run tail -f .bashrc
17:25dhughels-a I can now see the .profile file
17:25ckousikactually, remove the -f flag
17:25araiiirc, .bashrc is not used by default on some system
17:26araido you have ~/.bash_profile ?
17:26araifirst of all, which shell are you using?
17:26dhughebut I have a .profile
17:26araithen, add to it
17:29dhugheI have .bashrc file too
17:30dhughethis is already in the .profile file "export PATH="$HOME/.cargo/bin:$PATH""
17:32ckousikcat .bashrc
17:32ckousikcat .profile
17:34dhugheshould there be a line added to the bashrc file?
17:35dhughewhere and what should I add?
17:35ckousik"export PATH="$HOME/.cargo/bin:$PATH" should be in the .bashrc
17:36dhugheok but dont know where to add it?
17:36ckousikadd it at the end
17:40dhughevery cool!
17:40dhugheonly took 12 hours
17:41dhugheI have a general question for you..
17:43dhugheIf I am working on a bug.. how do I lets say keep a copy of the original code in the branch...
17:43dhugheI mean if I was to work on two different bugs .. at the same time
17:43dhughedo you get my drift?
17:44araimercurial can track multiple histories
17:45dhughesounds good
17:45dhugheI did work on a bug deleting some code...
17:45dhughebut when i did the .diff file It said there were 1000 of lines of code changed
17:46dhughealthough I only deleted around 10 lines
17:46dhugheVery strange
17:46dhugheI am not sure how it would track different histories but I hope it would do that
17:47araidepends on the content of 1000 lines tho, it sounds like your editor applied some coding style globally
17:47dhugheSomeone said it could be because I pasted it into notepad++
17:47dhughewhy would that add anything? I even had it on the c++ setting
17:48araiinstead of opening?
17:48dhugheNow I still have the .diff file
17:48ckousiksorry, I haven't used hg...
17:49ckousikprobably the only guy here
17:49araifwiw, here's a slide about branching
17:49arai(just googled it, and it looks good
17:49dhugheno I just copyed and pasted the code into notepad I think and then put it back into visual studio
17:49dhugheI am going to be using linux now though
17:49ckousikarai: why hg...why not git?
17:49araibecause mozilla-central is on hg
17:49dhughethey dont use github
17:49arai(of course there's several ways to use it via git
17:50araithere's read-only mirror on github
17:50dhughe:( one step at a time for me arai
17:50ckousikarai: at least it's not svn
17:50dhughequestion ...
17:51dhugheif I have the work I originally did in the diff file is there an easy way I can paste this into the files?
17:51araiif it's diff file, you can apply the diff by "patch" command
17:51dhugheThere are lots of '-'s at the begining of each line
17:52dhugheahhh that sound good
17:52dhughealthough Id have to remove that "hidden" formating somehow
17:53dhughehow would I use the diff by patch?
17:53araidepends on the content of the diff
17:53araican you paste it to pastebin?
17:54dhughewhat is that?
17:55dhughehold on .. Im just getting my diff file
17:59dhugheshall I just paste some in then?
18:01araipaste and "send"
18:01araiand post the URL here
18:01dhugheIts 6495 lines?
18:01araiwhy so large...?
18:01dhughebecause It thinks that everything is new basically
18:02dhugheI dont know why
18:02araiI think it's better just discarding the diff
18:02dhughelike I said I only changed a handful of lines
18:03dhugheyes ill have to start again..
18:03araithen, it means you modified other lines accidentally
18:03dhugheno its because of the hidden formating I think
18:03dhughevery starnge
18:03dhugheas the IDE didnt complain at all
18:03arai("accidentally" includes it
18:04dhughediff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp --- a/dom/plugins/base/nsNPAPIPlugin.cpp +++ b/dom/plugins/base/nsNPAPIPlugin.cpp @@ -1,2709 +1,2572 @@
18:05dhughenever mind
18:05dhugheIll have to do it again
18:05dhugheit thinks I deleted 12709 lines? haha
18:06dhugheI only changed about 10
18:11dhugheIm going to Emacs
18:12dhugheI hope its not going to take another 12 hours to set up?!
18:12ckousikemacs...probably not
23:35xouiHi all, having an issue building firefox with clang. From some googling, I think it's to do with cmake and include paths?
15 May 2017
No messages
Last message: 10 days and 7 hours ago