Author Topic: Magic Lantern development compiler.app (Mac OS)  (Read 12396 times)

kotik

  • Freshman
  • **
  • Posts: 83
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #25 on: May 19, 2018, 07:56:35 PM »
You're right. 80D isn't working yet. All modules failed to build.
Did compile in 80D-troubleshooting branch.
What is best way to test the Compile.app install?
 
I also got this warning:
*** WARNING: 64-bit GDB is known to have issues.

Are there ROM-dumps for the 80D and 6D Mark II?
My first Canon: FTb QL (Quick Loading), my first digital Canon: 20D 2.0.3
The current one: Canon EOS R

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #26 on: May 19, 2018, 08:07:01 PM »
I use crop_rec mlv lite with sound support however either of the cams you mention has ml running but are in very early stages.
Search on the forum for questions about rom dumps. Not sure where to find these but any help porting ml will be appreciated.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #27 on: May 19, 2018, 09:29:25 PM »
@kotik
Pushed a new version but don´t know if it will work better. Only thing changed is a routine for when the app itself could contain spaces, e.g Compiler 2.app which would make the comman script to break. It runs over here on sierra without sand box errors so who knows...

kotik

  • Freshman
  • **
  • Posts: 83
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #28 on: May 20, 2018, 10:06:52 AM »
Thnx. Worked even without Ctrl-click the first time.
Maybe because the folders 'magic-lantern' etc. where already present?

Where can I find crop_rec mlv lite with sound support?
It is almost impossible to search all those branches.
My first Canon: FTb QL (Quick Loading), my first digital Canon: 20D 2.0.3
The current one: Canon EOS R

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #29 on: May 20, 2018, 10:38:17 AM »
Or maybe you made the sandbox exception permanent for the main.command script already? Thanks for testing!

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #30 on: May 20, 2018, 08:48:51 PM »
@kotik
You can narrow down branches by selecting (s) and specify a keyword. Try printing crop_rec and enter to fetch all branches with that word inside. It should be there. Something like crop_rec_4k_mlv_lite_snd I think it's called.

kotik

  • Freshman
  • **
  • Posts: 83
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #31 on: May 20, 2018, 10:23:21 PM »
@Danne
The search example in the Compiler.app suggests 'croprec' not 'crop_rec'.
My first Canon: FTb QL (Quick Loading), my first digital Canon: 20D 2.0.3
The current one: Canon EOS R

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #32 on: May 20, 2018, 10:30:35 PM »
Yes, I know. Will change that when I can. Anyway. Just write crop and you'll be fine.

jacobwatson085

  • Just arrived
  • *
  • Posts: 1
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #33 on: May 31, 2018, 09:21:51 AM »
It is pretty interesting. On which OS you are working now?

DOP

  • New to the forum
  • *
  • Posts: 23
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #34 on: April 08, 2019, 06:52:58 AM »
When I compile the crop_rec_4k_mlv_snd_isogain_1x3_presets branch via the instructions in the first post and enable sd_uhs I get the following message on boot up

Code: [Select]
sd_uhs.mo is not supported for your camera
I know I've chosen the right camera under platform because the .zip its named crop_rec_4k_mlv_snd_isogain_1x3_presets_2019Apr07.6D116.zip

A previous crop_rec build with sd_uhs.so compiled by someone else was working but I'd love to use your latest build.
Canon 6d / 70d

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #35 on: April 08, 2019, 07:13:08 AM »
Well, you need to enable it for your specific cam:
Check for this place in sd_uhs code:
Code: [Select]
    if (is_camera("6D", "1.1.6"))
    {
        sd_setup_mode       = 0xFF325A20;
        sd_setup_mode_in    = 0xFF325AA8;
        sd_setup_mode_reg   = 1;            /* switch variable is in R1 (likely all D5 other than 5D3) */
        sd_set_function     = 0xFF78F308;
     /* sd_uhs_patch(); */    }
Change this line to:
Code: [Select]
      sd_uhs_patch();    }
And if you want to loose the complaint on screen add the 6D into the mix:
Code: [Select]
    if ((!is_camera("EOSM", "2.0.2")) && (!is_camera("100D", "1.0.1")) && (!is_camera("700D", "1.1.5") && (!is_camera("6D", "1.1.6")))
    {
    NotifyBox(2000, "sd_uhs.mo is not supported for your camera");
    }

Untested territory. I don´t own this cam myself.

DOP

  • New to the forum
  • *
  • Posts: 23
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #36 on: April 08, 2019, 07:19:10 AM »
Well, you need to enable it for your specific cam:
Check for this place in sd_uhs code:
Code: [Select]
    if (is_camera("6D", "1.1.6"))
    {
        sd_setup_mode       = 0xFF325A20;
        sd_setup_mode_in    = 0xFF325AA8;
        sd_setup_mode_reg   = 1;            /* switch variable is in R1 (likely all D5 other than 5D3) */
        sd_set_function     = 0xFF78F308;
     /* sd_uhs_patch(); */    }
Change this line to:
Code: [Select]
      sd_uhs_patch();    }
And if you want to loose the complaint on screen add the 6D into the mix:
Code: [Select]
    if ((!is_camera("EOSM", "2.0.2")) && (!is_camera("100D", "1.0.1")) && (!is_camera("700D", "1.1.5") && (!is_camera("6D", "1.1.6")))
    {
    NotifyBox(2000, "sd_uhs.mo is not supported for your camera");
    }

Untested territory. I don´t own this cam myself.

Just found it as you were replying. Enabled and working flawlessly so far! 80+ second recording at max 1824x1026 @ 30 fps 14-bit lossless. Will report back if there are problems.

Appreciate your efforts greatly!

Now if only we can get decent 60fps video without aliasing (at 16:9 without losing FoV)! lol
Canon 6d / 70d

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #37 on: April 08, 2019, 07:57:44 AM »
Good stuff.

TequilaKez

  • Freshman
  • **
  • Posts: 51
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #38 on: May 26, 2020, 08:35:12 AM »
This all installed fine and setup dependencies (AFAIK), but no matter what repo/branch combination I select, I just get this error on compile for all modules.

module.h:344:28: fatal error: module_strings.h: No such file or directory

Any ideas?

names_are_hard

  • Contributor
  • Member
  • *****
  • Posts: 181
  • 200D idiot
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #39 on: May 26, 2020, 06:33:59 PM »
This is caused by ML assuming that "python" resolves to python 2 (breaks the module string generation so the header file is missing).  You almost certainly have "python" resolve to python 3 (Catalina?  I don't have a Mac to test).

The quick hack way to fix is to make python point to python 2.  The slightly nicer way is to edit ML source so that it explicitly calls python2.  The best way would be to remove the dependencies on python2 entirely but I haven't done that yet.

I think the changes for option 2 are split over these three commits:
https://bitbucket.org/stephen-e/ml_200d/commits/?search=python

DO NOT apply those commits blindly to Danne's repo, that's from one of my repos and they're messy commits with changes for multiple things.  Copying blindly will break your compile.  I'm in the middle of tidying this up so should have a nice, single commit this week.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #40 on: May 26, 2020, 06:47:12 PM »
Thanks for responding. Lack of time here.
Porting ml to git should be next. I hope I find time for this soon. Looking at your port seems not that straight forward.

names_are_hard

  • Contributor
  • Member
  • *****
  • Posts: 181
  • 200D idiot
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #41 on: May 26, 2020, 06:57:02 PM »
Removing hg dependency is easy, I have a single commit for that:
https://github.com/reticulatedpines/magiclantern_simplified/commit/3163d41cee35fb54b4308e1f32318ff87de53645

This will mean you can't inspect autoexec.bin to tell which commit it's built from.  I have a TODO to make it stamp with hg and git if they're both available, and fallback to no stamp if not.

Likely applies cleanly to yours, feel free to cherry-pick it.  I am currently merging together unified, qemu and lua_fix branches as those seem to be the important branches.

names_are_hard

  • Contributor
  • Member
  • *****
  • Posts: 181
  • 200D idiot
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #42 on: May 26, 2020, 07:05:10 PM »
Oh, if you meant "taking ML mercurcial repo and putting it into Git source control", then that's here:
https://github.com/reticulatedpines/magiclantern

Has all branches.  It's a little old but probably no changes happened since then (haven't checked).  You can clone from there to your own Git repo.

TequilaKez

  • Freshman
  • **
  • Posts: 51
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #43 on: May 27, 2020, 02:03:19 AM »
This is caused by ML assuming that "python" resolves to python 2 (breaks the module string generation so the header file is missing).  You almost certainly have "python" resolve to python 3 (Catalina?  I don't have a Mac to test).

The quick hack way to fix is to make python point to python 2.  The slightly nicer way is to edit ML source so that it explicitly calls python2.  The best way would be to remove the dependencies on python2 entirely but I haven't done that yet.

I think the changes for option 2 are split over these three commits:
https://bitbucket.org/stephen-e/ml_200d/commits/?search=python

DO NOT apply those commits blindly to Danne's repo, that's from one of my repos and they're messy commits with changes for multiple things.  Copying blindly will break your compile.  I'm in the middle of tidying this up so should have a nice, single commit this week.

Thanks for the reply, and thanks you Danne for the Mac script!

I'm only on 10.13.6 on this machine, but I do have Python 2.7, 3.7 and 3.8 installed for other stuff.

Python --version gives me Python 2.7.16 though.

Is there a way to check what version of Python this is referencing?

names_are_hard

  • Contributor
  • Member
  • *****
  • Posts: 181
  • 200D idiot
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #44 on: May 27, 2020, 02:39:12 AM »
I'm pretty sure that error is python mixup, as it's exactly the same on mine and I know what causes it there.  It does look like your "python" is 2, which is what ML expects, but you're using Danne's stuff around ML to compile, right?  I have no idea what that does.

If you scroll further back in the errors, do you see something like this?

Code: [Select]
Building module adv_int...
[ README   ]   module_strings.h
$//"README.rst | grep -v -E "^:([^:])+:.+$" | rst2html | python ../html2text.py -b 700 | sed "s/

Traceback (most recent call last):
  File "../html2text.py", line 782, in <module>
    wrapwrite(html2text(data, baseurl))
  File "../html2text.py", line 715, in html2text
    return optwrap(html2text_file(html, None, baseurl))
  File "../html2text.py", line 150, in optwrap
    for line in wrap(str(para), BODY_WIDTH):
  File "../html2text.py", line 44, in <lambda>
    wrap = lambda text, width: word_wrap(text, width, extent_func)
  File "/home/user/code/magiclantern/magiclantern_simplified/modules/align_string_proportional.py", line 21, in word_wrap
    lookup = dict((c, extent_func(c)[0]) for c in set(text))
  File "/home/useer/code/magiclantern/magiclantern_simplified/modules/align_string_proportional.py", line 21, in <genexpr>
    lookup = dict((c, extent_func(c)[0]) for c in set(text))
  File "/home/user/code/magiclantern/magiclantern_simplified/modules/rbf_read.py", line 64, in extent_func
    w += font.wTable[ord(c) - font.charFirst]
AttributeError: 'Bunch' object has no attribute 'wTable'

names_are_hard

  • Contributor
  • Member
  • *****
  • Posts: 181
  • 200D idiot
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #45 on: May 27, 2020, 03:46:40 AM »
This commit may fix it for you, confirmed to work to make 50D build and run in Qemu for me, on a mixed python2 / python3 Linux system:

https://github.com/reticulatedpines/magiclantern_simplified/commit/0801e337c10b243d6a5c19c0b63efa23142823de

If you don't want to mess around with that, you'll probably have to wait for Danne to test / fix it, I don't have a Mac system to test with.  If you apply it to your source and it still doesn't build, I can try and help with any errors.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #46 on: May 27, 2020, 09:40:45 AM »
I think docutils are either missing or mixed up. One fast way to fix this mght be this in terminal:
Code: [Select]
pip install docutils
pip2 install docutils
pip3 install docutils

My script in the tool should have installed these already but maybe pip isn´t working or something else causing it not to install. What happens when you run the pip commands from terminal?

Some background info:
https://www.magiclantern.fm/forum/index.php?topic=16012.msg155422;topicseen#msg155422

Also check your Makefile.user.default in ml root folder:
We're almost ready to build Magic Lantern but first we've got to make one small change first. Go into the magic-lantern directory, find the file named Makefile.user.default and you'll see this block of code:

Code: [Select]
#
# Host compiler settings
#
HOST_CC=$(shell which gcc)
HOST_LD=$(shell which ld)
HOST_AR=$(shell which ar)

Now make a new file called Makefile.user and put in just these lines:

Code: [Select]
#
# Host compiler settings
#
HOST_CC=gcc-5
HOST_LD=gcc-5
HOST_AR=$(shell which ar)

Warning: DON'T EDIT Makefile.user.default -- Put the changes you want to make to Makefile.user.default in your Makefile.user file. Think of this as a way to customize the Magic Lantern build environment without modifying the code.

TequilaKez

  • Freshman
  • **
  • Posts: 51
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #47 on: May 27, 2020, 01:45:07 PM »
Ok pip3 returns

Requirement already satisfied: docutils in /usr/local/lib/python3.7/site-packages (0.16)

Looking again I can also see a lot of /bin/sh: python2: command not found

python3.7 and python3.8 have presumably been installed by some other brew apps, so maybe even though macOS still targets python2.7, Homebrew defaults to 3.7?

But I'm a bit out of my league here....


Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #48 on: May 27, 2020, 02:00:22 PM »
Please try the makefile fix.

names_are_hard

  • Contributor
  • Member
  • *****
  • Posts: 181
  • 200D idiot
Re: Magic Lantern development compiler.app (Mac OS)
« Reply #49 on: May 27, 2020, 03:39:53 PM »
If you're getting "python2: command not found" then I guess Mac doesn't have that command (so, "python" is python3 and there's no python2 at all).  You have Python 2 installed, but no way to run version 2 specifically.  Make a symlink or alias so that "python2" runs the binary for python 2.  Macs are setup in a way that makes it annoyingly difficult to run python programs, I've seen this before.