Author Topic: Built ML toolchain and hello.c but can't build ML  (Read 4236 times)

vtrandal

  • New to the forum
  • *
  • Posts: 44
Built ML toolchain and hello.c but can't build ML
« on: July 31, 2012, 01:15:09 AM »
This is based on the instructions provided at http://www.magiclantern.fm/develop
When I refer to the instructions I mean the instructions at the above page and it's subpages.

Step 1. Get the source code. I got it just like it says below so I don't have to do ""hg update unified" later.
hg clone -r unified https://bitbucket.org/hudson/magic-lantern

Step 2. Setup up the compiler. Here I did things a little differently
- I skipped downloading summon-arm because it's in the ML source code toolchain folder.
- I downloaded and executed prepare.ubuntu.sh (but this is also in the ML source code toolchain folder ???)
- In ~/magic-lantern/toolchain I edited summon-arm and added the --no-passive-ftp parameter to the wget line per the instructions.
- I ran summon-arm as follows: ./summon-arm SUDO=sudo (when it needed root privileges I gave it the root password)
- I tested the toolchain by building the hello.c per the instructions.
- I added ~/arm-toolchain462/bin to my PATH
- I tried running make in the ~/magic-lantern folder as follows: make, make clean, make (but make encountered errors and failed each time)
- I also tried running make 600D as follows: make 600D, make clean, make 600D (but again make encountered errors and failed each time)

At this point I'm not sure my ML toolchain build is valid because it should just build ML with no problem right?

But... I did only glance through the summon-arm README without making any changes because I thought all that would be covered by downloading and running prepare.ubuntu.sh ... I have little idea what or where to set all those things to in the README

Here's the entire output with errors that I get with running make:
vtrandal@vtrandal-android:~/magic-lantern$ make
make -C /home/vtrandal/magic-lantern/platform/60D.111
make[1]: Entering directory `/home/vtrandal/magic-lantern/platform/60D.111'
[ CPP      ]   magiclantern.lds
[ AS       ]   ../../src/entry.o
[ CC       ]   boot-hack.o
[ AS       ]   stubs.o
[ VERSION  ]   ../../platform/60D.111/version.c
[ CC       ]   version.o
[ CC       ]   bmp.o
[ CC       ]   font-dyn.o
[ CC       ]   config.o
[ CC       ]   menu.o
[ CC       ]   debug.o
[ CC       ]   stdio.o
[ CC       ]   audio.o
[ CC       ]   bitrate.o
[ CC       ]   tweaks.o
../../src/tweaks.c: In function 'handle_arrow_keys':
../../src/tweaks.c:1566:17: warning: passing argument 1 of 'aperture_toggle' makes pointer from integer without a cast [enabled by default]
../../src/lens.h:228:6: note: expected 'void *' but argument is of type 'int'
../../src/tweaks.c:1580:17: warning: passing argument 1 of 'aperture_toggle' makes pointer from integer without a cast [enabled by default]
../../src/lens.h:228:6: note: expected 'void *' but argument is of type 'int'
../../src/tweaks.c:1593:17: warning: passing argument 1 of 'iso_toggle' makes pointer from integer without a cast [enabled by default]
../../src/lens.h:226:6: note: expected 'void *' but argument is of type 'int'
../../src/tweaks.c:1594:17: warning: passing argument 1 of 'shutter_toggle' makes pointer from integer without a cast [enabled by default]
../../src/lens.h:227:6: note: expected 'void *' but argument is of type 'int'
../../src/tweaks.c:1607:17: warning: passing argument 1 of 'iso_toggle' makes pointer from integer without a cast [enabled by default]
../../src/lens.h:226:6: note: expected 'void *' but argument is of type 'int'
../../src/tweaks.c:1608:17: warning: passing argument 1 of 'shutter_toggle' makes pointer from integer without a cast [enabled by default]
../../src/lens.h:227:6: note: expected 'void *' but argument is of type 'int'
[ CC       ]   lens.o
[ CC       ]   property.o
[ CC       ]   propvalues.o
[ CC       ]   gui.o
[ CC       ]   gui-common.o
[ CC       ]   misc.o
[ CC       ]   picstyle.o
[ CC       ]   cfn.o
[ CC       ]   zebra.o
[ CC       ]   shoot.o
[ CC       ]   chdk-gui_draw.o
[ CC       ]   movtweaks.o
[ CC       ]   my_memset.o
[ CC       ]   menuhelp.o
cd ../../doc; python menuindex.py
Could not open menuindex.txt
mkdir: cannot create directory `cam': File exists
[ CC       ]   menuindex.o
[ CC       ]   af_patterns.o
[ CC       ]   focus.o
[ CC       ]   notify_box.o
[ CC       ]   bootflags.o
[ CC       ]   dialog_test.o
[ CC       ]   vram.o
[ CC       ]   morse.o
[ CC       ]   liveview.o
[ CC       ]   reloc.o
[ CC       ]   aj_port.o
[ CC       ]   fps-engio.o
[ CC       ]   cartridge.o
[ CC       ]   hdr.o
[ CC       ]   lv-img-engio.o
[ CC       ]   state-object.o
[ CC       ]   tasks.o
[ AR       ]   lib_a-setjmp.o
[ AR       ]   libstdio.a
[ LD       ]   magiclantern
boot-hack.o: In function `my_init_task':
boot-hack.c:(.text+0x14): relocation truncated to fit: R_ARM_PC24 against symbol `get_current_task' defined in *ABS* section in magiclantern
boot-hack.c:(.text+0x4c): relocation truncated to fit: R_ARM_PC24 against symbol `init_task' defined in *ABS* section in magiclantern
boot-hack.c:(.text+0x100): relocation truncated to fit: R_ARM_PC24 against symbol `msleep' defined in *ABS* section in magiclantern
boot-hack.c:(.text+0x128): relocation truncated to fit: R_ARM_PC24 against symbol `msleep' defined in *ABS* section in magiclantern
boot-hack.c:(.text+0x138): relocation truncated to fit: R_ARM_PC24 against symbol `msleep' defined in *ABS* section in magiclantern
boot-hack.c:(.text+0x154): relocation truncated to fit: R_ARM_PC24 against symbol `msleep' defined in *ABS* section in magiclantern
boot-hack.c:(.text+0x16c): relocation truncated to fit: R_ARM_PC24 against symbol `msleep' defined in *ABS* section in magiclantern
boot-hack.c:(.text+0x1e8): relocation truncated to fit: R_ARM_PC24 against symbol `task_create' defined in *ABS* section in magiclantern
boot-hack.o: In function `my_assert_handler':
boot-hack.c:(.text+0x234): relocation truncated to fit: R_ARM_PC24 against symbol `get_current_task' defined in *ABS* section in magiclantern
boot-hack.o: In function `my_big_init_task':
boot-hack.c:(.text+0x2b8): relocation truncated to fit: R_ARM_PC24 against symbol `call' defined in *ABS* section in magiclantern
boot-hack.c:(.text+0x2e8): additional relocation overflows omitted from the output
collect2: ld returned 1 exit status
make[1]: *** [magiclantern] Error 1
make[1]: Leaving directory `/home/vtrandal/magic-lantern/platform/60D.111'
make: *** [60D] Error 2
vtrandal@vtrandal-android:~/magic-lantern$

Here's the entire output with errors that I get with running make 600D:
vtrandal@vtrandal-android:~/magic-lantern$ make 600D
make -C /home/vtrandal/magic-lantern/platform/600D.102
make[1]: Entering directory `/home/vtrandal/magic-lantern/platform/600D.102'
[ CPP      ]   magiclantern.lds
[ AS       ]   ../../src/entry.o
[ CC       ]   boot-hack.o
[ AS       ]   stubs.o
[ VERSION  ]   ../../platform/600D.102/version.c
[ CC       ]   version.o
[ CC       ]   bmp.o
[ CC       ]   font-dyn.o
[ CC       ]   config.o
[ CC       ]   menu.o
[ CC       ]   debug.o
[ CC       ]   stdio.o
[ CC       ]   audio.o
[ CC       ]   bitrate.o
[ CC       ]   tweaks.o
../../src/tweaks.c: In function 'handle_arrow_keys':
../../src/tweaks.c:1566:17: warning: passing argument 1 of 'aperture_toggle' makes pointer from integer without a cast [enabled by default]
../../src/lens.h:228:6: note: expected 'void *' but argument is of type 'int'
../../src/tweaks.c:1580:17: warning: passing argument 1 of 'aperture_toggle' makes pointer from integer without a cast [enabled by default]
../../src/lens.h:228:6: note: expected 'void *' but argument is of type 'int'
../../src/tweaks.c:1593:17: warning: passing argument 1 of 'iso_toggle' makes pointer from integer without a cast [enabled by default]
../../src/lens.h:226:6: note: expected 'void *' but argument is of type 'int'
../../src/tweaks.c:1594:17: warning: passing argument 1 of 'shutter_toggle' makes pointer from integer without a cast [enabled by default]
../../src/lens.h:227:6: note: expected 'void *' but argument is of type 'int'
../../src/tweaks.c:1607:17: warning: passing argument 1 of 'iso_toggle' makes pointer from integer without a cast [enabled by default]
../../src/lens.h:226:6: note: expected 'void *' but argument is of type 'int'
../../src/tweaks.c:1608:17: warning: passing argument 1 of 'shutter_toggle' makes pointer from integer without a cast [enabled by default]
../../src/lens.h:227:6: note: expected 'void *' but argument is of type 'int'
[ CC       ]   lens.o
[ CC       ]   property.o
[ CC       ]   propvalues.o
[ CC       ]   gui.o
[ CC       ]   gui-common.o
[ CC       ]   misc.o
[ CC       ]   picstyle.o
[ CC       ]   cfn.o
[ CC       ]   zebra.o
[ CC       ]   shoot.o
[ CC       ]   chdk-gui_draw.o
[ CC       ]   movtweaks.o
[ CC       ]   my_memset.o
[ CC       ]   menuhelp.o
cd ../../doc; python menuindex.py
Could not open menuindex.txt
mkdir: cannot create directory `cam': File exists
[ CC       ]   menuindex.o
[ CC       ]   af_patterns.o
[ CC       ]   focus.o
[ CC       ]   notify_box.o
[ CC       ]   bootflags.o
[ CC       ]   dialog_test.o
[ CC       ]   vram.o
[ CC       ]   morse.o
[ CC       ]   liveview.o
[ CC       ]   reloc.o
[ CC       ]   aj_port.o
[ CC       ]   fps-engio.o
[ CC       ]   cartridge.o
[ CC       ]   hdr.o
[ CC       ]   lv-img-engio.o
[ CC       ]   state-object.o
[ CC       ]   tasks.o
[ AR       ]   lib_a-setjmp.o
[ AR       ]   libstdio.a
[ LD       ]   magiclantern
boot-hack.o: In function `my_assert_handler':
boot-hack.c:(.text+0x18): relocation truncated to fit: R_ARM_PC24 against symbol `get_current_task' defined in *ABS* section in magiclantern
boot-hack.o: In function `my_big_init_task':
boot-hack.c:(.text+0x9c): relocation truncated to fit: R_ARM_PC24 against symbol `call' defined in *ABS* section in magiclantern
boot-hack.c:(.text+0xcc): relocation truncated to fit: R_ARM_PC24 against symbol `msleep' defined in *ABS* section in magiclantern
boot-hack.c:(.text+0x10c): relocation truncated to fit: R_ARM_PC24 against symbol `task_create' defined in *ABS* section in magiclantern
boot-hack.c:(.text+0x120): relocation truncated to fit: R_ARM_PC24 against symbol `msleep' defined in *ABS* section in magiclantern
boot-hack.o: In function `my_dump_task':
boot-hack.c:(.text+0x31c): relocation truncated to fit: R_ARM_PC24 against symbol `call' defined in *ABS* section in magiclantern
boot-hack.c:(.text+0x324): relocation truncated to fit: R_ARM_PC24 against symbol `msleep' defined in *ABS* section in magiclantern
boot-hack.c:(.text+0x32c): relocation truncated to fit: R_ARM_PC24 against symbol `call' defined in *ABS* section in magiclantern
boot-hack.c:(.text+0x334): relocation truncated to fit: R_ARM_PC24 against symbol `call' defined in *ABS* section in magiclantern
boot-hack.c:(.text+0x340): relocation truncated to fit: R_ARM_PC24 against symbol `call' defined in *ABS* section in magiclantern
boot-hack.o: In function `hold_your_horses':
boot-hack.c:(.text+0x37c): additional relocation overflows omitted from the output
collect2: ld returned 1 exit status
make[1]: *** [magiclantern] Error 1
make[1]: Leaving directory `/home/vtrandal/magic-lantern/platform/600D.102'
make: *** [600D] Error 2
vtrandal@vtrandal-android:~/magic-lantern$

vtrandal

  • New to the forum
  • *
  • Posts: 44
Re: Built ML toolchain and hello.c but can't build ML
« Reply #1 on: July 31, 2012, 01:49:06 AM »
After reading topic: ARM Toolchain in General Development Discussion, I gather that building the ARM toolchain for ML under my 64-bit Ubuntu 10.04 installation just isn't going to result in compiler that will work correctly. Is that a correct conclusion?

vtrandal

  • New to the forum
  • *
  • Posts: 44
Re: Built ML toolchain and hello.c but can't build ML
« Reply #2 on: July 31, 2012, 01:52:36 AM »
I'm just finished downloading Ubuntu 12.04 LTS 32-bit. And I'm going to install it with Vmware Workstation and create a dedicated 32-bit ML development environment. Sound OK? I really don't to do ML development in Windows 7.

scrax

  • Contributor
  • Hero Member
  • *****
  • Posts: 1543
  • Code monkey
Re: Built ML toolchain and hello.c but can't build ML
« Reply #3 on: August 07, 2012, 11:26:05 PM »
After reading topic: ARM Toolchain in General Development Discussion, I gather that building the ARM toolchain for ML under my 64-bit Ubuntu 10.04 installation just isn't going to result in compiler that will work correctly. Is that a correct conclusion?
why not? it will make a little bigger file, just this, it will work same.
I'm using -mlong-calls too for compiling

EDIT: Ops... a bit late response... maybe time to go to bed  ;)
bye
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-

ludenus

  • New to the forum
  • *
  • Posts: 3
Re: Built ML toolchain and hello.c but can't build ML
« Reply #4 on: August 12, 2012, 02:42:45 PM »
I'm just finished downloading Ubuntu 12.04 LTS 32-bit.
Sound OK?
should be ok
yesterday i have successfully built ML v2.3 (but without *.fir files) using exactly this version of ubuntu