Magic Lantern Forum

Using Magic Lantern => General Help Q&A => Topic started by: garry23 on April 12, 2015, 05:19:09 PM

Title: Compiling in the Cloud
Post by: garry23 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 (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
Title: Re: Compiling in the Cloud
Post by: Walter Schulz 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.
Title: Re: Compiling in the Cloud
Post by: garry23 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?
Title: Re: Compiling in the Cloud
Post by: Walter Schulz on April 12, 2015, 07:19:13 PM
I know how to use a keyboard without looking at it. So I did.
Title: Re: Compiling in the Cloud
Post by: garry23 on April 12, 2015, 08:33:50 PM
Walter

Sadly no luck :-(

I copied in dmilligan's instructions

I then typed yours:

cd workspace
cd magic-lantern


and got this error:

-bash: cd: magic-lantern: No such file or directory

I'm back at square 1!
Title: Re: Compiling in the Cloud
Post by: Walter Schulz on April 12, 2015, 08:40:12 PM
cd
cd workspace
dir


If nothing shows up:
wget -q -O - http://pastebin.com/raw.php?i=jfVXzw1a | sed "s/\r//g" | bash
Title: Re: Compiling in the Cloud
Post by: surami 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):
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.
Title: Re: Compiling in the Cloud
Post by: garry23 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:

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!!!
Title: Re: Compiling in the Cloud
Post by: garry23 on April 12, 2015, 09:05:06 PM
@surami

Our posts crossed.

Thanks for your reply :-)
Title: Re: Compiling in the Cloud
Post by: garry23 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.?
Title: Re: Compiling in the Cloud
Post by: Walter Schulz 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.
Title: Re: Compiling in the Cloud
Post by: garry23 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
Title: Re: Compiling in the Cloud
Post by: Licaon_Kter on April 12, 2015, 09:23:10 PM
Can you fix dual_iso? http://www.magiclantern.fm/forum/index.php?topic=14725.msg144803#msg144803
Title: Re: Compiling in the Cloud
Post by: surami on April 12, 2015, 09:28:01 PM
Get your own pastebin URL.

1. Go here (http://pastebin.com/).
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
Title: Re: Compiling in the Cloud
Post by: surami on April 12, 2015, 09:31:14 PM
@Licaon_Kter: As I know, dmilligan has a pull request for that gcc 32 bit issue.
Title: Re: Compiling in the Cloud
Post by: Licaon_Kter on April 12, 2015, 10:38:16 PM
Well yeah, but in the mean time.
Title: Re: Compiling in the Cloud
Post by: garry23 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.
Title: Re: Compiling in the Cloud
Post by: Danne 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 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
Title: Re: Compiling in the Cloud
Post by: Danne on April 22, 2015, 01:05:00 PM
I found this 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.

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> 
Title: Re: Compiling in the Cloud
Post by: Licaon_Kter 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.

Title: Re: Compiling in the Cloud
Post by: a1ex on April 22, 2015, 01:58:56 PM
Quote from: Danne on April 22, 2015, 01:05:00 PM

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).


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.
Title: Re: Compiling in the Cloud
Post by: Danne on April 22, 2015, 02:02:45 PM
thanks, will investigate.
Title: Re: Compiling in the Cloud
Post by: Danne on April 22, 2015, 02:41:50 PM
Sorry, referring to 1.1.3 not 1.3.3
Title: Re: Compiling in the Cloud
Post by: Danne on April 22, 2015, 03:26:26 PM
Some progress.

pulled down the changes from A1ex here hg pull && hg update iso-research and they were applied to the adtg_gui and then ran 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?

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$
Title: Re: Compiling in the Cloud
Post by: Licaon_Kter 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)
Title: Re: Compiling in the Cloud
Post by: DeafEyeJedi on April 22, 2015, 06:16:24 PM
Looking good with its progress @Danne! [emoji108]

Now I'm tempted to get back on this boat and try to learn & compile in the cloud.
Title: Re: Compiling in the Cloud
Post by: garry23 on April 22, 2015, 06:24:49 PM
@DeafEyeJedi

Having successfully tweaked the DoF code to account for diffraction and demonstrated it worked via 'compiling in the cloud', I'm going to wait a bit until one of the ML gurus tells me the make zip addresses all modules, ie Dual-ISO in particular.

Title: Re: Compiling in the Cloud
Post by: Licaon_Kter on April 22, 2015, 06:57:46 PM
I've pointed it before, regarding dual_iso, @garry23, can't you do this (http://www.magiclantern.fm/forum/index.php?topic=14725.msg144803#msg144803) since you don't need cr2hdr built anyway?
Title: Re: Compiling in the Cloud
Post by: garry23 on April 22, 2015, 07:21:25 PM
@Licaon_Kter

Maybe I'm being thick, however, with the 'compile in the cloud' approach, I didn't think you could build a FULL version, ie when I try Dual-ISO fails at the moment.

I can compile a partial build, but it will be missing the Dual.

Or am I being thick?
Title: Re: Compiling in the Cloud
Post by: Licaon_Kter on April 22, 2015, 08:06:23 PM
Does in build if you comment out what I've pointed?
The FULL ML does not have or need a Linux binary for cr2hdr ( which that line builds and what make zip DOES NOT package anyway ).


Or maybe I don't understand what you mean by FULL? Autoexec + modules + ( others like fonts/cropmarks ) ? Or?
Title: Re: Compiling in the Cloud
Post by: garry23 on April 22, 2015, 08:10:56 PM
OK let me ask another way.

Have you built a full ML package for your camera, using the compile in the cloud, AND with the dual-ISO module in place and useable?

If you have, how?
Title: Re: Compiling in the Cloud
Post by: Danne on April 22, 2015, 08:39:08 PM
I did make on the dual_iso folder and it created the dual_iso.mo

cd magic-lantern/modules/dual_iso

make

Should this .mo work? Can,t try right now, no camera available.

https://www.youtube.com/watch?v=ixOzE1VhKnw

Title: Re: Compiling in the Cloud
Post by: garry23 on April 22, 2015, 08:44:45 PM
So is it 'only' necessary to grab the compiled module and add it to the module folder, or is more needed than this.
Title: Re: Compiling in the Cloud
Post by: Danne on April 22, 2015, 08:47:43 PM
I don,t know. Only started today. I plan on trying the adtg_gui.mo tomorrow.

Did you try Licaon_Kter,s suggestion?
Title: Re: Compiling in the Cloud
Post by: Danne on April 22, 2015, 09:03:52 PM
Just exported make clean && make && make all_modules && cd platform/EOSM.202 && make zip

After following Licaon_Kter suggestion. When finding the magic lantern nightly all files seems to be there in modules folder. Including dual_iso.mo.
Didn,t try without removing the lines as suggested but might work without that too.

DOn,t take my advice too seriously. I am very green in this area.


update*

Skipping make clean worked here.

make all_modules && cd platform/5D3.113 && make zip

Seemed to include the make done before exporting with zip.
Title: Re: Compiling in the Cloud
Post by: Licaon_Kter on April 22, 2015, 09:43:59 PM

Quote from: Danne on April 22, 2015, 09:03:52 PM
Skipping make clean worked here.
make clean is just a way to ensure a top down build verification, say if you modify something and it brakes something else somewhere that way you might track it instead of it just being unstable or something.



Quote from: garry23 on April 22, 2015, 08:10:56 PM
Have you built a full ML package for your camera, using the compile in the cloud, AND with the dual-ISO module in place and useable?
No, I use my main Linux box or with the VirtualBox image found around here, they both work since they have what's needed (multi-arch).


On the other hand I really don't see what your issue is actually, what is keeping you to edit that file and recompile ML?
The module will be in the ZIP file if it's built, the error (the one about cr2hdr) does not matter for you anyway since you don't process your dual-iso files in Linux but it matters since it blocks the module build. The idea (I guess) is that if you use the dual-iso module you need cr2hdr but in the mean time you use Windows or Mac so it's useless. This needs some patch to be separated somehow.














Or forget about it
Title: Re: Compiling in the Cloud
Post by: garry23 on April 22, 2015, 09:57:36 PM
In my ignorance I thought that if I just replaced the missing dual modual, some of the other files may not be built correctly.

So my question is, if I'm changing the lens.c and everything else is the same. Can I simply copy across the missing dual module, say from the nightlies?
Title: Re: Compiling in the Cloud
Post by: Licaon_Kter on April 22, 2015, 10:09:05 PM
The latest nightly is now at commit e08c6c0
If you pull/update the source now, ( re-add your modifications? ), compile your version then it's safe to use it from the nightly.
If you use a different version of the source code then you might have issues.

Title: Compiling in the Cloud
Post by: DeafEyeJedi on April 22, 2015, 10:13:59 PM
@Danne -- if you want I can test this dual iso module that you created real quick for you on the 5D3 if needed to?
Title: Re: Compiling in the Cloud
Post by: Danne on April 22, 2015, 10:47:41 PM
It, s ok. I, m gonna try the adtg_gui. Gonna read and try some things more thoroughly first. As for know I dont think I get the adtg module when running make clean. Gonna try a 500D at work first.
Title: Re: Compiling in the Cloud
Post by: garry23 on April 23, 2015, 12:42:21 AM
All

The first thing I did when I got home was to follow your advice regarding the make files and success!

I now have a full version of the nightly with my DoF tweak in it.

The Dual ISO modules is there and works.

Many thanks for your help and perseverance with me :-)

BTW also created an IR version for my IR converted 50D.