Compile Error

32 views
Skip to first unread message

Andreas Vogler

unread,
Aug 19, 2010, 3:49:46 PM8/19/10
to ml-d...@googlegroups.com
Hi,
i tried to compile the  Firmware
i got:
.....
[: 1: 1: unexpected operator
[ CC       ]   ptp.o
ptp.c: In Funktion »ptp_handler_0x9999«:
ptp.c:29: Warnung: format »%08x« erwartet Typ »unsigned int«, aber Argument 5 hat Typ »struct ptp_context *«
ptp.c:29: Warnung: format »%08x« erwartet Typ »unsigned int«, aber Argument 6 hat Typ »struct ptp_handle *«
ptp.c: In Funktion »ptp_handler_0x9995«:
ptp.c:137: Warnung: Initialisierung erzeugt Ganzzahl von Zeiger ohne Typkonvertierung
ptp.c: In Funktion »ptp_state_display«:
ptp.c:176: Warnung: format »%x« erwartet Typ »unsigned int«, aber Argument 5 hat Typ »uint32_t«
ptp.c:176: Warnung: format »%08x« erwartet Typ »unsigned int«, aber Argument 6 hat Typ »uint32_t«
ptp.c: Auf höchster Ebene:
ptp.c:220: Warnung: Initialisierung von inkompatiblem Zeigertyp
[: 1: 1: unexpected operator
[ CC       ]   bracket.o
make: *** Keine Regel vorhanden, um das Target »lua-glue.o«,
  benötigt von »magiclantern«, zu erstellen.  Schluss.

Since the WIki said i should report it i do so

See you
L0RE

Alex

unread,
Sep 3, 2010, 2:46:35 AM9/3/10
to Magic Lantern firmware development
Hello,

Here is a patch for the [: 1: 1: unexpected operator message. Tested
on Ubuntu Karmic. The fix is copied from here:
http://www.unix.com/shell-programming-scripting/141856-how-avoid-unexpected-operator-error-when-comparing-2-strings.html

--- a/Makefile Sun Apr 18 13:50:14 2010 -0400
+++ b/Makefile Fri Sep 03 09:39:05 2010 +0300
@@ -453,7 +453,7 @@

# Quiet the build process
build = \
- @if [ "$V" == 1 ]; then \
+ @if [ X"$V" = X"1" ]; then \
echo '$2'; \
else \
printf "[ %-8s ] %s\n" $1 $@; \

About lua-glue.o... I have the same problem. The message in English
is:

make: *** No rule to make target `lua-glue.o', needed by
`magiclantern'. Stop.

Any ideas?

L0RE

unread,
Sep 6, 2010, 3:25:34 AM9/6/10
to Magic Lantern firmware development
Thanks for the Patch has worked.
I have tried to comment the lua-glue.o out or setting
CONFIG_LUA = n

in the Make file

There are other Errors occurs:

5d-hack.o: In function `null_task':
/root/src/ml/magic-lantern/5d-hack.c:151: relocation truncated to fit:
R_ARM_PC24 against symbol `DebugMsg' defined in *ABS* section in
magiclantern
5d-hack.o: In function `my_init_task':
/root/src/ml/magic-lantern/5d-hack.c:268: relocation truncated to fit:
R_ARM_PC24 against symbol `init_task' defined in *ABS* section in
magiclantern
/root/src/ml/magic-lantern/5d-hack.c:273: relocation truncated to fit:
R_ARM_PC24 against symbol `dmstart' defined in *ABS* section in
magiclantern
/root/src/ml/magic-lantern/5d-hack.c:275: relocation truncated to fit:
R_ARM_PC24 against symbol `DebugMsg' defined in *ABS* section in
magiclantern
/root/src/ml/magic-lantern/5d-hack.c:280: relocation truncated to fit:
R_ARM_PC24 against symbol `DebugMsg' defined in *ABS* section in
magiclantern
/root/src/ml/magic-lantern/5d-hack.c:303: relocation truncated to fit:
R_ARM_PC24 against symbol `msleep' defined in *ABS* section in
magiclantern
/root/src/ml/magic-lantern/5d-hack.c:308: relocation truncated to fit:
R_ARM_PC24 against symbol `msleep' defined in *ABS* section in
magiclantern
/root/src/ml/magic-lantern/5d-hack.c:327: relocation truncated to fit:
R_ARM_PC24 against symbol `msleep' defined in *ABS* section in
magiclantern
5d-hack.o: In function `call_init_funcs':
/root/src/ml/magic-lantern/5d-hack.c:237: relocation truncated to fit:
R_ARM_PC24 against symbol `DebugMsg' defined in *ABS* section in
magiclantern
5d-hack.o: In function `my_init_task':
/root/src/ml/magic-lantern/5d-hack.c:335: relocation truncated to fit:
R_ARM_PC24 against symbol `msleep' defined in *ABS* section in
magiclantern
/root/src/ml/magic-lantern/5d-hack.c:344: additional relocation
overflows omitted from the output


Mayby its becaus of
CONFIG_LUA = n

Thought mayby it helps someone to solve the compiler Problem

L0RE

unread,
Oct 4, 2010, 7:33:46 AM10/4/10
to Magic Lantern firmware development
I managed to Compile the Firmware
I think its intresting for the
"relocation truncated to fit: R_ARM_PC24" error
Adding
-mlong-calls to the CFLAGS in the make Files does the Trick. Now i get
a Compield Firmware...

I hope it works, ill try my magiclantern.fir in the eventing

Alex

unread,
Oct 4, 2010, 8:30:35 AM10/4/10
to Magic Lantern firmware development
To me, it does not sound good. I'd say it's better to understand what
this error means before trying ML on the camera.

What build environment are you using? It is the one installed with
summon-arm-toolchain or other version? Can you post the complete build
log here?

L0RE

unread,
Oct 5, 2010, 9:02:50 AM10/5/10
to Magic Lantern firmware development
O.k I Done all make a Doku
I have Ubuntu 10.04.1 LTS 64 BIT

I used the Doku of:
http://www.openhardware.net/Embedded_ARM/Toolchain/
TO Compile my Compiler
1. Changed the Path where to put the compile in environ.sh
00setSources.sh
01makeBinUtils.sh
02makeBootGcc.sh
03makeNewLib.sh
04makeRealGcc.sh
Workes


2. Before 05makeInsight.sh i have to
tar -xjvf downloads/insight-6.8-1.tar.bz2
mv insight-6.8-1 insight_sources

Then 05makeInsight.sh worked perfect



3. After i Checked out the svn repository



4. Changes to my makefile

1. adding -mlong-calls to the CFLAGS

2.
--- a/Makefile Sun Apr 18 13:50:14 2010 -0400
+++ b/Makefile Fri Sep 03 09:39:05 2010 +0300
@@ -453,7 +453,7 @@

# Quiet the build process
build = \
- @if [ "$V" == 1 ]; then \
+ @if [ X"$V" = X"1" ]; then \
echo '$2'; \
else \
printf "[ %-8s ] %s\n" $1 $@; \


3.
changing
ARM_PATH = [PATH OF COMPILER]
ARM_LIBC_A = [PATH OF COMPILER]/arm-elf/lib/libc.a


4.
-CONFIG_LUA = n
+CONFIG_LUA = y


make clean
make
Then it works for me to build. I havnt tried the firmware because i
don't want to kill my camera, i first want to know if its alright with
my changing :-).


L0RE

unread,
Oct 6, 2010, 3:16:11 AM10/6/10
to Magic Lantern firmware development
o.k No Risk no Fun.
I Tried.
Firmware starts....
Camera still alive...
New Menu is there. ...
Would call a success :-)

First impression it Boots faster then the Beta release of 2.0.4

I made an mistake on step 4 it should be

+CONFIG_LUA = n
-CONFIG_LUA = y

Seems the Changing don't hurt :-), but helps getting it Compiled on
ubuntu 64 bit.(For me)

Alex

unread,
Oct 6, 2010, 2:59:43 PM10/6/10
to Magic Lantern firmware development
Excellent! This should be added to the wiki.

I'm thinking to move the compiler information from
http://magiclantern.wikia.com/wiki/Build_instructions/550D to a page
dedicated to compilers which can build ML, because it seems that one
compiler can build both the 5D and 550D versions.

As for Lua, I was able to compile it on 550D ( http://bitbucket.org/a1ex/magic-lantern
), but did not run it on the camera yet.

arm.indy

unread,
Oct 12, 2010, 1:41:16 PM10/12/10
to Magic Lantern firmware development
hi,

I confirm being able to compile ML for 550D with the toolchain
described at
http://www.openhardware.net/Embedded_ARM/Toolchain/
and ran the generated binary on the camera with success.

Thanks LORE for the link!

I did not have the "font generation" problem this time...forget it.

Patch is attached (nothing really new)

I modified the Makefile to make "make install" working on Linux

Indy

----cut-here----

1,7c1,5
< ARM_PATH=/home/user/DevelToolbin/binaries/armThumb-4.3.2
< ARM_BINPATH=$(ARM_PATH)/bin
< GCC_VERSION=4.3.2
< CC=$(ARM_BINPATH)/arm-elf-gcc-$(GCC_VERSION)
< OBJCOPY=$(ARM_BINPATH)/arm-elf-objcopy
< AR=$(ARM_BINPATH)/arm-elf-ar
< RANLIB=$(ARM_BINPATH)/arm-elf-ranlib
---
> ARM_PATH=/opt/local/bin
> CC=$(ARM_PATH)/arm-elf-gcc-4.3.2
> OBJCOPY=$(ARM_PATH)/arm-elf-objcopy
> AR=$(ARM_PATH)/arm-elf-ar
> RANLIB=$(ARM_PATH)/arm-elf-ranlib
13,20d10
< #MacOS
< #UMOUNT=hdiutil unmount
< #CF_CARD="/Volumes/EOS_DIGITAL"
<
< #Linux (Ubuntu 10.04)
< CF_CARD=/media/CANON_DC/
< UMOUNT=umount
<
38,39c28
< FIRMWARE_ID_550D = 0x80000270
< FIRMWARE_ID = $(FIRMWARE_ID_550D)
---
> FIRMWARE_ID = $(FIRMWARE_ID_5D)
56a46,47
> CF_CARD="/Volumes/EOS_DIGITAL"
>
62c53
< $(UMOUNT) $(CF_CARD)
---
> hdiutil unmount $(CF_CARD)
229c220
< ARM_LIBC_A = $(ARM_PATH)/arm-elf/lib/libc.a
---
> ARM_LIBC_A = /opt/local/arm-elf/lib/libc.a
431c422
< seek=0 \
---
> oseek=0 \
501c492
< @if [ X"$V" = X"1" ]; then \
---

arm.indy

unread,
Oct 23, 2010, 10:17:36 AM10/23/10
to Magic Lantern firmware development
hi,

I have just pushed the patch above (tested on the camera and using 2
different compilers).

I'm far for being able to fully understand and modify Magic Lantern
now, do not ask me miracles!

For Bitbucket and Mercurial beginners like me, here is the "getting
started" page:
http://confluence.atlassian.com/display/BITBUCKET/Bitbucket+101

Indy

Klavdia Gabija

unread,
Oct 23, 2010, 6:15:02 PM10/23/10
to ml-d...@googlegroups.com
Hello people.

I just want to find out if anyone can give us an indication on the new
Ml for the 5D and any eta of it. I have promised my$1000 donation for
it. It would be appreciated if anyone can give us an indication

Thank you

Reply all
Reply to author
Forward
0 new messages