Need help compiling on mac

Started by stevefal, August 28, 2013, 07:53:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

stevefal

I'm trying to build on mac. I've gotten this far. Any ideas?

  $ make
  make -C  /Users/steve/magic-lantern/platform/5D3.113
  [ VERSION  ]   ../../platform/5D3.113/version.bin
  make[1]: truncate: No such file or directory
  make[1]: *** [../../platform/5D3.113/version.bin] Error 1
  make: *** [5D3] Error 2

The only lines I've so far changed in makefile.user are

  SUPPORTED_MODELS:=5D3
  GCC_VERSION=-4.7.2
  ARM_PATH=~/yagarto/yagarto-4.7.2

My PATH contains:

  /Users/steve/yagarto/yagarto-4.7.2/bin:/Users/steve/yagarto/yagarto-4.7.2/tools:/opt/local/bin:/opt/local/sbin
Steve Falcon

kichetof

You need to install truncate ;)

stevefal

Well, sure.. Which truncate from where?
Steve Falcon

Francis

I used MacPorts to install truncate. You might have to also remove the -s flag after the truncate command in makefile.src

stevefal

I installed MacPorts, but it has no truncate - not as an executable anyway.

/opt/local/bin and /opt/local/sbin are the MacPorts PATH entries.
Steve Falcon

kichetof


stevefal

Steve Falcon

stevefal

Getting further...

  make docq
  cd /Users/steve/magic-lantern/platform/all; make docq
  cd ../../doc && RST2LATEX=rst2latex.py python2 mkdoc.py
  /bin/sh: python2: command not found
  make[1]: *** [docq] Error 127
  make: *** [docq] Error 2

Is there a particular Python I need to install? I thought that Mac has python installed by default.
Steve Falcon

stevefal

Ok, got past that by setting in Makefile.user:

  PYTHON=python2.7

Installed montage with "sudo port install montage" but still:

  make docq
  cd /Users/steve/magic-lantern/platform/all; make docq
  cd ../../doc && RST2LATEX=rst2latex.py python2.7 mkdoc.py
  sh: montage: command not found
  make[1]: *** [docq] Error 1
  make: *** [docq] Error 2

Steve Falcon

Marsu42

Quote from: stevefal on August 29, 2013, 12:58:59 AM
  make docq

I never managed to build docq on Windows cygwin/msys/mingw either - rest assured, you will run into even more problems further down the road.

My advice: Ignore it, the main ml binary & modules are compiles without the doc, and if you really want to produce a complete distribution zip package use a vm like virtualbox with some stable linux like debian stable, ubuntu lts or centos so you just have to set it up once.

RenatoPhoto

http://www.pululahuahostal.com  |  EF 300 f/4, EF 100-400 L, EF 180 L, EF-S 10-22, Samyang 14mm, Sigma 28mm EX DG, Sigma 8mm 1:3.5 EX DG, EF 50mm 1:1.8 II, EF 1.4X II, Kenko C-AF 2X

stevefal

Quote from: Marsu42 on August 29, 2013, 10:15:54 AM
My advice: Ignore it...

How? The Make fails like this:

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

[ CC       ]   menuindex.o
../../src/menuindex.c:108:42: fatal error: menuindexentries.h: No such file or directory
compilation terminated.
make[1]: *** [menuindex.o] Error 1
make: *** [5D3] Error 2


Steve Falcon

stevefal

Quote from: RenatoPhoto on August 29, 2013, 12:40:01 PM
I used VM, finally no more bugs and all my problems solved:
http://www.magiclantern.fm/forum/index.php?topic=7579.0

Thanks, I'll try that route if I can't get any further.
Steve Falcon

wolf

Where did you get your source from? Did you clone it with "hg clone -r unified https://bitbucket.org/hudson/magic-lantern" ?
Have you tried  "make 5D3" ?

Marsu42

Quote from: stevefal on August 29, 2013, 04:57:19 PM
How? The Make fails like this:

Yes, but you can circumvent it by compiling the core & modules expicitly:


make 60D # or whatever your camera is
cd modules
make
cd ..
mkdir -p ../dist/ml/modules
rm -f ../dist/ml/modules/*.mo
mv platform/60D.111/autoexec.bin ../dist
mv platform/60D.111/60D_111.sym ../dist/ml/modules/
mv modules/*/*.mo ../dist/ml/modules

stevefal

Quote from: wolf on August 29, 2013, 05:49:25 PM
Where did you get your source from? Did you clone it with "hg clone -r unified https://bitbucket.org/hudson/magic-lantern" ?
Have you tried  "make 5D3" ?

Yes on both, that's when I get the error:

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

[ CC       ]   menuindex.o
../../src/menuindex.c:108:42: fatal error: menuindexentries.h: No such file or directory
compilation terminated.
make[1]: *** [menuindex.o] Error 1
make: *** [5D3] Error 2
Steve Falcon

stevefal

Quote from: Marsu42 on August 29, 2013, 06:14:49 PM
Yes, but you can circumvent it by compiling the core & modules expicitly:

I get the 'menuindexentries.h: No such file or directory' error on the first step, e.g. "make 5D3" or "make 60D"

And yes, trying to make docq leads to a wormhole.
Steve Falcon

wolf

do you use the cloned source code?

stevefal

Yes, if I'm understanding correctly. I'm using the code fetched with "hg clone -r unified https://bitbucket.org/hudson/magic-lantern"
Steve Falcon

wolf

My menuindexentries.h is an empty file in my source code. You could try to add an empty file with this name to ../src/ .
And wait for the next error ;-) It looks like you dont't have it.

stevefal

Yeah, 'make clean' removes it too. Adding the empty file got me further but still no dice - lots of spew but no clear error and no bins.
Steve Falcon

Francis

Yea, I had to make that file also. FYI, the command 'touch whatfileyouneed.h' will create a file of that name with no content, rather than saving an empty text doc or something like that. What is your error now?

wolf

Quotelots of spew but no clear error and no bins.
Can you post it?
It's important to see where the compilation fails.

There is no need to generate the doc in order to get a binary. See my output.


...
[ 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       ]   menuindex.o
[ CC       ]   af_patterns.o
[ CC       ]   focus.o
[ CC       ]   notify_box.o
[ CC       ]   bootflags.o
[ CC       ]   dialog_test.o
...

stevefal

Without making an empty menuindexentries.h I get:

make
make -C  /Users/steve/ml/magic-lantern/platform/5D3.113
[ VERSION  ]   ../../platform/5D3.113/version.bin
[ CPP      ]   magiclantern.lds
[ AS       ]   ../../platform/5D3.113/stubs.o
[ VERSION  ]   ../../platform/5D3.113/version.c
[ CC       ]   version.o
[ CC       ]   boot-hack.o
[ CC       ]   ico.o
[ CC       ]   edmac.o
[ CC       ]   menu.o
[ CC       ]   debug.o
../../src/debug.c:4596:12: warning: 'zoom_in_pressed' defined but not used [-Wunused-variable]
[ CC       ]   cfn.o
[ CC       ]   gui.o
[ CC       ]   picstyle.o
[ CC       ]   exmem.o
[ CC       ]   bmp.o
../../src/bmp.c: In function 'bmp_puts':
../../src/bmp.c:388:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[ CC       ]   font-dyn.o
[ CC       ]   config.o
../../src/config.c: In function 'config_var_lookup':
../../src/config.c:362:5: warning: return makes pointer from integer without a cast [enabled by default]
[ CC       ]   stdio.o
[ CC       ]   bitrate-5d3.o
[ CC       ]   lcdsensor.o
[ CC       ]   tweaks.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       ]   menuindex.o
../../src/menuindex.c:108:42: fatal error: menuindexentries.h: No such file or directory
compilation terminated.
make[1]: *** [menuindex.o] Error 1
make: *** [5D3] Error 2


If I create an empty menuindexentries.h I get:

make
make -C  /Users/steve/ml/magic-lantern/platform/5D3.113
[ VERSION  ]   ../../platform/5D3.113/version.bin
[ VERSION  ]   ../../platform/5D3.113/version.c
[ CC       ]   version.o
[ CC       ]   menuindex.o
[ CC       ]   focus.o
[ CC       ]   notify_box.o
[ CC       ]   dialog_test.o
[ CC       ]   vram.o
[ CC       ]   aj_port.o
[ CC       ]   fps-engio.o
[ CC       ]   shoot.o
../../src/shoot.c: In function 'display_shooting_info_lv':
../../src/shoot.c:6055:9: warning: unused variable 'audio_meters_at_top' [-Wunused-variable]
[ 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
[ CC       ]   beep.o
[ CC       ]   crop-mode-hack.o
[ CC       ]   ph_info_disp.o
[ CC       ]   flexinfo.o
[ CC       ]   fileprefix.o
[ CC       ]   console.o
[ CC       ]   tcc-glue.o
../../src/tcc-glue.c: In function 'open':
../../src/tcc-glue.c:64:5: warning: passing argument 2 of 'FIO_GetFileSize' from incompatible pointer type [enabled by default]
In file included from ../../src/tcc-glue.c:9:0:
../../src/dryos.h:532:12: note: expected 'uint32_t *' but argument is of type 'unsigned int *'
../../src/tcc-glue.c: In function 'read':
../../src/tcc-glue.c:97:5: warning: passing argument 2 of 'memcpy' makes pointer from integer without a cast [enabled by default]
In file included from ../../src/tcc-glue.c:9:0:
../../src/dryos.h:549:15: note: expected 'const void *' but argument is of type 'long unsigned int'
../../src/tcc-glue.c: In function 'close':
../../src/tcc-glue.c:105:5: warning: passing argument 1 of 'free_dma_memory' makes pointer from integer without a cast [enabled by default]
In file included from ../../src/tcc-glue.c:9:0:
../../src/dryos.h:557:13: note: expected 'const void *' but argument is of type 'int'
../../src/tcc-glue.c: In function 'fputc':
../../src/tcc-glue.c:158:1: warning: number of arguments doesn't match built-in prototype [enabled by default]
make -C ../../tcc
make[2]: Nothing to be done for `all'.
[ CC       ]   module.o
../../src/module.c: In function 'module_get_symbol':
../../src/module.c:573:5: warning: return makes integer from pointer without a cast [enabled by default]
[ CC       ]   video_hacks.o
[ CC       ]   fio-5d3.o
[ CC       ]   misc.o
[ CC       ]   afma.o
../../src/afma.c: In function 'afma_auto_tune_automatic':
../../src/afma.c:362:9: warning: 'return' with a value, in function returning void [enabled by default]
[ CC       ]   raw.o
[ CC       ]   chdk-dng.o
[ CC       ]   edmac-memcpy.o
../../src/edmac-memcpy.c: In function 'edmac_memcpy_init':
../../src/edmac-memcpy.c:52:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../../src/edmac-memcpy.c:56:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../../src/edmac-memcpy.c:67:9: warning: passing argument 1 of 'CreateResLockEntry' from incompatible pointer type [enabled by default]
In file included from ../../src/edmac-memcpy.c:3:0:
../../src/edmac.h:73:19: note: expected 'uint32_t *' but argument is of type 'int *'
../../src/edmac-memcpy.c: In function 'edmac_memcpy_res_lock':
../../src/edmac-memcpy.c:94:9: warning: 'return' with a value, in function returning void [enabled by default]
../../src/edmac-memcpy.c: In function 'edmac_memset':
../../src/edmac-memcpy.c:208:5: warning: passing argument 1 of 'memset' makes pointer from integer without a cast [enabled by default]
In file included from ../../src/edmac-memcpy.c:2:0:
../../src/dryos.h:51:15: note: expected 'void *' but argument is of type 'long unsigned int'
../../src/edmac-memcpy.c:211:5: warning: passing argument 1 of 'edmac_copy_rectangle_adv_start' makes pointer from integer without a cast [enabled by default]
../../src/edmac-memcpy.c:107:7: note: expected 'void *' but argument is of type 'long unsigned int'
../../src/edmac-memcpy.c:211:5: warning: passing argument 2 of 'edmac_copy_rectangle_adv_start' makes pointer from integer without a cast [enabled by default]
../../src/edmac-memcpy.c:107:7: note: expected 'void *' but argument is of type 'long unsigned int'
../../src/edmac-memcpy.c:220:9: warning: passing argument 1 of 'memset' makes pointer from integer without a cast [enabled by default]
In file included from ../../src/edmac-memcpy.c:2:0:
../../src/dryos.h:51:15: note: expected 'void *' but argument is of type 'long unsigned int'
[ CC       ]   asm.o
../../src/asm.c: In function 'seems_to_be_string':
../../src/asm.c:22:15: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
../../src/asm.c: In function 'asm_guess_func_name_from_string':
../../src/asm.c:36:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[ AR       ]   strrchr.o
[ AR       ]   dietlibc.a
[ AR       ]   lib_a-setjmp.o
[ AR       ]   newlib-libc.a
[ LD       ]   magiclantern
dietlibc.a(vsscanf.o): In function `vsscanf':
vsscanf.c:(.text+0x5c): warning: warning: the scanf functions add several kilobytes of bloat.
dietlibc.a(sprintf.o): In function `sprintf':
sprintf.c:(.text+0x14): warning: warning: Avoid *sprintf; use *snprintf. It is more secure.
/Users/steve/mltools/yagarto/yagarto-4.7.2/bin/../lib/gcc/arm-none-eabi/4.7.2/libgcc.a(unwind-arm.o): In function `unwind_phase2':
/Users/mfischer/Projects/yagarto/gcc-build/arm-none-eabi/libgcc/../../../gcc-4.7.2/libgcc/unwind-arm-common.inc:289: undefined reference to `abort'
/Users/steve/mltools/yagarto/yagarto-4.7.2/bin/../lib/gcc/arm-none-eabi/4.7.2/libgcc.a(unwind-arm.o): In function `__gnu_Unwind_Resume':
/Users/mfischer/Projects/yagarto/gcc-build/arm-none-eabi/libgcc/../../../gcc-4.7.2/libgcc/unwind-arm-common.inc:487: undefined reference to `abort'
/Users/mfischer/Projects/yagarto/gcc-build/arm-none-eabi/libgcc/../../../gcc-4.7.2/libgcc/unwind-arm-common.inc:505: undefined reference to `abort'
/Users/steve/mltools/yagarto/yagarto-4.7.2/bin/../lib/gcc/arm-none-eabi/4.7.2/libgcc.a(pr-support.o): In function `_Unwind_GetDataRelBase':
/Users/mfischer/Projects/yagarto/gcc-build/arm-none-eabi/libgcc/../../../gcc-4.7.2/libgcc/config/arm/pr-support.c:394: undefined reference to `abort'
/Users/steve/mltools/yagarto/yagarto-4.7.2/bin/../lib/gcc/arm-none-eabi/4.7.2/libgcc.a(pr-support.o): In function `_Unwind_GetTextRelBase':
/Users/mfischer/Projects/yagarto/gcc-build/arm-none-eabi/libgcc/../../../gcc-4.7.2/libgcc/config/arm/pr-support.c:400: undefined reference to `abort'
collect2: error: ld returned 1 exit status
make[1]: *** [magiclantern] Error 1
make: *** [5D3] Error 2

Steve Falcon