Author Topic: Compiling Magic Lantern on a Macintosh  (Read 37601 times)

Danne

  • Hero Member
  • *****
  • Posts: 3478
Re: Compiling Magic Lantern on a Macintosh
« Reply #25 on: October 28, 2015, 06:19:08 PM »
The script is mostly dforts work. I merely lined up what is already in the first post. Get back on how it worked :)

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3045
  • 5D3 / M1 / 7D / 70D / SL1
Re: Compiling Magic Lantern on a Macintosh
« Reply #26 on: October 28, 2015, 06:43:18 PM »
The script is mostly dforts work. I merely lined up what is already in the first post. Get back on how it worked :)

Still nice of you to contribute on your end as well!  :D

Anyway here's what I have done so far rather than running the script I just did everything manually step by step again from the OP.

Code: [Select]
Last login: Wed Oct 28 10:16:24 on ttys000
Seans-Mac-mini-6:~ DeafEyeJedi$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Seans-Mac-mini-6:~ DeafEyeJedi$ sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local
Password:
Sorry, try again.
Password:
Seans-Mac-mini-6:~ DeafEyeJedi$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Seans-Mac-mini-6:~ DeafEyeJedi$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Warning: This script will remove:
/usr/local/.git/
/usr/local/.gitignore
/usr/local/.yardopts
/usr/local/CODEOFCONDUCT.md
/usr/local/CONTRIBUTING.md
/usr/local/Cellar/
/usr/local/LICENSE.txt
/usr/local/Library/
/usr/local/README.md
/usr/local/SUPPORTERS.md
/usr/local/bin/brew
/usr/local/share/doc/homebrew/
/usr/local/share/man/man1/brew.1
Are you sure you want to uninstall Homebrew? [y/N] y
==> Removing Homebrew installation...
==> Removing empty directories...
==> Homebrew uninstalled!
The following possible Homebrew files were not deleted:
/usr/local/bin/
/usr/local/cuda/
/usr/local/etc/
/usr/local/foundry/
/usr/local/include/
/usr/local/lib/
/usr/local/share/
You may consider to remove them by yourself.
You may want to restore /usr/local's original permissions
  sudo chmod 0755 /usr/local
  sudo chgrp wheel /usr/local

Seans-Mac-mini-6:~ DeafEyeJedi$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
Password:
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown DeafEyeJedi /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 3800, done.
remote: Compressing objects: 100% (3642/3642), done.
remote: Total 3800 (delta 40), reused 506 (delta 22), pack-reused 0
Receiving objects: 100% (3800/3800), 3.24 MiB | 4.98 MiB/s, done.
Resolving deltas: 100% (40/40), done.
From https://github.com/Homebrew/homebrew
 * [new branch]      master     -> origin/master
Checking out files: 100% (3804/3804), done.
HEAD is now at a3e97b0 ldc: update 0.16.1 bottle.
==> Installation successful!
==> Next steps
Run `brew help` to get started
Seans-Mac-mini-6:~ DeafEyeJedi$ brew install python wget mercurial
==> Installing dependencies for python: readline, sqlite, gdbm, openssl
==> Installing python dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-6.3.8.yosemite.bot
######################################################################## 100.0%
==> Pouring readline-6.3.8.yosemite.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

OS X provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.


Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/readline/lib
    CPPFLAGS: -I/usr/local/opt/readline/include

==> Summary
5D3.113 • 5D3.123 • EOSM.203 • 7D.203 • 70D.112 • 100D.101

dfort

  • Hero Member
  • *****
  • Posts: 2091
Re: Compiling Magic Lantern on a Macintosh
« Reply #27 on: October 28, 2015, 07:07:39 PM »
You're on Yosemite--at least Homebrew says you are. I didn't test this stuff out on 10.10 but it should work. All you needed to do was to install the gcc compiler. Didn't that work for you?
EOSM.202 EOSM.203 EOSM2.103 700D.115 5D3.*

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3045
  • 5D3 / M1 / 7D / 70D / SL1
Compiling Magic Lantern on a Macintosh
« Reply #28 on: October 28, 2015, 07:19:12 PM »
I did install the gcc compiler and it worked if I use nikfreak's fork but not yours for some reason?

Here I was able to compile fine for 5D3.113 but not for 5D3.123 while using his fork...



However this is the error I was getting after trying to compile for 5D3.123...

Code: [Select]
Last login: Wed Oct 28 11:12:10 on ttys000
Seans-Mac-mini-6:~ DeafEyeJedi$ cd magic-lantern/platform/5D3.123/
Seans-Mac-mini-6:5D3.123 DeafEyeJedi$ make clean && make zip
[ RM ]  *.o *.d autoexec autoexec.bin magiclantern magiclantern.bin
[ RM ]  5D3_123.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 dir ]  zip
[ RM ]  *.zip
../../Makefile.inc:79: remove /Users/SMJ/magic-lantern/platform/5D3.123/zip
[ RM dir ]  /Users/SMJ/magic-lantern/platform/5D3.123/zip/
mkdir -p /Users/SMJ/magic-lantern/platform/5D3.123/zip
[ CPP      ]   magiclantern.lds
[ AS       ]   entry.o
[ AS       ]   ../../platform/5D3.123/stubs.o
[ VERSION  ]   ../../platform/5D3.123/version.c
[ CC       ]   version.o
[ CC       ]   boot-hack.o
[ CC       ]   fio-ml.o
[ CC       ]   mem.o
[ 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
[ CC       ]   menuindex.o
[ 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
[ CC       ]   state-object.o
[ CC       ]   tasks.o
[ CC       ]   vsync-lite.o
[ CC       ]   tskmon.o
[ CC       ]   battery.o
[ CC       ]   imgconv.o
[ CC       ]   histogram.o
[ CC       ]   falsecolor.o
[ CC       ]   audio-ak.o
[ CC       ]   zebra.o
../../src/zebra.c:1133:12: warning: 'zebra_digic_dirty' defined but not used [-Wunused-variable]
 static int zebra_digic_dirty = 0;
            ^
[ 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       ]   ml-cbr.o
[ CC       ]   raw.o
[ CC       ]   chdk-dng.o
[ CC       ]   edmac-memcpy.o
[ CC       ]   console.o
[ CC       ]   tcc-glue.o
make -C ../../tcc
make[1]: Nothing to be done for `all'.
[ CC       ]   module.o
[ CC       ]   video_hacks.o
[ CC       ]   misc.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
[ SYMBOLS  ]   magiclantern.sym
[ CP       ]   5D3_123.sym
[ MKDIR    ]   install
[ CP       ]   install
[ VERSION  ]   ../../platform/5D3.123/version.bin
make: truncate: No such file or directory
make: *** [../../platform/5D3.123/version.bin] Error 1
Seans-Mac-mini-6:5D3.123 DeafEyeJedi$

*edit#2*

Sorry guys after uninstalling and reinstalling I notice this pattern of when I successfully compile the first One and then when make clean from that one Body then I try to Compile another body which would end up giving me errors... Okay time for me to take a break and cook some eggs since I am losing protein over this battle from the past 24 hours.

Code: [Select]
Last login: Wed Oct 28 11:27:06 on ttys000
Seans-Mac-mini-6:~ DeafEyeJedi$ hg clone -r unified https://bitbucket.org/nikfreak/magic-lantern/
destination directory: magic-lantern
adding changesets
adding manifests
adding file changes                                                             
added 11300 changesets with 25057 changes to 2724 files                         
updating to branch unified
1569 files updated, 0 files merged, 0 files removed, 0 files unresolved
Seans-Mac-mini-6:~ DeafEyeJedi$ cd magic-lantern/platform/
Seans-Mac-mini-6:platform DeafEyeJedi$ cd
Seans-Mac-mini-6:~ DeafEyeJedi$ cd magic-lantern/
Seans-Mac-mini-6:magic-lantern DeafEyeJedi$ hg pull && hg update 5D3-123
pulling from https://bitbucket.org/nikfreak/magic-lantern/
searching for changes
adding changesets
adding manifests
adding file changes
added 1662 changesets with 3167 changes to 532 files (+21 heads)                                                                           
(run 'hg heads' to see heads)
254 files updated, 0 files merged, 96 files removed, 0 files unresolved
Seans-Mac-mini-6:magic-lantern DeafEyeJedi$ cd magic-lantern/platform/5D3.123/
-bash: cd: magic-lantern/platform/5D3.123/: No such file or directory
Seans-Mac-mini-6:magic-lantern DeafEyeJedi$ cd
Seans-Mac-mini-6:~ DeafEyeJedi$ cd magic-lantern/platform/5D3.123/
Seans-Mac-mini-6:5D3.123 DeafEyeJedi$ make clean && make zip
[ RM ]  *.o *.d autoexec autoexec.bin magiclantern magiclantern.bin
[ RM ]  5D3_123.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 dir ]  zip
[ RM ]  *.zip
../../Makefile.inc:79: remove /Users/SMJ/magic-lantern/platform/5D3.123/zip
[ RM dir ]  /Users/SMJ/magic-lantern/platform/5D3.123/zip/
mkdir -p /Users/SMJ/magic-lantern/platform/5D3.123/zip
[ CPP      ]   magiclantern.lds
[ AS       ]   entry.o
[ AS       ]   ../../platform/5D3.123/stubs.o
[ VERSION  ]   ../../platform/5D3.123/version.c
[ CC       ]   version.o
[ CC       ]   boot-hack.o
[ CC       ]   fio-ml.o
[ CC       ]   mem.o
[ 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.

/bin/sh: truncate: command not found
make: *** [../../src/menuindexentries.h] Error 127
Seans-Mac-mini-6:5D3.123 DeafEyeJedi$ cd
Seans-Mac-mini-6:~ DeafEyeJedi$ cd magic-lantern/platform/EOSM.202/
Seans-Mac-mini-6:EOSM.202 DeafEyeJedi$ cd
Seans-Mac-mini-6:~ DeafEyeJedi$ cd magic-lantern/platform/5D3.123/
Seans-Mac-mini-6:5D3.123 DeafEyeJedi$ make clean
[ RM ]  *.o *.d autoexec autoexec.bin magiclantern magiclantern.bin
[ RM ]  5D3_123.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 dir ]  zip
[ RM ]  *.zip
Seans-Mac-mini-6:5D3.123 DeafEyeJedi$ cd
Seans-Mac-mini-6:~ DeafEyeJedi$ cd magic-lantern/platform/EOSM.202/
Seans-Mac-mini-6:EOSM.202 DeafEyeJedi$ make clean && make zip
[ RM ]  *.o *.d autoexec autoexec.bin magiclantern magiclantern.bin
[ RM ]  EOSM_202.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 dir ]  zip
[ RM ]  *.zip
../../Makefile.inc:79: remove /Users/SMJ/magic-lantern/platform/EOSM.202/zip
[ RM dir ]  /Users/SMJ/magic-lantern/platform/EOSM.202/zip/
mkdir -p /Users/SMJ/magic-lantern/platform/EOSM.202/zip
[ CPP      ]   magiclantern.lds
[ AS       ]   entry.o
[ AS       ]   ../../platform/EOSM.202/stubs.o
[ VERSION  ]   ../../platform/EOSM.202/version.c
[ CC       ]   version.o
[ CC       ]   boot-hack.o
[ CC       ]   fio-ml.o
[ CC       ]   mem.o
[ 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.o
In file included from ../../src/bitrate.c:5:0:
../../src/bitrate.c: In function 'time_indicator_show':
../../src/bitrate.c:397:81: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         int fnts = FONT(FONT_SMALL, COLOR_WHITE, mvr_config.actual_qscale_maybe == -16 ? COLOR_RED : COLOR_BLACK);
                                                                                 ^
../../src/bmp.h:174:13: note: in definition of macro 'FONT'
         | ((bg) & 0xFF) << 8 \
             ^
../../src/bitrate.c:402:23: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
             mvr_config.actual_qscale_maybe < 0 ? "-" : "+",
                       ^
[ 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.

/bin/sh: truncate: command not found
make: *** [../../src/menuindexentries.h] Error 127
Seans-Mac-mini-6:EOSM.202 DeafEyeJedi$

*edit#3*

I think I give up with Yosemite on my Mac Mini -- kind of annoying to have two different OS in between devices so I'm currently upgrading to El Captain on the Mac Mini then will give another go at it.

Are there reasons why each user forks have different error results as well as random times that sometimes it works and sometimes not. Is that due to the rapid updates in the branches?
5D3.113 • 5D3.123 • EOSM.203 • 7D.203 • 70D.112 • 100D.101

dfort

  • Hero Member
  • *****
  • Posts: 2091
Re: Compiling Magic Lantern on a Macintosh
« Reply #29 on: October 29, 2015, 04:02:10 AM »
We've been PM'ing about this but others might see the same errors. For example:

Quote
make: truncate: No such file or directory

Whoa, that's some old code in that branch. Ok--so you really want to compile it? I did some searching and testing so here you go:

Code: [Select]
brew install https://raw.githubusercontent.com/artw/homebrew/master/Library/Formula/truncate.rb
That will give you truncate. It isn't a part of the main Homebrew repository so I had to figure out how to get it from the pull request. From there you should be able to do the old "make clean && make zip" that you are already familiar with. Homebrew, El Capitan and some of the ML code is somewhat new and untested but you might as well get on board with the latest--in a few weeks it will become the new norm and a few weeks after that it will be obsolete.
EOSM.202 EOSM.203 EOSM2.103 700D.115 5D3.*

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3045
  • 5D3 / M1 / 7D / 70D / SL1
Compiling Magic Lantern on a Macintosh
« Reply #30 on: October 29, 2015, 09:39:53 AM »
Haha love this stuff, D!

Ok finally updated the Mac Mini to El Captain. I then ran Terminal and this is what I am getting now... Looks like the same errors?

Code: [Select]
Last login: Thu Oct 29 00:41:13 on ttys000
Seans-Mac-mini-6:~ DeafEyeJedi$ cd magic-lantern/platform/EOSM.202/
Seans-Mac-mini-6:EOSM.202 DeafEyeJedi$ make clean && make zip
[ RM ]  *.o *.d autoexec autoexec.bin magiclantern magiclantern.bin
[ RM ]  EOSM_202.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
../../Makefile.inc:79: remove /Users/SMJ/magic-lantern/platform/EOSM.202/zip
[ RM dir ]  /Users/SMJ/magic-lantern/platform/EOSM.202/zip/
mkdir -p /Users/SMJ/magic-lantern/platform/EOSM.202/zip
[ CPP      ]   magiclantern.lds
[ AS       ]   entry.o
[ AS       ]   ../../platform/EOSM.202/stubs.o
[ VERSION  ]   ../../platform/EOSM.202/version.c
[ CC       ]   version.o
[ CC       ]   boot-hack.o
[ CC       ]   fio-ml.o
[ CC       ]   mem.o
[ 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.o
In file included from ../../src/bitrate.c:5:0:
../../src/bitrate.c: In function 'time_indicator_show':
../../src/bitrate.c:400:81: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         int fnts = FONT(FONT_SMALL, COLOR_WHITE, mvr_config.actual_qscale_maybe == -16 ? COLOR_RED : COLOR_BLACK);
                                                                                 ^
../../src/bmp.h:174:13: note: in definition of macro 'FONT'
         | ((bg) & 0xFF) << 8 \
             ^
../../src/bitrate.c:405:23: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
             mvr_config.actual_qscale_maybe < 0 ? "-" : "+",
                       ^
[ 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
[ CC       ]   menuindex.o
[ CC       ]   focus.o
[ CC       ]   notify_box.o
[ CC       ]   bootflags.o
[ CC       ]   dialog_test.o
[ CC       ]   vram.o
[ CC       ]   greenscreen.o
[ CC       ]   fps-engio.o
../../src/fps-engio.c:237:6: error: #error fixme: FPS_TIMER_B_MIN and FPS_TIMER_B_MIN are plain wrong
     #error fixme: FPS_TIMER_B_MIN and FPS_TIMER_B_MIN are plain wrong
      ^
../../src/fps-engio.c:295:12: warning: 'fps_timer_b_method' defined but not used [-Wunused-variable]
 static int fps_timer_b_method = 0;
            ^
make: *** [fps-engio.o] Error 1
Seans-Mac-mini-6:EOSM.202 DeafEyeJedi$
[/quote]z
5D3.113 • 5D3.123 • EOSM.203 • 7D.203 • 70D.112 • 100D.101

dfort

  • Hero Member
  • *****
  • Posts: 2091
Re: Compiling Magic Lantern on a Macintosh
« Reply #31 on: October 29, 2015, 04:24:22 PM »
Quote
The definition of insanity is doing the same thing and expecting different results.

Code: [Select]
../../src/fps-engio.c:237:6: error: #error fixme: FPS_TIMER_B_MIN and FPS_TIMER_B_MIN are plain wrong     #error fixme: FPS_TIMER_B_MIN and FPS_TIMER_B_MIN are plain wrong
      ^

You are trying to compile the EOSM platform from the main repository. It is intentionally blocked until the a1ex has the time to check out the timer values from this pull request. If you want to get it to compile it is actually very simple. Go to magic-lantern/src/fps-engio.c and look for this starting on line 232. See that last line? The one that starts with "#error" ? Simply delete that line and it will compile.

Code: [Select]
#elif defined(CONFIG_EOSM)
    #define TG_FREQ_BASE 32000000
    #define FPS_TIMER_A_MIN 520
    #undef FPS_TIMER_B_MIN
    #define FPS_TIMER_B_MIN MIN(fps_timer_b_orig, 1970)
    #error fixme: FPS_TIMER_B_MIN and FPS_TIMER_B_MIN are plain wrong

That said, it is much better compiling from my version because it has the fixes that haven't been merged in yet.

Code: [Select]
hg clone -r EOSM__working https://bitbucket.org/daniel_fort/magic-lantern
EOSM.202 EOSM.203 EOSM2.103 700D.115 5D3.*

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3045
  • 5D3 / M1 / 7D / 70D / SL1
Re: Compiling Magic Lantern on a Macintosh
« Reply #32 on: October 29, 2015, 06:46:13 PM »
Alright here's the deal... First of all Thanks for the clarifications once again even tho you have already mentioned it to me. I must have gone insanity myself!

If so, I apologize for this but hey I got three of my cameras compiled with ease this morning from your fork branch.



Then once I added...

Code: [Select]
hg pull && hg update 5D3-123
That's when shit goes loose... Here's the code I am encountering no matter which camera build I try to compile even 5D3.113 that compiled just fine before this pull update... Could that very well be the culprit of this whole thing I have been trying to do?

Code: [Select]
Seans-Mac-mini-6:~ DeafEyeJedi$ cd magic-lantern/
Seans-Mac-mini-6:magic-lantern DeafEyeJedi$ hg pull && hg update 5D3-123
pulling from https://bitbucket.org/daniel_fort/magic-lantern
searching for changes
adding changesets
adding manifests
adding file changes
added 1523 changesets with 2869 changes to 642 files (+30 heads)                                                                                             
(run 'hg heads' to see heads)
170 files updated, 0 files merged, 53 files removed, 0 files unresolved
Seans-Mac-mini-6:magic-lantern DeafEyeJedi$ cd
Seans-Mac-mini-6:~ DeafEyeJedi$ cd magic-lantern/platform/5D3.113/
Seans-Mac-mini-6:5D3.113 DeafEyeJedi$ make clean && make zip
[ RM ]  *.o *.d autoexec autoexec.bin magiclantern magiclantern.bin
[ RM ]  5D3_123.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
[ RM dir ]  zip
[ RM ]  *.zip
../../Makefile.inc:79: remove /Users/SMJ/magic-lantern/platform/5D3.113/zip
[ RM dir ]  /Users/SMJ/magic-lantern/platform/5D3.113/zip/
mkdir -p /Users/SMJ/magic-lantern/platform/5D3.113/zip
[ CPP      ]   magiclantern.lds
[ AS       ]   entry.o
[ AS       ]   ../../platform/5D3.123/stubs.o
[ VERSION  ]   ../../platform/5D3.123/version.c
[ CC       ]   version.o
[ CC       ]   boot-hack.o
[ CC       ]   fio-ml.o
[ CC       ]   mem.o
[ 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
[ CC       ]   menuindex.o
[ 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
[ CC       ]   state-object.o
[ CC       ]   tasks.o
[ CC       ]   vsync-lite.o
[ CC       ]   tskmon.o
[ CC       ]   battery.o
[ CC       ]   imgconv.o
[ CC       ]   histogram.o
[ CC       ]   falsecolor.o
[ CC       ]   audio-ak.o
[ CC       ]   zebra.o
../../src/zebra.c:1134:12: warning: 'zebra_digic_dirty' defined but not used [-Wunused-variable]
 static int zebra_digic_dirty = 0;
            ^
[ 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       ]   ml-cbr.o
[ CC       ]   raw.o
[ CC       ]   chdk-dng.o
[ CC       ]   edmac-memcpy.o
[ CC       ]   console.o
[ CC       ]   tcc-glue.o
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
[ SYMBOLS  ]   magiclantern.sym
[ CP       ]   5D3_123.sym
[ MKDIR    ]   install
[ CP       ]   install
[ VERSION  ]   ../../platform/5D3.123/version.bin
make: truncate: No such file or directory
make: *** [../../platform/5D3.123/version.bin] Error 1
Seans-Mac-mini-6:5D3.113 DeafEyeJedi$

Lesson learned for me at least atm is to stay away from the
Code: [Select]
hg pull && hg update 5D3-123
... Such an annoying POS Monster in the making!

Thanks, D!
5D3.113 • 5D3.123 • EOSM.203 • 7D.203 • 70D.112 • 100D.101

dfort

  • Hero Member
  • *****
  • Posts: 2091
Re: Compiling Magic Lantern on a Macintosh
« Reply #33 on: October 29, 2015, 06:50:00 PM »
And round and around we go:
http://www.magiclantern.fm/forum/index.php?topic=16012.msg156286#msg156286

The 5D3-123 branch is only for that one platform--switch branches for other platforms.
EOSM.202 EOSM.203 EOSM2.103 700D.115 5D3.*

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3045
  • 5D3 / M1 / 7D / 70D / SL1
Compiling Magic Lantern on a Macintosh
« Reply #34 on: October 29, 2015, 07:29:56 PM »
Okay NOW I fully understand that you basically need to switch in between branches if I want to compile JUST for 5D3.123.

Then switch back for the rest.

Now I hence the reason why you like to use the SourceTree app -- which I downloaded recently (Thanks for the tip!) and do I just copy/paste the link to these hg clone fork branches within the app?

If so, how exactly?

P.S. Sorry for such a request but I'm currently on the road to Abel Cine to pick up New Gears for work.
5D3.113 • 5D3.123 • EOSM.203 • 7D.203 • 70D.112 • 100D.101

dfort

  • Hero Member
  • *****
  • Posts: 2091
Re: Compiling Magic Lantern on a Macintosh
« Reply #35 on: October 29, 2015, 10:55:17 PM »
Just go to bitbucket.org, create an account if you don't already have one and fork the repositories you'd like to work with. You only need to fork each repository once and you'll get all the branches. Then when you use SourceTree you can copy the repositories to your hard drive, work on them, commit your changes and push them back to bitbucket. dmilligan has several tips on how to keep things organized but if you are just learning there's no harm in deleting your repositories and starting over if you make a mistake. Once you get serious and start submitting pull requests you need to keep your branches in order because anything you do to that branch will automatically show up on the pull request once you push it to bitbucket.

All this will become much clearer once you start using SourceTree. Oh, and maybe any discussion about SourceTree should be its own topic.
EOSM.202 EOSM.203 EOSM2.103 700D.115 5D3.*

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3045
  • 5D3 / M1 / 7D / 70D / SL1
Re: Compiling Magic Lantern on a Macintosh
« Reply #36 on: October 30, 2015, 12:47:26 AM »
Thanks for the tips regarding bitbucket.org and SoureTree. I'll dig into this some more and perhaps start another topic on it if there isn't one.  :)

SO back on topic:

Decided to give it another go on the MBP just to have a clean compiler similar to how I got it working earlier this morning on my Mac Mini running El Captain.

I also understand that it worked earlier on this MBP until I messed around with the "5D3.123" poisonous branch so I am unable to run the uninstallation of HomeBrew because it says it is unable to locate it (but then when I tried installing it claims that I already have it forcing me to uninstall) but the it wont let me uninstall either because it is unable to locate Home Brew.

... and yes of course I tried running the infamous Command-R csrutil enable/disable song and dance to get it back again but that didn't seem to help either?

Code: [Select]
Last login: Thu Oct 29 16:27:20 on ttys000
Apples-Macintosh-10:~ DeafEyeJedi$ sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local
Password:
Apples-Macintosh-10:~ DeafEyeJedi$
  [Restored Oct 29, 2015, 4:31:36 PM]
Last login: Thu Oct 29 16:31:36 on console
Restored session: Thu Oct 29 16:29:05 PDT 2015
Apples-Macintosh-10:~ DeafEyeJedi$
  [Restored Oct 29, 2015, 4:35:02 PM]
Last login: Thu Oct 29 16:35:01 on console
Restored session: Thu Oct 29 16:32:12 PDT 2015
Apples-Macintosh-10:~ DeafEyeJedi$ sudo mkdir /usr/local && sudo chflags norestricted /usr/local && sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local
Password:
mkdir: /usr/local: File exists
Apples-Macintosh-10:~ DeafEyeJedi$
  [Restored Oct 29, 2015, 4:38:02 PM]
Last login: Thu Oct 29 16:38:00 on console
Restored session: Thu Oct 29 16:35:54 PDT 2015
Apples-Macintosh-10:~ DeafEyeJedi$
  [Restored Oct 29, 2015, 4:40:10 PM]
Last login: Thu Oct 29 16:40:08 on console
Restored session: Thu Oct 29 16:38:14 PDT 2015
Apples-Macintosh-10:~ DeafEyeJedi$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Apples-Macintosh-10:~ DeafEyeJedi$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Failed to locate Homebrew!
Apples-Macintosh-10:~ DeafEyeJedi$

Meanwhile, I'll dig through the Home-Brew's website to see if there are other ways to uninstall properly. Thanks, D!


*edit#1*

This is exactly what I wanted to show you whether I try installing or uninstalling Home Brew... This feels like a game of Cat & Mouse!

Code: [Select]
Last login: Thu Oct 29 18:56:58 on ttys000
Apples-Macintosh-10:~ DeafEyeJedi$ sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local
Password:
Apples-Macintosh-10:~ DeafEyeJedi$ sudo mkdir /usr/local && sudo chflags norestricted /usr/local && sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local
mkdir: /usr/local: File exists
Apples-Macintosh-10:~ DeafEyeJedi$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Apples-Macintosh-10:~ DeafEyeJedi$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Failed to locate Homebrew!
Apples-Macintosh-10:~ DeafEyeJedi$
5D3.113 • 5D3.123 • EOSM.203 • 7D.203 • 70D.112 • 100D.101

dfort

  • Hero Member
  • *****
  • Posts: 2091
Re: Compiling Magic Lantern on a Macintosh
« Reply #37 on: October 30, 2015, 11:21:24 PM »
It looks like the uninstall script is failing. To completly remove Homebrew delete everything in /usr/local/bin and /Library/Caches/Homebrew

Then try installing it again with:

Code: [Select]
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Of course you'll also have to re-install the tools to compile ML.

Code: [Select]
brew install python wget mercurial
Code: [Select]
brew tap homebrew/dupes; brew install gcc --use-llvm && for f in /usr/local/bin/*-5; do mv -n "$f" "${f/-5/}"; done
And maybe:

Code: [Select]
pip install docutils
EOSM.202 EOSM.203 EOSM2.103 700D.115 5D3.*

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3045
  • 5D3 / M1 / 7D / 70D / SL1
Re: Compiling Magic Lantern on a Macintosh
« Reply #38 on: October 31, 2015, 07:21:02 AM »
Followed those instructions (Thanks for that) and here's what I encountered...

https://vimeo.com/144198397

Code: [Select]
Last login: Fri Oct 30 23:15:27 on ttys000
Apples-Macintosh-10:~ DeafEyeJedi$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Apples-Macintosh-10:~ DeafEyeJedi$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Failed to locate Homebrew!
Apples-Macintosh-10:~ DeafEyeJedi$

Now I find this really interesting because I managed to get it working on Mac-Mini with the same instructions but for some reason it won't let me on this MBP even though they are both running on latest El Captain.

Goodnight ... Over and Out!

*edit#1*

What the ... after researching some more about Home Brew on the internet (Google is your best friend) and here's what I found...

Code: [Select]
Apples-Macintosh-10:~ DeafEyeJedi$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install )"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1

Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew...
remote: Counting objects: 3803, done.
remote: Compressing objects: 100% (3645/3645), done.
remote: Total 3803 (delta 39), reused 513 (delta 22), pack-reused 0
Receiving objects: 100% (3803/3803), 3.25 MiB | 4.66 MiB/s, done.
Resolving deltas: 100% (39/39), done.
From https://github.com/Homebrew/homebrew
 * [new branch]      master     -> origin/master
HEAD is now at 5ddbedc emacs_requirement: set $EMACS
==> Installation successful!
==> Next steps
Run `brew help` to get started
Apples-Macintosh-10:~ DeafEyeJedi$

Apparently this code was the cure of this whole mess I got myself into on the MBP...

Code: [Select]
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install )"

Thought it'd be worth sharing with you, D as well as for others who may run into this down the road.

*edit#2*

Not so fast... I'm trying to understand what this means here?

[code]GCC has been built with multilib support. Notably, OpenMP may not work:
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670
If you need OpenMP support you may want to
  brew reinstall gcc --without-multilib
==> Summary
5D3.113 • 5D3.123 • EOSM.203 • 7D.203 • 70D.112 • 100D.101

dfort

  • Hero Member
  • *****
  • Posts: 2091
Re: Compiling Magic Lantern on a Macintosh
« Reply #39 on: October 31, 2015, 05:20:09 PM »
I haven't had any problems with that but if you want you could try:

Code: [Select]
brew tap homebrew/dupes; brew install gcc --use-llvm --without-multilib && for f in /usr/local/bin/*-5; do mv -n "$f" "${f/-5/}"; done
You might need to uninstall gcc first.

Of course if it works you don't need to fix it. Paying attention to all the warning messages will drive you crazy--if you aren't there already.
EOSM.202 EOSM.203 EOSM2.103 700D.115 5D3.*

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3045
  • 5D3 / M1 / 7D / 70D / SL1
Re: Compiling Magic Lantern on a Macintosh
« Reply #40 on: October 31, 2015, 06:16:00 PM »
Ran the uninstallation script for GCC
Code: [Select]
brew uninstall gccand then ran the Brew Install script that you suggested (Thanks again for that) and here's what I got so far even tho Terminal is still "rendering" for the longest I've ever seen (in fact it's still running and I see my disk drive space is being used) but not sure where is all of this going into... I don't see GCC in the Root as of yet...

Code: [Select]
Last login: Sat Oct 31 09:50:10 on console
Apples-Macintosh-10:~ DeafEyeJedi$ brew uninstall gcc
Uninstalling /usr/local/Cellar/gcc/5.2.0... (1353 files, 248M)
Apples-Macintosh-10:~ DeafEyeJedi$ brew tap homebrew/dupes; brew install gcc --use-llvm --without-multilib && for f in /usr/local/bin/*-5; do mv -n "$f" "${f/-5/}"; done
Warning: homebrew/dupes already tapped!
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2
==> Downloading from http://gnu.mirror.vexxhost.com/gcc/gcc-5.2.0/gcc-5.2.0.tar.
######################################################################## 100.0%
==> Patching
patching file gcc/jit/Make-lang.in
patching file gcc/jit/jit-playback.c
Hunk #1 succeeded at 2459 with fuzz 2 (offset 43 lines).
==> ../configure --build=x86_64-apple-darwin15.0.0 --prefix=/usr/local/Cellar/gc
==> make bootstrap

I know this is all my fault from the very beginning as soon as I took the GCC Folder from user and deleted into Trash which now I learned that it is a BIG NO NO ... Oops I did it again!

Question -- Am I allowed to closed the Terminal window even while it's still "running" because I don't think this is right?

*edit#1*

Closed the Terminal Window (oops!) and then opened a new Terminal window and ran "Brew Uninstall" again and now this is coming up...

Code: [Select]
Last login: Sat Oct 31 10:04:28 on ttys000
Apples-Macintosh-10:~ DeafEyeJedi$ brew uninstall gcc
Error: No such keg: /usr/local/Cellar/gcc
Apples-Macintosh-10:~ DeafEyeJedi$

Damn it!
5D3.113 • 5D3.123 • EOSM.203 • 7D.203 • 70D.112 • 100D.101

dfort

  • Hero Member
  • *****
  • Posts: 2091
Re: Compiling Magic Lantern on a Macintosh
« Reply #41 on: November 01, 2015, 06:15:24 PM »
It looks like the "--without-multilib" option isn't in the binary gcc distribution so it is building it from the source code. It does take a long time--a very long time. Though not as long as the times I posted for building the cross compiler. Patience is the key word here.

Question -- Am I allowed to closed the Terminal window even while it's still "running" because I don't think this is right?

Actually it was right. Closing the terminal will kill the process. There is a way of running a process in the background by appending an ampersand "&" at the end of a command. You won't be able to see the progress but you'll be able to continue using the terminal. I believe that on OS-X closing the terminal with background processes running will also kill those processes. Anyway, there are lots of tricks you can do with the command line but getting back to the original issue the problem is that the user (that's you DeafEyeJedi) was having a staring contest with the terminal and blinked first.
EOSM.202 EOSM.203 EOSM2.103 700D.115 5D3.*

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3204
  • 60Da / 1100D / EOSM
Re: Compiling Magic Lantern on a Macintosh
« Reply #42 on: November 01, 2015, 08:00:10 PM »
Last time I did it, it took about 3-4 hours to compile gcc.

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3045
  • 5D3 / M1 / 7D / 70D / SL1
Re: Compiling Magic Lantern on a Macintosh
« Reply #43 on: November 01, 2015, 11:28:43 PM »
Ahh, Thanks for the tip @dfort & @dmilligan!

Stared at the screen for literally 24 minutes this time without blinking so somehow I beat Terminal.  8)

Code: [Select]
Last login: Sun Nov  1 10:04:35 on ttys000
Apples-Macintosh-10:~ DeafEyeJedi$ brew tap homebrew/dupes; brew install gcc --use-llvm --without-multilib && for f in /usr/local/bin/*-5; do mv -n "$f" "${f/-5/}"; done
Warning: homebrew/dupes already tapped!
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/gcc-5.2.0.tar.bz2
==> Patching
patching file gcc/jit/Make-lang.in
patching file gcc/jit/jit-playback.c
Hunk #1 succeeded at 2459 with fuzz 2 (offset 43 lines).
==> ../configure --build=x86_64-apple-darwin15.0.0 --prefix=/usr/local/Cellar/gc
==> make bootstrap
==> make install
 /usr/local/Cellar/gcc/5.2.0: 1285 files, 215M, built in 24.6 minutes
5D3.113 • 5D3.123 • EOSM.203 • 7D.203 • 70D.112 • 100D.101

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3045
  • 5D3 / M1 / 7D / 70D / SL1
Re: Compiling Magic Lantern on a Macintosh
« Reply #44 on: November 01, 2015, 11:38:24 PM »
Then once I tried to compile for 7D.203 this is what I'm getting...

Code: [Select]
Apples-Macintosh-10:~ DeafEyeJedi$ cd magic-lantern/platform/7D.203/
Apples-Macintosh-10:7D.203 DeafEyeJedi$ make clean && make zip
[ RM ]  *.o *.d autoexec autoexec.bin magiclantern magiclantern.bin
[ RM ]  7D_203.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
../../Makefile.inc:79: remove /Users/appleuser/magic-lantern/platform/7D.203/zip
[ RM dir ]  /Users/appleuser/magic-lantern/platform/7D.203/zip/
mkdir -p /Users/appleuser/magic-lantern/platform/7D.203/zip
[ CPP      ]   magiclantern.lds
/bin/sh: /Users/appleuser/gcc-arm-none-eabi-4_8-2013q4/bin/arm-none-eabi-gcc-4.8.3: No such file or directory
make: *** [magiclantern.lds] Error 1
Apples-Macintosh-10:7D.203 DeafEyeJedi$

I noticed the gcc wasn't in the Root user so now I was able to locate it through 'Go To Folder' -- now my question is am I allowed to drag the gcc folder into the root directory?



Thanks for the follow-up guys!
5D3.113 • 5D3.123 • EOSM.203 • 7D.203 • 70D.112 • 100D.101

dfort

  • Hero Member
  • *****
  • Posts: 2091
Re: Compiling Magic Lantern on a Macintosh
« Reply #45 on: November 02, 2015, 03:44:07 AM »
You are looking in the wrong directory. Look at what the error message is saying--

Code: [Select]
/bin/sh: /Users/appleuser/gcc-arm-none-eabi-4_8-2013q4/bin/arm-none-eabi-gcc-4.8.3: No such file or directory
You don't have the cross-compiler installed. It is supposed to be in your home directory. Did you miss this step?

Code: [Select]
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
The screenshot you posted is pointing to a completely different compiler in a completely different location--don't move it!
EOSM.202 EOSM.203 EOSM2.103 700D.115 5D3.*

dfort

  • Hero Member
  • *****
  • Posts: 2091
Re: Compiling Magic Lantern on a Macintosh
« Reply #46 on: November 02, 2015, 03:56:09 AM »
Just to make sure you are running the correct gcc type:

Code: [Select]
which gcc
Make sure that it is the one in /usr/local/bin and you might also try:

Code: [Select]
gcc --version
It should return something like:

Code: [Select]
gcc (Homebrew gcc 5.2.0) 5.2.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you get:

Code: [Select]
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.0 (clang-700.1.76)
Target: x86_64-apple-darwin15.0.0
Thread model: posix

That's the Apple (clang) compiler.
EOSM.202 EOSM.203 EOSM2.103 700D.115 5D3.*

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3045
  • 5D3 / M1 / 7D / 70D / SL1
Re: Compiling Magic Lantern on a Macintosh
« Reply #47 on: November 02, 2015, 05:16:32 PM »
Well done, Daniel!  :D

Code: [Select]
Apples-Macintosh-10:~ DeafEyeJedi$ 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
--2015-11-02 08:08:30--  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
Resolving launchpad.net... 91.189.89.222, 91.189.89.223
Connecting to launchpad.net|91.189.89.222|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://launchpadlibrarian.net/162333029/gcc-arm-none-eabi-4_8-2013q4-20131218-mac.tar.bz2 [following]
--2015-11-02 08:08:32--  https://launchpadlibrarian.net/162333029/gcc-arm-none-eabi-4_8-2013q4-20131218-mac.tar.bz2
Resolving launchpadlibrarian.net... 91.189.89.228, 91.189.89.229
Connecting to launchpadlibrarian.net|91.189.89.228|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 65325285 (62M) [application/x-tar]
Saving to: 'gcc-arm-none-eabi-4_8-2013q4-20131218-mac.tar.bz2'

gcc-arm-none-eabi-4_8-2013 100%[=========================================>]  62.30M  2.51MB/s   in 51s   

2015-11-02 08:09:25 (1.22 MB/s) - 'gcc-arm-none-eabi-4_8-2013q4-20131218-mac.tar.bz2' saved [65325285/65325285]

Apples-Macintosh-10:~ DeafEyeJedi$ which gcc
/usr/local/bin/gcc
Apples-Macintosh-10:~ DeafEyeJedi$ gcc --version
gcc (Homebrew gcc 5.2.0 --without-multilib) 5.2.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

So to understand this more thoroughly -- do I still keep the first gcc that i installed from the source yesterday (the one that took 24 minutes) in their respective places as well as keeping this one gcc I just installed 5 minutes ago in the root directory at the same time?

I'm only asking because the first time i got gcc working before I messed up -- I don't recall myself having to install gcc from the source or was that done automatically?

Sorry for the questions but hey it's def better than having to assume for the worse... right?  :P

Thank you very much once again, sir!
5D3.113 • 5D3.123 • EOSM.203 • 7D.203 • 70D.112 • 100D.101

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3204
  • 60Da / 1100D / EOSM
Re: Compiling Magic Lantern on a Macintosh
« Reply #48 on: November 02, 2015, 05:44:51 PM »
There are two different compilers, but they are both 'gcc'. One of them is to compile stuff for your computer (which has an intel processor), and one of them is to compile stuff for the camera (which has an ARM processor). You need both of them, and you need to keep them both where they are. Do not move stuff around.

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3045
  • 5D3 / M1 / 7D / 70D / SL1
Compiling Magic Lantern on a Macintosh
« Reply #49 on: November 02, 2015, 05:49:37 PM »
Okay thanks for the clarifications, David, now this leads me to another unexpected question only because when I set to compile a certain camera model (by using Daniel's fork) and now every Module is showing this...

Code: [Select]
********************************************************
WARNING: module arkanoid failed to build, deleting
********************************************************

[ RM ]  arkanoid.o arkanoid.mo arkanoid.sym arkanoid.dep module_strings.h *.o *.d *.dep *.sym hgstamp

Code: [Select]
********************************************************
WARNING: module silent failed to build, deleting
********************************************************

[ RM ]  silent.o silent.mo silent.sym silent.dep module_strings.h *.o *.d *.dep *.sym hgstamp

Code: [Select]
********************************************************
WARNING: module mlv_play failed to build, deleting
********************************************************

[ RM ]  mlv_play.o video.bmp.rsc mlv_play.mo mlv_play.sym mlv_play.dep module_strings.h *.o *.d *.dep *.sym hgstamp

... and so on for the rest -- does this mean anything to you guys?



Also I am unable to post the entire Terminal report because it's more than the limited requirement for this Forum to allow such posting.
5D3.113 • 5D3.123 • EOSM.203 • 7D.203 • 70D.112 • 100D.101