Compilation Issues

Started by Masheen, May 30, 2013, 07:31:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Masheen

Hi everyone - I've been trying to work out the compile errors I've been having for a couple of weeks now. I'm only trying to compile for the EOS M at this point.

I was hoping if I posted the errors someone would be able to help me. I'm ready to start figuring out the Magic Lantern source code instead of fighting with different arm compilers.

Using the elf compiler (arm-toolchain462), I ran into this error. Which made me feel like I needed a different compiler.
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: error: Source object dietlibc.a(strrchr.o) has EABI version 5, but target magiclantern has EABI version 0
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file dietlibc.a(strrchr.o)
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: error: Source object dietlibc.a(strncpy.o) has EABI version 5, but target magiclantern has EABI version 0
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file dietlibc.a(strncpy.o)
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: error: Source object dietlibc.a(strlen.o) has EABI version 5, but target magiclantern has EABI version 0
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file dietlibc.a(strlen.o)
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: error: Source object dietlibc.a(strncmp.o) has EABI version 5, but target magiclantern has EABI version 0
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file dietlibc.a(strncmp.o)
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: error: Source object dietlibc.a(strcpy.o) has EABI version 5, but target magiclantern has EABI version 0
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file dietlibc.a(strcpy.o)
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: error: Source object dietlibc.a(strcmp.o) has EABI version 5, but target magiclantern has EABI version 0
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file dietlibc.a(strcmp.o)
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: error: Source object dietlibc.a(strtol.o) has EABI version 5, but target magiclantern has EABI version 0
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file dietlibc.a(strtol.o)
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: error: Source object dietlibc.a(strtoul.o) has EABI version 5, but target magiclantern has EABI version 0
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file dietlibc.a(strtoul.o)
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: error: Source object dietlibc.a(strchr.o) has EABI version 5, but target magiclantern has EABI version 0
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file dietlibc.a(strchr.o)
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: error: Source object dietlibc.a(atol.o) has EABI version 5, but target magiclantern has EABI version 0
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file dietlibc.a(atol.o)
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: error: Source object dietlibc.a(errno.o) has EABI version 5, but target magiclantern has EABI version 0
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file dietlibc.a(errno.o)
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: error: Source object dietlibc.a(errno_location.o) has EABI version 5, but target magiclantern has EABI version 0
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file dietlibc.a(errno_location.o)
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: error: Source object newlib-libc.a(lib_a-setjmp.o) has EABI version 5, but target magiclantern has EABI version 0
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file newlib-libc.a(lib_a-setjmp.o)
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: error: Source object newlib-libc.a(lib_a-memcpy-stub.o) has EABI version 5, but target magiclantern has EABI version 0
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file newlib-libc.a(lib_a-memcpy-stub.o)
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: error: Source object newlib-libc.a(lib_a-memccpy.o) has EABI version 5, but target magiclantern has EABI version 0
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file newlib-libc.a(lib_a-memccpy.o)
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: error: Source object newlib-libc.a(lib_a-memset.o) has EABI version 5, but target magiclantern has EABI version 0
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file newlib-libc.a(lib_a-memset.o)
/home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/../../../../arm-elf/bin/ld: /home/tyler/arm-toolchain462/lib/gcc/arm-elf/4.6.2/libgcc.a(_umodsi3.o)(__umodsi3): warning: interworking not enabled.


So I downloaded a binary for a precompiled toolchain that was posted here: http://www.magiclantern.fm/forum/index.php?topic=1176.msg2106#msg2106

This toolchain has given me the following errors.
/home/tyler/arm-codesourcery/bin/../arm-none-linux-gnueabi/libc/usr/include/bits/types.h:30:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
In file included from /home/tyler/arm-codesourcery/bin/../arm-none-linux-gnueabi/libc/usr/include/sys/types.h:132:0,
                 from ../../src/arm-mcr.h:34,
                 from ../../src/dryos.h:34,
                 from ../../src/boot-hack.c:28:
/home/tyler/arm-codesourcery/bin/../arm-none-linux-gnueabi/libc/usr/include/time.h:75:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
/home/tyler/arm-codesourcery/bin/../arm-none-linux-gnueabi/libc/usr/include/time.h:91:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
In file included from ../../src/arm-mcr.h:34:0,
                 from ../../src/dryos.h:34,
                 from ../../src/boot-hack.c:28:
/home/tyler/arm-codesourcery/bin/../arm-none-linux-gnueabi/libc/usr/include/sys/types.h:157:20: error: missing binary operator before token "("
In file included from ../../src/dryos.h:34:0,
                 from ../../src/boot-hack.c:28:
../../src/arm-mcr.h:37:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
In file included from ../../src/dryos.h:43:0,
                 from ../../src/boot-hack.c:28:
../../src/tasks.h:106:9: error: unknown type name 'thunk'
../../src/tasks.h:107:9: error: unknown type name 'thunk'
../../src/boot-hack.c: In function 'copy_and_restart':
../../src/boot-hack.c:147:5: error: unknown type name 'thunk'
../../src/boot-hack.c:147:26: error: 'thunk' undeclared (first use in this function)
../../src/boot-hack.c:147:26: note: each undeclared identifier is reported only once for each function it appears in
../../src/boot-hack.c:148:16: error: called object 'reloc_entry' is not a function
../../src/boot-hack.c: In function 'my_task_dispatch_hook':
../../src/boot-hack.c:224:5: error: unknown type name 'thunk'
../../src/boot-hack.c:224:20: error: 'thunk' undeclared (first use in this function)
../../src/boot-hack.c:224:27: error: expected ',' or ';' before 'task'
../../src/boot-hack.c:236:15: error: expected ';' before 'original_entry'
../../src/boot-hack.c:237:13: error: 'original_entry' undeclared (first use in this function)
../../src/boot-hack.c:248:21: warning: assignment makes pointer from integer without a cast [enabled by default]
../../src/boot-hack.c: In function 'call_init_funcs':
../../src/boot-hack.c:295:9: error: unknown type name 'thunk'
../../src/boot-hack.c:295:24: error: 'thunk' undeclared (first use in this function)
../../src/boot-hack.c:295:31: error: expected ',' or ';' before 'init_func'
../../src/boot-hack.c:296:14: error: called object 'entry' is not a function
../../src/boot-hack.c: In function 'backup_region':
../../src/boot-hack.c:321:20: error: 'NULL' undeclared (first use in this function)
make[1]: *** [boot-hack.o] Error 1
make[1]: Leaving directory `/home/tyler/magic-lantern/platform/EOSM.106'
make: *** [EOSM] Error 2


I apologize if these are simple issues or silly mistakes, but up to this point it seems like for each error you fix, another two surface.

RenatoPhoto

First, you do not need to create a new thread to discuss this.  There is already many thread to discuss this so please use the search function and type compile errors.

I will suggest a couple of things that have learned along the way:

1. Must use gcc 4.7.3
2. Must always do a "make clean" before you make

Here is a list of just a few of the existing threads were you can get more information:


Getting started as developer
http://www.magiclantern.fm/forum/index.php?topic=2899.0

Questions regarding compilation, TCC
http://www.magiclantern.fm/forum/index.php?topic=5324.0

Linux & compiling code
http://www.magiclantern.fm/forum/index.php?topic=5317.msg33445#msg33445




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

Masheen

Quote from: RenatoPhoto on May 30, 2013, 08:04:11 PM
First, you do not need to create a new thread to discuss this.  There is already many thread to discuss this so please use the search function and type compile errors.

I can appreciate the frustration that tech forums deal with. I would only say that I debugged this situation to the extent of my abilities, being new to both Linux and Magic Lantern. I didn't see any posts with the specific errors I had encountered. After two weeks of trying to get this to compile I finally decided to start posting.

On a side note, I appreciate the links. I'm hoping the virtual machine will get me up and running. Thanks for your help.