Author Topic: Compiling in the Cloud  (Read 11603 times)

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1744
Compiling in the Cloud
« on: April 12, 2015, 05:19:09 PM »
This is not a repeat topic, as dmilligan et al are trying to help me simply get the 'compile in the cloud' running: http://www.magiclantern.fm/forum/index.php?topic=14725.msg144847;topicseen#msg144847

I'm on Windows 8 and using Firefox browser.

I simply can not get it to run and all I'm doing is following the guidance on the first post.

Could one of the ML non-developers who are successfully using the 'compile in the cloud' approach share with me their step by step approach, so I cam eliminate user problems by me!

Many thanks

Garry

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 6792
Re: Compiling in the Cloud
« Reply #1 on: April 12, 2015, 06:44:58 PM »
Got it working. I had the same errors you got. After adding python3 and following dmilligan's instructions set (to the letter!):
cd workspace
cd magic-lantern
make clean && make all_modules && cd platform/650D.104 && make zip

Result (excerpt):
adding: ML/modules/ (stored 0%)
  adding: ML/modules/650D_104.sym (deflated 65%)
  adding: ML/modules/arkanoid.mo (deflated 51%)
  adding: ML/modules/autoexpo.mo (deflated 58%)
  adding: ML/modules/deflick.mo (deflated 53%)
  adding: ML/modules/ettr.mo (deflated 56%)
  adding: ML/modules/file_man.mo (deflated 52%)
  adding: ML/modules/mlv_play.mo (deflated 62%)
  adding: ML/modules/mlv_rec.mo (deflated 53%)
  adding: ML/modules/mlv_snd.mo (deflated 56%)
  adding: ML/modules/pic_view.mo (deflated 48%)
  adding: ML/modules/silent.mo (deflated 53%)

Looks good, I think.
Believe me: I'm noob on Linux and have no clue about Linux-based development.
Photogs and videographers: Assist in proof reading upcoming in-camera help!. Your input is wanted and needed!

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1744
Re: Compiling in the Cloud
« Reply #2 on: April 12, 2015, 07:08:44 PM »
Walter

Great I'll try this as soon as I get home.

Cheers

Garry

Ps did you have to type each line, one at a time in the terminal, or do you know a way of pasting all the command at once?

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 6792
Re: Compiling in the Cloud
« Reply #3 on: April 12, 2015, 07:19:13 PM »
I know how to use a keyboard without looking at it. So I did.
Photogs and videographers: Assist in proof reading upcoming in-camera help!. Your input is wanted and needed!

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1744
Re: Compiling in the Cloud
« Reply #4 on: April 12, 2015, 08:33:50 PM »
Walter

Sadly no luck :-(

I copied in dmilligan's instructions

I then typed yours:

Code: [Select]
cd workspace
cd magic-lantern

and got this error:

Code: [Select]
-bash: cd: magic-lantern: No such file or directory
I'm back at square 1!

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 6792
Re: Compiling in the Cloud
« Reply #5 on: April 12, 2015, 08:40:12 PM »
Code: [Select]
cd
cd workspace
dir

If nothing shows up:
Code: [Select]
wget -q -O - http://pastebin.com/raw.php?i=jfVXzw1a | sed "s/\r//g" | bash
Photogs and videographers: Assist in proof reading upcoming in-camera help!. Your input is wanted and needed!

surami

  • Member
  • ***
  • Posts: 103
Re: Compiling in the Cloud
« Reply #6 on: April 12, 2015, 09:01:05 PM »
@garry23:
Delete your old Codio project and make a new one, after that:

1. Tools -> Install software -> Install the ZIP
2. Tools -> Terminal (copy the following code):
Code: [Select]
cd
curl -OL https://launchpad.net/gcc-arm-embedded/4.8/4.8-2013-q4-major/+download/gcc-arm-none-eabi-4_8-2013q4-20131204-linux.tar.bz2
bzip2 -d gcc-arm-none-eabi-4_8-2013q4-20131204-linux.tar.bz2
tar -x -f gcc-arm-none-eabi-4_8-2013q4-20131204-linux.tar
curl -OL http://prdownloads.sourceforge.net/docutils/docutils-0.12.tar.gz
gzip -d docutils-0.12.tar.gz
tar -x -f docutils-0.12.tar
cd docutils-0.12
python setup.py install --prefix=~/.local
cd
export PATH="$HOME/.local/bin:$PATH"
echo "export PATH=\"\$HOME/.local/bin:\$PATH\"" >> .bash_profile
cp .local/bin/rst2html.py .local/bin/rst2html
cd workspace
hg clone -r unified https://bitbucket.org/hudson/magic-lantern
cd magic-lantern/platform/5D3.113/
make zip
3. Hit enter at the end.

If you want make some modifications in your files before you compile, then leave the last 2 lines out. After the modification you have to be at the "xy@z:~workspace $" and you have to run the last 2 line.

You will not have the following modules: raw_rec, dual_iso and dot_tune, because of the gcc 32bit issue.

4. Project -> Export as ZIP.
550D + nightly ML

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1744
Re: Compiling in the Cloud
« Reply #7 on: April 12, 2015, 09:03:45 PM »
Walter (dmilligan & Audionut)

I can confirm the following works!!!!! Note Walter I had to change your last post:

Code: [Select]
cd
curl -OL http://prdownloads.sourceforge.net/docutils/docutils-0.12.tar.gz
gzip -d docutils-0.12.tar.gz
tar -x -f docutils-0.12.tar
cd docutils-0.12
python setup.py install --prefix=~/.local
cd
export PATH="$HOME/.local/bin:$PATH"
echo "export PATH=\"\$HOME/.local/bin:\$PATH\"" >> .bash_profile
cp .local/bin/rst2html.py .local/bin/rst2html

cd
cd workspace
dir

wget -q -O - http://pastebin.com/raw.php?i=jfVXzw1a | sed "s/\r//g" | bash

cd workspace
cd magic-lantern
make clean && make all_modules && cd platform/5D3.113 && make zip

I still get loads of module errors and of course the dual-iso doesn't get built, ie it's not in the downloaded .zip in the 5D3.113 platform folder.

But at least I have a complied download, which I checked against the latest ML nightly.

Is there any chance that someone who knows what they are doing can tweak the pastbin to incorporate the above, ie short of the last command line which a user needs to enter themselves.

Finally, may I thank everyone who has got this ML user to a really good point, ie able to add personal tweaks to ML: which is my next step!!!

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1744
Re: Compiling in the Cloud
« Reply #8 on: April 12, 2015, 09:05:06 PM »
@surami

Our posts crossed.

Thanks for your reply :-)

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1744
Re: Compiling in the Cloud
« Reply #9 on: April 12, 2015, 09:08:53 PM »
Postscript

Forgot to ask, can one 'simply' copy the missing modules from the ML nightly, or are there checksum issues.?

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 6792
Re: Compiling in the Cloud
« Reply #10 on: April 12, 2015, 09:09:20 PM »
Garry23: Hope this selection will not make it into pastebin! ;-) There is junk in it: Last 4 lines.
Photogs and videographers: Assist in proof reading upcoming in-camera help!. Your input is wanted and needed!

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1744
Re: Compiling in the Cloud
« Reply #11 on: April 12, 2015, 09:16:26 PM »
OK, I'll rephrase :-)

I hope someone with pastebin access can tweak what is there to make it work for simpletons like me :-)

Cheers

Garry

Licaon_Kter

  • Hero Member
  • *****
  • Posts: 519
  • M
Re: Compiling in the Cloud
« Reply #12 on: April 12, 2015, 09:23:10 PM »

surami

  • Member
  • ***
  • Posts: 103
Re: Compiling in the Cloud
« Reply #13 on: April 12, 2015, 09:28:01 PM »
Get your own pastebin URL.

1. Go here.
2. Paste your code to the New Paste.
3. Submit
4. Captcha
5. Copy the last 8 charachter from your browser address line and paste it:
http://pastebin.com/raw.php?i=HERE_COMES_THE_LAST_8_CHARACHTER
550D + nightly ML

surami

  • Member
  • ***
  • Posts: 103
Re: Compiling in the Cloud
« Reply #14 on: April 12, 2015, 09:31:14 PM »
@Licaon_Kter: As I know, dmilligan has a pull request for that gcc 32 bit issue.
550D + nightly ML

Licaon_Kter

  • Hero Member
  • *****
  • Posts: 519
  • M
Re: Compiling in the Cloud
« Reply #15 on: April 12, 2015, 10:38:16 PM »
Well yeah, but in the mean time.

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1744
Re: Compiling in the Cloud
« Reply #16 on: April 12, 2015, 11:13:00 PM »
BTW

Pleased to report I successfully tweaked the DOF LV equation as a proof of principle.

Once the Dual-ISO module problem is fixed, I'll be up and running :-)

Once again thanks for all your support.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5709
Re: Compiling in the Cloud
« Reply #17 on: April 22, 2015, 11:05:22 AM »
This is a cool way of getting into the sources. Thanks David and g3gg0 and others. Just getting to know things I managed to create a build (I think). Finished it all with
Code: [Select]
make clean && make all_modules && cd platform/5D3.113 && make zip and it created a specific build for 5d mark 3.

So, to my question. I,d like to test a specific iso-research branch of adtg_gui module for 5d mark 3.
https://bitbucket.org/hudson/magic-lantern/src/14776f860522cb7833bc1ed0f75ae2fafe945eea/modules/adtg_gui/adtg_gui.c?at=iso-research

I can see the module adtg_gui in modules folder and I can change text in codio and such but how do I turn it into a workable .mo file to be used with 5D mark III version 1.3.3?

Firstly. Do I copy paste the whole iso-branch script over to the older adtg_gui.c and go from there or do I enter only changes? I am very unfamiliar with this but I really like to learn more.

Thanks
/D

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5709
Re: Compiling in the Cloud
« Reply #18 on: April 22, 2015, 01:05:00 PM »
I found this
Code: [Select]
make -C modules/lua and replaced lua with adtg_gui which created a .mo file.

Still, I have no idea how to compile it after doing changes and coypyig the new changes from iso-branch link above.
I get this after copy pasting and trying to compile to .mo.

Code: [Select]
compilation terminated.                                                                                                                           
make: *** [adtg_gui.o] Error 1                                                                                                                   
make: Leaving directory `/home/codio/workspace/magic-lantern/modules/adtg_gui'                                                                   
codio@analyze-crystal:~/workspace/magic-lantern$ make -C modules/adtg_gui                                                                         
make: Entering directory `/home/codio/workspace/magic-lantern/modules/adtg_gui'                                                                   
[ CC       ]   adtg_gui.o                                                                                                                         
adtg_gui.c:11:19: fatal error: patch.h: No such file or directory                                                                                 
 #include <patch.h> 

Licaon_Kter

  • Hero Member
  • *****
  • Posts: 519
  • M
Re: Compiling in the Cloud
« Reply #19 on: April 22, 2015, 01:47:54 PM »
(not on Codio, but on real Linux system or in VirtualBox)
I just enter the module/<whatever> folder and issue: make but I did that after building whole ML first for my camera, not sure if it matters.


But in the mean time maybe it's a good idea to clone the iso-research repo and build it there and not just pick up what you want.


a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12258
  • Emergencies only
Re: Compiling in the Cloud
« Reply #20 on: April 22, 2015, 01:58:56 PM »
Code: [Select]
adtg_gui.c:11:19: fatal error: patch.h: No such file or directory                                                                                 

At first I thought I forgot to commit the file, so I tried to clone the repository from the scratch to check it, but it compiled fine.

I usually run "make" from the directory where the thing I'm trying to compile is (e.g. platform/5D3.113, or modules/adtg_gui or whatever).

Code: [Select]
hg clone https://bitbucket.org/hudson/magic-lantern/
cd magic-lantern/
hg update iso-research -C
cd modules/adtg_gui/
make

To run adtg_gui on 1.3.3, check chris_overseas' repo for stubs.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5709
Re: Compiling in the Cloud
« Reply #21 on: April 22, 2015, 02:02:45 PM »
thanks, will investigate.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5709
Re: Compiling in the Cloud
« Reply #22 on: April 22, 2015, 02:41:50 PM »
Sorry, referring to 1.1.3 not 1.3.3

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5709
Re: Compiling in the Cloud
« Reply #23 on: April 22, 2015, 03:26:26 PM »
Some progress.

pulled down the changes from A1ex here
Code: [Select]
hg pull && hg update iso-research and they were applied to the adtg_gui and then ran
Code: [Select]
make and created the .mo module. Next step to try it out on cam. Probably try it on a 500D first before on 5d mark 3 ;).

This was the end of code after make. One error, don,t know if it,s important?

Code: [Select]
Updated HGVERSION                                                                                                                                 
[ README   ]   module_strings.h                                                                                                                   
[ CC       ]   adtg_gui.o                                                                                                                         
[ MODULE   ]   adtg_gui.mo                                                                                                                       
[ STRIP    ]   adtg_gui.mo                                                                                                                       
[ EXPORTS  ]   adtg_gui.sym                                                                                                                       
[ DEPENDS  ]   adtg_gui.dep                                                                                                                       
Not checked (compile ML for these cameras first):                                                                                                 
    1100D, 500D, 50D, 550D, 5D2, 5D3, 600D, 60D, 650D, 6D, 700D, 7D, EOSM                                                                         
make: *** [adtg_gui.dep] Error 1                                                                                                                 
codio@analyze-crystal:~/workspace/magic-lantern/modules/adtg_gui$

Licaon_Kter

  • Hero Member
  • *****
  • Posts: 519
  • M
Re: Compiling in the Cloud
« Reply #24 on: April 22, 2015, 04:17:19 PM »
I guess it's some sort of warning as some modules are not compatible with some cameras, compiling all ML for that camera first will let it sort out if it's usable or not (then it will not build the module)