Compiling Magic Lantern on a Macintosh

Started by dfort, October 14, 2015, 02:36:14 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

scrax

Installed on a virgin High sierra 10.13.6 today.

This what I did, just for reference.

from terminal
gcc
asked to install command line tools and so installed them

then went to recovery terminal:
csrutil disable

back to the os made the root owned /usr/local/ folder mine:
sudo chflags norestricted /usr/local && sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local


back in recovery terminal:
csrutil enable

Again to the Os installed Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

then python wget and mercurial
brew install python wget mercurial

after those docutils (but seems not needed since they were already up to date)
pip install docutils
pip2 install docutils
pip3 install docutils

then skipped the homebrew compiler part and copied the arm toolchain, both
cd ~ && wget -c https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q3-update/+download/gcc-arm-none-eabi-5_4-2016q3-20160926-mac.tar.bz2 &&  tar -jxf gcc-arm-none-eabi-5_4-2016q3-20160926-mac.tar.bz2 &&  rm gcc-arm-none-eabi-5_4-2016q3-20160926-mac.tar.bz2
cd ~ && wget https://launchpad.net/gcc-arm-embedded/4.8/4.8-2013-q4-major/+download/gcc-arm-none-eabi-4_8-2013q4-20131218-mac.tar.bz2 && tar -jxf gcc-arm-none-eabi-4_8-2013q4-20131218-mac.tar.bz2 && rm gcc-arm-none-eabi-4_8-2013q4-20131218-mac.tar.bz2

finally to check it out cloned MLrepo and try compile it
hg clone https://bitbucket.org/hudson/magic-lantern
cd magic-lantern
hg update unified
make 600D

and it worked!
tried another branch and than time for qemu:
hg update qemu -c
cd contrib/qemu/
./install.sh

after installing it and putting the ROM0.BIN and ROM1.BIN in 600D folder I got canon menu and ML working with:

make -C ../magic-lantern/platform/600D.102 install_qemu
./run_canon_fw.sh 600D,firmware="boot=1"


photo screen is all black comes up after a couple of I presses but don't stay on turn black after a little. with fn+CANC i simulate DEL and can open ML.
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

dfort

Quote from: scrax on February 28, 2019, 03:03:29 PM
...skipped the homebrew compiler part...

For the most part skipping the Homebrew gcc-5 installation isn't a problem, the Mac clang compiler works fine. However, there are a few utilities like cr2hdr and (I believe) io-decrypt that won't compile with clang.

The other day Apple pushed an update on the command line tools and it broke the Homebrew gcc-5 compiler. Going back through my notes this is the fix:

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

If you want to use the latest from Homebrew you can also:

brew update
brew upgrade

scrax

Quote from: dfort on April 09, 2019, 05:38:43 AM
For the most part skipping the Homebrew gcc-5 installation isn't a problem, the Mac clang compiler works fine. However, there are a few utilities like cr2hdr and (I believe) io-decrypt that won't compile with clang.


According to this comment seems that for MLV app David made some changes to make it compile on clang.

Maybe can those changes be included in unified?
Seems not, but I've just tried to compile cr2hdr and worked.
Then tried to make a brew formula for it but so far can't make it work (seems homebrew can't find my toolchains).

brew install cr2hdr
==> Downloading https://bitbucket.org/hudson/magic-lantern/get/7a3b5fa3f4c6.zip
Already downloaded: ~/Library/Caches/Homebrew/downloads/d3c1cf4d6a2a8d9314ef76c703162e322414dd166d057626813089071420a00d--hudson-magic-lantern-7a3b5fa3f4c6.zip
==> make cr2hdr
Last 15 lines from ~/Library/Logs/Homebrew/cr2hdr/01.make:
make cr2hdr


Please configure a valid ARM cross-compiler.
If arm-none-eabi-gcc is in your executable path, it will be used.

Preferred: gcc 5_4-2016q3 32-bit from https://launchpad.net/gcc-arm-embedded
Also fine: gcc-arm-embedded 6.x, Linaro arm-eabi 7.x, gcc-arm-none-eabi from Ubuntu,
gcc-arm-embedded from team-gcc-arm-embedded PPA on Ubuntu, others may work as well.

For GDB+QEMU, you *must* use a 32-bit version, e.g. gdb-arm-none-eabi:i386,
gcc-arm-embedded:i386 from PPA, 32-bit arm-none-eabi-gdb from gcc-arm-embedded.
Unfortunately, Linaro's arm-eabi-gdb does not work, whether 32 or 64 bit.

../../Makefile.setup.toolchain:42: *** .  Stop.

READ THIS: https://docs.brew.sh/Troubleshooting


This is what I'm using
class Cr2hdr < Formula
  depends_on "dcraw"
  depends_on "exiftool"
  desc "Dual ISO file coverter"
  homepage "https://www.magiclantern.fm"
  head "https://bitbucket.org/hudson/magic-lantern",
    :branch => "unified"
  url "https://bitbucket.org/hudson/magic-lantern/get/7a3b5fa3f4c6.zip"
  version "2.3"
  sha256 "7d5f10df15e243af51543ef6ad26989ab015d2d35a84228f099143587dfebc11"

  def install
    cd "modules/dual_iso" do
      system "make cr2hdr"
      bin.install "cr2hdr"
    end
  end

  def caveats
    <<-EOS.undent
      Before you can use cr2hdr you must install Adobe DNG Converter
      $ brew install caskroom/cask/brew-cask
      $ brew cask install adobe-dng-converter
    EOS
  end

  test do
    system "#{bin}/cr2hdr"
  end
end


And here an older formula found today looking for how to make a homebrew package, I like the idea to maybe (in the end) have a "brew install magiclantern" formula that will work without installling things one by one...
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

dfort

Hum--interesting:

brew install --HEAD cr2hdr
brew install --HEAD raw2dng


Though it is a bit outdated. Last commit was 5 years ago.

The install script I wrote a while back and is now in Danne's Magic Lantern development compiler.app (Mac OS) should still work for most users who want to set up a development environment. It will download all the pieces and even set up QEMU for you.

scrax

I'm getting closer... but still having problem.

If I try download using repo url (https://bitbucket.org/hudson/magic-lantern) homebrew fail because magic-lantern folder is saved as a file and then cant cd to modules/dual_iso
If I download the repo zip (https://bitbucket.org/hudson/magic-lantern/get/7a3b5fa3f4c6.zip) I got right the magic-lantern folder but then:

abort: no repository found in '/private/tmp/cr2hdr-20190417-3613-cq0pzx/hudson-magic-lantern-7a3b5fa3f4c6/modules/dual_iso' (.hg not found)!

(<type 'exceptions.SystemExit'>, SystemExit(1,), <traceback object at 0x10b3765f0>)
[ gcc      ]   cr2hdr
cr2hdr.c:58:10: fatal error: 'module_strings.h' file not found
#include "module_strings.h"
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

scrax

Quote from: dfort on April 17, 2019, 01:03:10 AM
Hum--interesting:

brew install --HEAD cr2hdr
brew install --HEAD raw2dng


Though it is a bit outdated. Last commit was 5 years ago.

last commit is nov 2017, but was just updated added the checksum.

But wait a sec.
did it work for you?
???

I got this:

brew tap ebeigarts/homebrew-magic-lantern
==> Tapping ebeigarts/magic-lantern
Cloning into '/usr/local/Homebrew/Library/Taps/ebeigarts/homebrew-magic-lantern'...
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 0), reused 5 (delta 0), pack-reused 0
Unpacking objects: 100% (8/8), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/ebeigarts/homebrew-magic-lantern/magic_lantern_formula.rb
formulae require at least a URL
Error: Cannot tap ebeigarts/magic-lantern: invalid syntax in tap!


Note:To setup some ML useful stuff (not only for devs) there iswas MLTools too (supposed to support linux also).
I've tried it some week ago and needs to be updated for hugin stuff that changed something (attached the patch to fix)
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

dfort

I didn't try it. Looked at the scripts and it needs a lot of work. cr2hdr requires dcraw and exiftool but these Homebrew scripts use Adobe DNG Converter. Not sure how it is supposed to work. I never had any luck writing my own Homebrew taps.

scrax

Quote from: dfort on April 17, 2019, 02:38:14 AM
I didn't try it. Looked at the scripts and it needs a lot of work. cr2hdr requires dcraw and exiftool but these Homebrew scripts use Adobe DNG Converter. Not sure how it is supposed to work. I never had any luck writing my own Homebrew taps.

It has exiftool and dcraw as dependencies so it will intall also them like usual in homebrew, somewhere here in the forum I think had found something about Adobe DNG converter not mandatory but will help getting right WB (related to the camera-lens model corrections) needed for DNG compression (from cr2hdr help):
QuoteDNG compression (requires Adobe DNG Converter):
--compress      : Lossless DNG compression
--compress-lossy: Lossy DNG compression (be careful, may destroy shadow detail)
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

dfort

Apple released macOS Catalina, 10.15 and of course this is breaking the development environment we set up for Macintosh users. Here's a quick fix.

First of all, update the command line tools. This should show up in the system preferences under Software Update or you can run this command that still works:

xcode-select --install

Note that this command no longer works:
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.*.pkg

Homebrew has also released a new version to work with Catalina so:

brew update
brew upgrade


At the moment the Homebrew GCC compilers don't seem to be working with the ML build scripts but the Apple compiler works--for the most part. Basically, you don't need the Makefile.user file or you can just comment out the lines that point to the Homebrew compiler:

#
# Host compiler settings
#
# HOST_CC=gcc-5
# HOST_LD=gcc-5


Note that Catalina will not support 32-bit apps, all of the ML command line tools are setup for 32-bit. The good news is that  Danne has found a workaround, at least for compiling mlv_dump.

DeafEyeJedi

Bit the bullet on Catalina. Back to following your instructions once again and thanks to both @Danne & @dfort for keeping us all young and dandy while you're at it! :)
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

DeafEyeJedi

Still trying to wrap my head around getting the compiling environment back up and running again while on Catalina...

Looks like I'll be here for a long haul throughout this afternoon...

DeafEyeJedi@Apples-Macintosh-10 ~ % brew update
brew upgrade
fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
fatal: unable to access 'https://github.com/Homebrew/brew/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
fatal: unable to access 'https://github.com/Homebrew/homebrew-dupes/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
fatal: unable to access 'https://github.com/Homebrew/homebrew-versions/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!
Fetching /usr/local/Homebrew failed!
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-dupes failed!
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-versions failed!
==> Upgrading 21 outdated packages:
gmp 6.1.1 -> 6.1.2_2
wget 1.18 -> 1.20.3_1
ffmpeg 3.4.2 -> 4.2.1_1
llvm@7 7.0.1 -> 7.1.0
gcc@5 5.4.0 -> 5.5.0_3
pixman 0.34.0_1 -> 0.38.4
mpfr 3.1.5 -> 4.0.2
glib 2.54.2 -> 2.62.2
llvm 7.0.1 -> 9.0.0
gcc 6.2.0 -> 9.2.0_1
grep 3.1 -> 3.3
mercurial 3.9.2 -> 5.1.1_2
libtasn1 4.13 -> 4.14
isl 0.17.1 -> 0.21
pcre 8.41 -> 8.43
x264 r2854 -> r2917_1
openssl 1.0.2s -> 1.0.2t
libusb 1.0.22 -> 1.0.23
mtools 4.0.18 -> 4.0.23
git 2.22.0_1 -> 2.23.0_1
libmpc 1.0.3 -> 1.1.0
==> Upgrading llvm@7
==> Downloading https://homebrew.bintray.com/bottles/[email protected].
==> Downloading from https://akamai.bintray.com/51/5140804e0811f7fd438e4f71f482b
########                                                                  11.8%


Edit:

Seems all has been updated accordingly and those last few messages below aren't giving me hints that I could understand... Hmm?

icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).

If you need to have icu4c first in your PATH run:
  echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.zshrc
  echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.zshrc

For compilers to find icu4c you may need to set:
  export LDFLAGS="-L/usr/local/opt/icu4c/lib"
  export CPPFLAGS="-I/usr/local/opt/icu4c/include"

For pkg-config to find icu4c you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

names_are_hard

Would anyone be interested in using Docker for this?  It should be possible to make the same Docker image work on Linux, Windows and Mac.  I could probably make it so it looks a bit like this:

git clone docker-build-repo-URL
docker build
docker run some-magiclantern-repo-URL 200D

And it pulls the magiclantern repo you're interested in, builds for 200D and drops the files outside of docker, ready to put on your card.  Installing docker is left as an exercise for the reader but should be pretty easy.  As a bonus this would guarantee that everybody can automatically use the same versions of compiler, make, etc, which is nice for the devs.

A little off topic for this thread, so please message me if this sounds like a good idea, and I'll try and get it working.

Danne

Quote from: DeafEyeJedi on November 05, 2019, 10:58:39 PM
Still trying to wrap my head around getting the compiling environment back up and running again while on Catalina...
What happens when running my Compiler.app on Catalina? It should run all scripts and install dependencies if missing.

names_are_hard

I have a first version of using Docker for building ML.  Thread is here:
https://www.magiclantern.fm/forum/index.php?topic=24619

In theory this allows anyone on Linux, Mac or Windows 10 to build ML by installing Git, installing Docker, then copy-pasting 5 commands.  I think that should be a lot easier?  I won't pollute this thread any further though, my Docker is a bit of a hack currently, needs a bunch of work to replace existing process.  Testers are appreciated!

dfort

@names_are_hard - Finally had a chance to look into Docker. It looks like there are a couple of options for Mac users, Docker Desktop on Mac vs. Docker Toolbox. I suppose either one will work, Toolbox uses VirtualBox while Desktop uses HyperKit. Though I haven't tried your method yet, the problem I've heard about using VM's on Macs is compiling native versions of the ML command line tools like mlv_dump and cr2hdr. That is, unless you set up a VM running a macOS in which case I would wonder why do this?

Compiling ML on a Mac isn't difficult, most of the heavy lifting for the in camera binaries is being done by the ARM compiler. The issue at present is that the latest macOS won't run 32-bit apps so we need to update the ML supporting applications that run on the computer to 64-bit.

Quote from: DeafEyeJedi on November 05, 2019, 10:58:39 PM
Still trying to wrap my head around getting the compiling environment back up and running again while on Catalina...
...
icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).
...


Not sure what icu4c is for or how you got it on your system but it isn't needed to compile ML. Maybe it will be easier to wipe out your Homebrew installation and make a fresh start. Danne's compiling app and my installation instructions should still work on Catalina -- with the modifications noted on Reply #208.

DeafEyeJedi

Quote from: dfort on November 08, 2019, 03:25:46 PM
Not sure what icu4c is for or how you got it on your system but it isn't needed to compile ML. Maybe it will be easier to wipe out your Homebrew installation and make a fresh start. Danne's compiling app and my installation instructions should still work on Catalina -- with the modifications noted on Reply #208

No idea either. Must have been on me due to user error. Looks like I'll have to wipe out homebrew installation and make a fresh start only because I did try (repeatedly) your instructions w the modification noted from that very post. Again, maybe it's due to my user error.

DeafEyeJedi@Apples-Macintosh-10 ~ % brew update
brew upgrade
fatal: unable to access 'https://github.com/Homebrew/brew/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
fatal: unable to access 'https://github.com/Homebrew/homebrew-dupes/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
fatal: unable to access 'https://github.com/Homebrew/homebrew-versions/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
Error: Fetching /usr/local/Homebrew failed!
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-dupes failed!
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-versions failed!
DeafEyeJedi@Apples-Macintosh-10 ~ %
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

dfort

You don't really need those packages that are failing. Did the other apps update? Have you tried compiling ML?

DeafEyeJedi

Just compiled a build for 5D3.123 from @Danne's Compiler on Catalina within crop_rec_4k_mlv_snd_isogain_1x3_presets branch. :o

This build functions like normal on the 5D3. Really strange to the least. Here are some screenshots for references.



So I'm not sure why I'm still having issues with MLV_App_Compiler or following your instructions while on Catalina to get this script to work. :-[

At least @Danne's Compiler works on Catalina. Now I can check this off from the to-do list of mine. Thanks @dfort!  :)

Next is to get MLV_App_Compiler to work. Good thing I have down time today while at work.  :P
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

dfort

Have you tried the MLV App binary that's posted on the download site? Not sure if everything works on Catalina, there may still be some issues with dual_iso. IDK--better to ask on the MLV App topic.

Danne

Quote from: dfort on November 09, 2019, 04:25:49 PM
Have you tried the MLV App binary that's posted on the download site? Not sure if everything works on Catalina, there may still be some issues with dual_iso. IDK--better to ask on the MLV App topic.
I´m compiling on Catalina Mlv App is working, dualiso etc(64bit). Didn´t run mlv app compiler on a vanilla catalina install though so dependencies were already installed before os update.

timbytheriver

Had no errors recently compiling using ML Compiler script. Then today failure to compile a repo with this:


../../build_tools/xor_chk.c:48:88: warning: format
      specifies type 'unsigned long' but the argument
      has type 'uint64_t' (aka 'unsigned long long')
      [-Wformat]
  ...0x%lX)\n", 0xCCCCCCCCE12FFF13, footer_magic);


Googled, and looked at referenced code line 48, but way above my head. :o  Any suggestions please?

Many thanks.
5D3 1.1.3
5D2 2.1.2

names_are_hard

This is a printf string formatting error. Without having a Mac, I can't tell you why Catalina broke this (something to do with the 64bit change, but what I don't know).

You may be able to fix this *symptom* with this change:
Quote
printf("Footer magic error (expected 0x%lX, got 0x%lX)\n", 0xCCCCCCCCE12FFF13, footer_magic);

becomes:
Quote
printf("Footer magic error (expected 0x%llX, got 0x%llX)\n", 0xCCCCCCCCE12FFF13, footer_magic);

I doubt that will fix your build as a whole.  If you get that error in one place, you'll probably get it in many.  Something screwy has happened to your build tools, I guess.

If all you want is autoexec.bin you could try my Docker approach.  That uses a well defined set of build tools independent of what platform you're building on.  It's much less flexible in other ways though (there was no interest in it so I didn't keep working on it).
https://www.magiclantern.fm/forum/index.php?topic=24619.0

timbytheriver

Thanks! But I'm still on OSX Mojave :) Was working fine yesterday, but today... no!

Will have a try with your fix, and look at the Docker thing also.  :)

EDIT Still not working after fix.

5D3 1.1.3
5D2 2.1.2

timbytheriver

Actually, I missed that there were more errors above that line:


Using ~/gcc-arm-none-eabi-5_4-2016q3/bin/arm-none-eabi-gcc (preferred).
[ RM       ]   *.o *.d *.i *.s autoexec autoexec.bin magiclantern magiclantern.bin
[ RM       ]   5D3_113.sym magiclantern.sym
[ RM       ]   magiclantern.bin autoexec autoexec.map location.map
[ RM       ]   autoexec-fir autoexec-fir.bin
[ RM       ]   magiclantern.lds
[ RM       ]   dietlibc.a newlib-libc.a newlib-libm.a gcc-libgcc.a
[ RM       ]   version.c version.bin
[ RM       ]   ../../build_tools/xor_chk ../../build_tools/xor_chk.exe
[ RM dir   ]   zip
[ RM       ]   *.zip
Using ~/gcc-arm-none-eabi-5_4-2016q3/bin/arm-none-eabi-gcc (preferred).
../../Makefile.inc:70: removing ../../platform/*/magiclantern.sym
[ RM dir   ]   /Users/xxxx/ML repos/magic-lantern_danne_9Dec2019/platform/5D3.113/zip/
[ MKDIR    ]   ML directory structure...
[ CPP      ]   magiclantern.lds
[ AS       ]   entry.o
[ RM       ]   ../../platform/*/magiclantern.sym
mkdir -p /Users/xxxx/ML repos/magic-lantern_danne_9Dec2019/platform/5D3.113/zip
[ AS       ]   ../../platform/5D3.113/stubs.o
[ VERSION  ]   ../../platform/5D3.113/version.c
[ CC       ]   backtrace.o
[ CC       ]   boot-hack.o
[ CC       ]   fio-ml.o
[ CC       ]   mem.o
../../src/mem.c: In function 'mem_total_display':
../../src/mem.c:1389:13: warning: unused variable 'total' [-Wunused-variable]
         int total = alloc_total_with_memcheck / 1024;
             ^
[ CC       ]   ico.o
[ CC       ]   edmac.o
[ CC       ]   menu.o
[ CC       ]   debug.o
[ CC       ]   rand.o
[ CC       ]   posix.o
[ CC       ]   util.o
[ CC       ]   imath.o
[ CC       ]   electronic_level.o
[ CC       ]   cfn.o
[ CC       ]   gui.o
[ CC       ]   picstyle.o
[ CC       ]   exmem.o
[ CC       ]   bmp.o
[ CC       ]   rbf_font.o
[ CC       ]   config.o
[ CC       ]   stdio.o
[ CC       ]   bitrate-5d3.o
[ CC       ]   lcdsensor.o
[ CC       ]   tweaks.o
[ CC       ]   tweaks-eyefi.o
[ CC       ]   lens.o
[ CC       ]   property.o
[ CC       ]   propvalues.o
[ CC       ]   gui-common.o
[ CC       ]   chdk-gui_draw.o
[ CC       ]   movtweaks.o
[ CC       ]   menuhelp.o
[ MENU IDX ]   ../../src/menuindexentries.h

No menuindex.txt! The "Complete user guide" menu is empty!
Run make docq to update menuindex.txt.

[ CC       ]   focus.o
[ CC       ]   notify_box.o
[ CC       ]   bootflags.o
[ CC       ]   dialog_test.o
[ CC       ]   vram.o
[ CC       ]   greenscreen.o
[ CC       ]   fps-engio.o
[ CC       ]   shoot.o
[ CC       ]   hdr.o
[ CC       ]   lv-img-engio.o
../../src/shoot.c: In function '_prop_handler_PROP_LV_DISPSIZE':
../../src/shoot.c:688:9: warning: unused variable 'new_zoom' [-Wunused-variable]
     int new_zoom = zoom;
         ^
../../src/shoot.c: In function 'shoot_task':
../../src/shoot.c:6310:21: warning: unused variable 'd' [-Wunused-variable]
                 int dt = get_interval_time();
                     ^
[ CC       ]   state-object.o
[ CC       ]   tasks.o
[ CC       ]   vsync-lite.o
[ CC       ]   tskmon.o
[ CC       ]   battery.o
../../src/tskmon.c: In function 'null_pointer_check':
../../src/tskmon.c:242:66: warning: signed and unsigned type in conditional expression [-Wsign-compare]
             int id = tskmon_last_task ? tskmon_last_task->taskId : -1;
                                                                  ^
[ CC       ]   imgconv.o
[ CC       ]   histogram.o
[ CC       ]   falsecolor.o
[ CC       ]   audio-ak.o
[ CC       ]   zebra.o
[ CC       ]   vectorscope.o
[ CC       ]   beep.o
[ CC       ]   crop-mode-hack.o
[ CC       ]   ph_info_disp.o
[ CC       ]   flexinfo.o
[ CC       ]   screenshot.o
[ CC       ]   fileprefix.o
[ CC       ]   lvinfo.o
[ CC       ]   builtin-enforcing.o
[ CC       ]   powersave.o
[ CC       ]   ml-cbr.o
[ CC       ]   raw.o
[ CC       ]   chdk-dng.o
[ CC       ]   edmac-memcpy.o
../../src/edmac-memcpy.c: In function 'edmac_memcpy_init':
../../src/edmac-memcpy.c:91:57: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
     static int AbortEDmac_check __attribute__((used)) = &AbortEDmac;
                                                         ^
../../src/chdk-dng.c:209:16: warning: 'cam_apex_shutte' defined but not used [-Wunused-variable]
static int32_t cam_apex_shutter[2]          = { 0, 96 };            // Shutter speed in APEX units
                ^
../../src/chdk-dng.c:210:16: warning: 'cam_apex_aperture' defined but not used [-Wunused-variable]
static int32_t cam_apex_aperture[2]         = { 0, 96 };            // Aperture in APEX units
                ^
[ CC       ]   patch.o
[ CC       ]   console.o
[ CC       ]   tcc-glue.o
/Library/Developer/CommandLineTools/usr/bin/make -C ../../tcc
make[1]: Nothing to be done for `all'.
[ CC       ]   module.o
[ CC       ]   video_hacks.o
[ CC       ]   afma.o
[ CC       ]   asm.o
[ AR       ]   strrchr.o
[ AR       ]   strncpy.o
[ AR       ]   lib_a-setjmp.o
[ AR       ]   lib_a-memcpy.o
[ CP       ]   newlib-libm.a
[ CP       ]   gcc-libgcc.a
[ VERSION  ]   ../../platform/5D3.113/version.bin
[ CC       ]   disp_direct.o
[ CC       ]   font_direct.o
[ CC       ]   cache.o
[ CC       ]   footer.o
[ XOR_CHK  ]   ../../build_tools/xor_chk
cp ../../data/fonts/*.rbf /Users/xxxx/ML repos/magic-lantern_danne_9Dec2019/platform/5D3.113/zip/ML/fonts/
cp: /Users/xxxx/ML is a directory (not copied).
make: *** [install_extra_data] Error 1
make: *** Waiting for unfinished jobs....
../../build_tools/xor_chk.c:48:88: warning: format
      specifies type 'unsigned long' but the argument
      has type 'uint64_t' (aka 'unsigned long long')
      [-Wformat]
  ...0x%lX)\n", 0xCCCCCCCCE12FFF13, footer_magic);



@Danne Cloned from 'crop_rec_4k_mlv_snd_isogain_1x3_presets' Revision 19253. Should I not use this revision to clone from? Was just trying to update to newest source in this branch.
5D3 1.1.3
5D2 2.1.2

dfort

Hum -- seems to be working here. I'm getting a warning but it compiles successfully.

rosiefort@rosiefocomputer magic-lantern-Danne % hg up 19253
rosiefort@rosiefocomputer magic-lantern-Danne % cd platform/5D3.113
rosiefort@rosiefocomputer 5D3.113 % make
...
/Library/Developer/CommandLineTools/usr/bin/make -C ../../tcc
make[1]: Nothing to be done for `all'.
[ CC       ]   module.o
[ CC       ]   video_hacks.o
[ CC       ]   afma.o
[ CC       ]   asm.o
[ AR       ]   strrchr.o
[ AR       ]   dietlibc.a
[ AR       ]   lib_a-setjmp.o
[ AR       ]   newlib-libc.a
[ CP       ]   newlib-libm.a
[ CP       ]   gcc-libgcc.a
[ LD       ]   magiclantern
[ OBJCOPY  ]   magiclantern.bin
[ STAT     ]   magiclantern.bin
magiclantern.bin: 482956 bytes
[ CC       ]   reboot.o
[ CC       ]   disp_direct.o
[ CC       ]   font_direct.o
[ CC       ]   cache.o
[ CC       ]   footer.o
[ LD       ]   autoexec
[ XOR_CHK  ]   ../../build_tools/xor_chk
../../build_tools/xor_chk.c:48:88: warning: format specifies type
      'unsigned long' but the argument has type 'uint64_t' (aka
      'unsigned long long') [-Wformat]
  ...error (expected 0x%lX, got 0x%lX)\n", 0xCCCCCCCCE12FFF13, footer_magic);
                                  ~~~                          ^~~~~~~~~~~~
                                  %llX
1 warning generated.
[ OBJCOPY  ]   autoexec.bin
[ XOR_CHK  ]   autoexec.bin

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x000100 0x00069500 0x00069500 0x75e8c 0x8b014 RWE 0x100



Tip: to compile faster, try one of these:
    make -j8
    export MAKEFLAGS='-j8'

[ SYMBOLS  ]   magiclantern.sym
[ CP       ]   5D3_113.sym