can't "make" on OS Mavericks - anyone able to help me?

Started by viniciusatique, February 06, 2014, 02:08:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

viniciusatique

I've followed the tutorial from http://magiclantern.wikia.com/wiki/Magic_Lantern_Development_on_Mac up to the point where I was supposed to compile. Instead of his repo, I cloned the unified from bitbucket.

Tried to use coutts makefile but then I get this error: make: *** No rule to make target `500d-empty.fir', needed by `magiclantern.fir'.  Stop.

Then I tried to edit the makefile that came with the bitbucket clone. After editing the paths I left everything else as was and I get this error:

[ AS       ]   entry.o
/bin/sh: /Users/viniciusatique/yagarto/yagarto-4.7.2/bin/arm-none—eabi-gcc-4.7.2: No such file or directory
make: *** [entry.o] Error 127

But my make file is like this:

ARM_PATH=~/yagarto/yagarto-4.7.2
ARM_BINPATH=$(ARM_PATH)/bin
GCC_VERSION=4.7.2
CC=$(ARM_BINPATH)/arm-none—eabi-gcc-4.7.2
OBJCOPY=$(ARM_BINPATH)/arm-none-eabi-objcopy
AR=$(ARM_BINPATH)/arm-none-eabi-ar
RANLIB=$(ARM_BINPATH)/arm-none-eabi-ranlib
LD=$(CC)
HOST_CC=gcc
HOST_CFLAGS=-O3 -W -Wall

Can someone help me?

dmilligan

looks like you put one too many "-" between the none and eabi of arm-none—eabi-gcc-4.7.2

viniciusatique

that seems to have done the trick. Thanks!

But now I get this:

[ CPP      ]   magiclantern.lds
[ AS       ]   entry.o
[ CC       ]   init.o
[ AS       ]   stubs-5d2.208.o
[ VERSION  ]   version.c
/bin/sh: hg: command not found
[ CC       ]   version.o
[ CC       ]   stdio.o
stdio.c: In function 'realloc':
stdio.c:277:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[ CC       ]   config.o
[ CC       ]   debug.o
debug.c: In function 'call_setprintmovielog':
debug.c:169:2: warning: format '%d' expects argument of type 'int', but argument 7 has type 'int32_t' [-Wformat]
debug.c:187:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'int32_t' [-Wformat]
debug.c:187:2: warning: format '%d' expects argument of type 'int', but argument 6 has type 'int32_t' [-Wformat]
debug.c:196:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'int32_t' [-Wformat]
debug.c:196:2: warning: format '%d' expects argument of type 'int', but argument 6 has type 'int32_t' [-Wformat]
debug.c:196:2: warning: format '%d' expects argument of type 'int', but argument 7 has type 'int32_t' [-Wformat]
debug.c:196:2: warning: format '%d' expects argument of type 'int', but argument 8 has type 'int32_t' [-Wformat]
debug.c:196:2: warning: format '%d' expects argument of type 'int', but argument 9 has type 'int32_t' [-Wformat]
debug.c:201:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'int32_t' [-Wformat]
debug.c:201:2: warning: format '%d' expects argument of type 'int', but argument 6 has type 'int32_t' [-Wformat]
debug.c:206:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'int32_t' [-Wformat]
debug.c:206:2: warning: format '%d' expects argument of type 'int', but argument 6 has type 'int32_t' [-Wformat]
debug.c:159:13: warning: unused variable 'div' [-Wunused-variable]
debug.c:158:9: warning: unused variable 'mvrSetQScale' [-Wunused-variable]
debug.c:157:9: warning: unused variable 'mvrFixQScale' [-Wunused-variable]
debug.c:156:9: warning: unused variable 'mvrSetBitRate' [-Wunused-variable]
debug.c:155:10: warning: unused variable 'bps' [-Wunused-variable]
debug.c: In function 'efic_temp_display':
debug.c:249:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'uint32_t' [-Wformat]
debug.c: At top level:
debug.c:351:3: warning: initialization from incompatible pointer type [enabled by default]
debug.c:351:3: warning: (near initialization for 'debug_menus[4].select') [enabled by default]
debug.c: In function 'debug_property_handler':
debug.c:433:2: warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'long unsigned int' [-Wformat]
debug.c:433:2: warning: format '%x' expects argument of type 'unsigned int', but argument 8 has type 'long unsigned int' [-Wformat]
debug.c:433:2: warning: format '%x' expects argument of type 'unsigned int', but argument 9 has type 'long unsigned int' [-Wformat]
debug.c:433:2: warning: format '%x' expects argument of type 'unsigned int', but argument 10 has type 'long unsigned int' [-Wformat]
debug.c:433:2: warning: format '%x' expects argument of type 'unsigned int', but argument 11 has type 'long unsigned int' [-Wformat]
debug.c:433:2: warning: format '%x' expects argument of type 'unsigned int', but argument 12 has type 'long unsigned int' [-Wformat]
debug.c: At top level:
debug.c:606:1: warning: initialization from incompatible pointer type [enabled by default]
debug.c:606:1: warning: (near initialization for 'task_create_movie_start.entry') [enabled by default]
[ CC       ]   menu.o
menu.c: In function 'menu_handler':
menu.c:516:2: warning: case value '1' not in enumerated type 'gui_event_t' [-Wswitch]
menu.c:520:2: warning: case value '268435590' not in enumerated type 'gui_event_t' [-Wswitch]
[ CC       ]   property.o
[ MKFONT   ]   font-med.c
[ CC       ]   font-med.o
[ MKFONT   ]   font-small.c
[ CC       ]   font-small.o
[ CC       ]   gui.o
[ CC       ]   bootflags.o
[ CC       ]   bmp.o
[ CC       ]   focus.o
[ CC       ]   lens.o
[ CC       ]   spotmeter.o
[ CC       ]   audio.o
[ CC       ]   zebra.o
[ CC       ]   hotplug.o
[ CC       ]   ptp.o
[ CC       ]   bracket.o
make: *** No rule to make target `/opt/local/arm-elf/lib/libc.a', needed by `lib_a-setjmp.o'.  Stop.

I used the makefile that came from the hudson clone and modified the paths. Did I do anything wrong?

dmilligan

this is what I came up with to get the compiler working on mac, the only issue you might have is truncate, not sure if I ever got that one solved (check the lines where I setup the PATH settings in this script), but you can try this if you like (if you already cloned ML repo to ~/magic-lantern):


#!/bin/bash
cd
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
curl -OL https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q2-update/+download/gcc-arm-none-eabi-4_7-2013q2-20130614-mac.tar.bz2
bzip2 -d gcc-arm-none-eabi-4_7-2013q2-20130614-mac.tar.bz2
tar -x -f gcc-arm-none-eabi-4_7-2013q2-20130614-mac.tar
brew doctor
brew update
brew install hg
hg clone -b unified https://bitbucket.org/hudson/magic-lantern
brew install coreutils
cd magic-lantern
curl -OL https://bitbucket.org/dmilligan/magic-lantern/downloads/Makefile.user
export PATH="$PATH:$(brew --prefix coreutils)/libexec/gnubin"
echo "export PATH=\"\$PATH:\$(brew --prefix coreutils)/libexec/gnubin\"" >> ~/.bash_profile
make clean
make

viniciusatique

thanks again.

tried your script

got these errors in response

MacBook-Air-de-Vinicius-Atique:~ viniciusatique$ #!/bin/bash
MacBook-Air-de-Vinicius-Atique:~ viniciusatique$ cd
MacBook-Air-de-Vinicius-Atique:~ viniciusatique$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
-e:6: syntax error, unexpected '<'
<!DOCTYPE html>
^
-e:7: syntax error, unexpected '<'
<html>
^
-e:9: syntax error, unexpected '<'
    <meta charset='utf-8'>
     ^
-e:10: syntax error, unexpected '<'
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
     ^
-e:10: syntax error, unexpected tIDENTIFIER, expecting end-of-input
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
                                              ^
MacBook-Air-de-Vinicius-Atique:~ viniciusatique$ curl -OL https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q2-update/+download/gcc-arm-none-eabi-4_7-2013q2-20130614-mac.tar.bz2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100 62.5M  100 62.5M    0     0   157k      0  0:06:45  0:06:45 --:--:--  220k
MacBook-Air-de-Vinicius-Atique:~ viniciusatique$ bzip2 -d gcc-arm-none-eabi-4_7-2013q2-20130614-mac.tar.bz2
MacBook-Air-de-Vinicius-Atique:~ viniciusatique$ tar -x -f gcc-arm-none-eabi-4_7-2013q2-20130614-mac.tar
MacBook-Air-de-Vinicius-Atique:~ viniciusatique$ brew doctor
-bash: brew: command not found
MacBook-Air-de-Vinicius-Atique:~ viniciusatique$ brew update
-bash: brew: command not found
MacBook-Air-de-Vinicius-Atique:~ viniciusatique$ brew install hg
-bash: brew: command not found
MacBook-Air-de-Vinicius-Atique:~ viniciusatique$ hg clone -b unified https://bitbucket.org/hudson/magic-lantern
-bash: hg: command not found
MacBook-Air-de-Vinicius-Atique:~ viniciusatique$ brew install coreutils
-bash: brew: command not found
MacBook-Air-de-Vinicius-Atique:~ viniciusatique$ cd magic-lantern
MacBook-Air-de-Vinicius-Atique:magic-lantern viniciusatique$ curl -OL https://bitbucket.org/dmilligan/magic-lantern/downloads/Makefile.user
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100   375  100   375    0     0    253      0  0:00:01  0:00:01 --:--:--     0
MacBook-Air-de-Vinicius-Atique:magic-lantern viniciusatique$ export PATH="$PATH:$(brew --prefix coreutils)/libexec/gnubin"
-bash: brew: command not found
MacBook-Air-de-Vinicius-Atique:magic-lantern viniciusatique$ echo "export PATH=\"\$PATH:\$(brew --prefix coreutils)/libexec/gnubin\"" >> ~/.bash_profile
MacBook-Air-de-Vinicius-Atique:magic-lantern viniciusatique$ make clean
rm -f \
      *.o \
      *.a \
      .*.d \
      font-*.c \
      magiclantern.lds \
      ./lua/*.o \
      ./lua/.*.d \

MacBook-Air-de-Vinicius-Atique:magic-lantern viniciusatique$ make

viniciusatique

Nevermind that. Installed home-brew by hand and after did everything else on your script. Edited some addresses on your makefile.user. Kept saying the arm-elf didn't exist. Edited Makefile with the same paths as in makefile.user.
Now it seems to find the armtool but returned this same error:

MacBook-Air-de-Vinicius-Atique:magic-lantern viniciusatique$ make
[ CPP      ]   magiclantern.lds
[ AS       ]   entry.o
[ CC       ]   init.o
[ AS       ]   stubs-5d2.208.o
[ VERSION  ]   version.c
[ CC       ]   version.o
[ CC       ]   stdio.o
stdio.c: In function 'realloc':
stdio.c:277:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[ CC       ]   config.o
[ CC       ]   debug.o
debug.c: In function 'call_setprintmovielog':
debug.c:169:2: warning: format '%d' expects argument of type 'int', but argument 7 has type 'int32_t' [-Wformat]
debug.c:187:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'int32_t' [-Wformat]
debug.c:187:2: warning: format '%d' expects argument of type 'int', but argument 6 has type 'int32_t' [-Wformat]
debug.c:196:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'int32_t' [-Wformat]
debug.c:196:2: warning: format '%d' expects argument of type 'int', but argument 6 has type 'int32_t' [-Wformat]
debug.c:196:2: warning: format '%d' expects argument of type 'int', but argument 7 has type 'int32_t' [-Wformat]
debug.c:196:2: warning: format '%d' expects argument of type 'int', but argument 8 has type 'int32_t' [-Wformat]
debug.c:196:2: warning: format '%d' expects argument of type 'int', but argument 9 has type 'int32_t' [-Wformat]
debug.c:201:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'int32_t' [-Wformat]
debug.c:201:2: warning: format '%d' expects argument of type 'int', but argument 6 has type 'int32_t' [-Wformat]
debug.c:206:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'int32_t' [-Wformat]
debug.c:206:2: warning: format '%d' expects argument of type 'int', but argument 6 has type 'int32_t' [-Wformat]
debug.c:159:13: warning: unused variable 'div' [-Wunused-variable]
debug.c:158:9: warning: unused variable 'mvrSetQScale' [-Wunused-variable]
debug.c:157:9: warning: unused variable 'mvrFixQScale' [-Wunused-variable]
debug.c:156:9: warning: unused variable 'mvrSetBitRate' [-Wunused-variable]
debug.c:155:10: warning: unused variable 'bps' [-Wunused-variable]
debug.c: In function 'efic_temp_display':
debug.c:249:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'uint32_t' [-Wformat]
debug.c: At top level:
debug.c:351:3: warning: initialization from incompatible pointer type [enabled by default]
debug.c:351:3: warning: (near initialization for 'debug_menus[4].select') [enabled by default]
debug.c: In function 'debug_property_handler':
debug.c:433:2: warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'long unsigned int' [-Wformat]
debug.c:433:2: warning: format '%x' expects argument of type 'unsigned int', but argument 8 has type 'long unsigned int' [-Wformat]
debug.c:433:2: warning: format '%x' expects argument of type 'unsigned int', but argument 9 has type 'long unsigned int' [-Wformat]
debug.c:433:2: warning: format '%x' expects argument of type 'unsigned int', but argument 10 has type 'long unsigned int' [-Wformat]
debug.c:433:2: warning: format '%x' expects argument of type 'unsigned int', but argument 11 has type 'long unsigned int' [-Wformat]
debug.c:433:2: warning: format '%x' expects argument of type 'unsigned int', but argument 12 has type 'long unsigned int' [-Wformat]
debug.c: At top level:
debug.c:606:1: warning: initialization from incompatible pointer type [enabled by default]
debug.c:606:1: warning: (near initialization for 'task_create_movie_start.entry') [enabled by default]
[ CC       ]   menu.o
menu.c: In function 'menu_handler':
menu.c:516:2: warning: case value '1' not in enumerated type 'gui_event_t' [-Wswitch]
menu.c:520:2: warning: case value '268435590' not in enumerated type 'gui_event_t' [-Wswitch]
[ CC       ]   property.o
[ MKFONT   ]   font-med.c
[ CC       ]   font-med.o
[ MKFONT   ]   font-small.c
[ CC       ]   font-small.o
[ CC       ]   gui.o
[ CC       ]   bootflags.o
[ CC       ]   bmp.o
[ CC       ]   focus.o
[ CC       ]   lens.o
[ CC       ]   spotmeter.o
[ CC       ]   audio.o
[ CC       ]   zebra.o
[ CC       ]   hotplug.o
[ CC       ]   ptp.o
[ CC       ]   bracket.o
make: *** No rule to make target `/opt/local/arm-elf/lib/libc.a', needed by `lib_a-setjmp.o'.  Stop.
MacBook-Air-de-Vinicius-Atique:magic-lantern viniciusatique$

I really haven't got a clue. :-/

viniciusatique

Figured it out!
Was trying to user MacHG to clone the magic-lantern unified. DO NOT DO THAT. It comes incomplete. Use the command line. Everything working now. For anyone wanting to compile on Mac OS Mavericks do this:

Install Xcode from the appstore

follow this:
http://hackercodex.com/guide/mac-osx-mavericks-10.9-configuration/

now type these lines from dmilligan:

curl -OL https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q2-update/+download/gcc-arm-none-eabi-4_7-2013q2-20130614-mac.tar.bz2
bzip2 -d gcc-arm-none-eabi-4_7-2013q2-20130614-mac.tar.bz2
tar -x -f gcc-arm-none-eabi-4_7-2013q2-20130614-mac.tar
brew install hg
hg clone -b unified https://bitbucket.org/hudson/magic-lantern
brew install coreutils
cd magic-lantern
curl -OL https://bitbucket.org/dmilligan/magic-lantern/downloads/Makefile.user
export PATH="$PATH:$(brew --prefix coreutils)/libexec/gnubin"
echo "export PATH=\"\$PATH:\$(brew --prefix coreutils)/libexec/gnubin\"" >> ~/.bash_profile
make clean
make

edit whatever you have to edit from Makefile.user and voila! Happy building

Thanks again to dmilligan for all the help :D


dmilligan

I think you might have just been in the wrong branch, but you do need the command line hg installed anyway.

that's strange that the homebrew installation didn't work in my script
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
came straight from the homebrew website, they must have changed it

viniciusatique

apparently it was directing to an html. Anyways, it's working now. Thanks again

mofig

Hey guys, I got around to updating the wiki page for mac development, Right now it covers just the basic install process. I plan on adding in some sections about using bitbucket (branching, pull requests, etc) although maybe that should be it's own page since it applies to everybody.
Please check it out and let me know if I missed anything:  http://magiclantern.wikia.com/wiki/Magic_Lantern_Development_on_Mac

dmilligan

you need to remove the line LD=$(CC) from makefile.user

also you can take out UMOUNT=echo I just did that b/c at the time 'make install' was working a little screwy, but it's fine now, and it's nice to actually have the SD card unmounted automatically.