Compiling CHDK on Mint Linux using GCC 4.4.3 - General Discussion and Assistance - CHDK Forum  

Compiling CHDK on Mint Linux using GCC 4.4.3

  • 11 Replies
  • 8348 Views
Compiling CHDK on Mint Linux using GCC 4.4.3
« on: 17 / April / 2012, 19:11:30 »
Advertisements
Hello,

My goal is it to help porting CHDK to the S100 Firmware, since I'm soon going to own one :-). Today I tried compiling CHDK on my Linux Mint system. I'm using GCC 4.4.3 with Binutils 2.18. I created a toolchain script based on the one I found on this Wiki entry: http://chdk.wikia.com/wiki/Gcc433. Compiling the toolchain succeeded, and I started compiling CHDK svn (r1808) using make and a "localbuildconf.inc" which definies PATH, PLATFORM and PLATFORMSUB. At the end, I get this error:

Quote
>> Entering to core/modules
../module_exportlist.c -> exportlist
../gui_fselect.c -> ../gui_fselect.o
../nothumb.c -> ../nothumb.o
-> fselect.elf
-> fselect.flt
In file fselect.elf:
 point not to the __div0. Something unusual.
make[2]: *** [fselect.flt] Error 8
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Any idea? I found this error in a question in another thread, but no solution was posted in response.

As far as I understand things, this error comes from the elf2flt tool (see tools/elf2flt/elf-arm.c). It seems my compiler generates R_ARM_PC24 like Win arm-gcc. Is this what I want? Can I change this type somehow?

Thanks for any pointers.

falstaff
« Last Edit: 17 / April / 2012, 19:13:50 by falstaff »

Re: Compiling CHDK on Mint Linux using GCC 4.4.3
« Reply #1 on: 17 / April / 2012, 19:54:03 »
You could try compiling the stable branch instead ?  It does not use loadable modules so you should not get that error.

http://subversion.assembla.com/svn/chdk/branches/release-1_0/

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline c10ud

  • ***
  • 245
Re: Compiling CHDK on Mint Linux using GCC 4.4.3
« Reply #2 on: 18 / April / 2012, 06:55:43 »
I'm able to compile the trunk version just fine with these compilers:
host compiler:
$ gcc --version
gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3
arm compiler:
$ ./arm-elf-gcc-4.3.3 --version
arm-elf-gcc-4.3.3 (GCC) 4.3.3

Make sure you're exporting proper paths.
Also, you might be unaware that S100 already has been ported (by me), see here: http://chdk.setepontos.com/index.php?topic=7887.0 and here http://www.mighty-hoernsche.de/trunk/ for autobuilds.

Ofcourse there's still (always?) something todo (see notes.txt), but that really depends on what you're going to use CHDK for.

greets

Re: Compiling CHDK on Mint Linux using GCC 4.4.3
« Reply #3 on: 18 / April / 2012, 16:28:39 »
@c10ud: Yeah I'm aware of that. As far as I've read, autoboot isn't yet working, right? Thats a feature I plan to use...

My versions are
Quote
$ gcc --version
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
$ arm-elf-gcc --version
arm-elf-gcc (GCC) 4.4.3

I just tried to compile S95 firmware using release 1.0 and trunk. On release 1.0, compile works, but on trunk I get the same error.

vnd had this error too, see here:
http://chdk.setepontos.com/index.php?topic=847.msg78648#msg78648

Any ideas?


*

Offline srsa_4c

  • ******
  • 4451
Re: Compiling CHDK on Mint Linux using GCC 4.4.3
« Reply #4 on: 18 / April / 2012, 16:40:13 »
@c10ud: Yeah I'm aware of that. As far as I've read, autoboot isn't yet working, right?
As far as I know, the "firmware update" boot method is the one that is not working ATM.

Quote
I just tried to compile S95 firmware using release 1.0 and trunk. On release 1.0, compile works, but on trunk I get the same error.

vnd had this error too, see here:
http://chdk.setepontos.com/index.php?topic=847.msg78648#msg78648

Any ideas?
I think you could just use a precompiled toolchain (extracted to a separate folder), for example the 4.5.1 one from http://forum.chdk-treff.de/download_chdkde.php

Re: Compiling CHDK on Mint Linux using GCC 4.4.3
« Reply #5 on: 18 / April / 2012, 16:55:38 »
Thanks that worked! Although, it would be nice if my toolchain created according to the documentation from the wiki mentioned in the first post would work too :-)

*

Offline srsa_4c

  • ******
  • 4451
Re: Compiling CHDK on Mint Linux using GCC 4.4.3
« Reply #6 on: 18 / April / 2012, 17:01:23 »
Thanks that worked! Although, it would be nice if my toolchain created according to the documentation from the wiki mentioned in the first post would work too :-)
Are you by any chance using the x64 edition of your OS? That may be related, I guess.

Re: Compiling CHDK on Mint Linux using GCC 4.4.3
« Reply #7 on: 18 / April / 2012, 18:22:04 »
Yes, I'm using Mint Linux 64-bit. Fortunately Ubuntu and thus Mint using multiarch, the 32-bit compiler from above works...


Re: Compiling CHDK on Mint Linux using GCC 4.4.3
« Reply #8 on: 18 / April / 2012, 18:29:47 »
Are you by any chance using the x64 edition of your OS? That may be related, I guess.
I'm using 64 bit Fedora to build with no problems.

Although, it would be nice if my toolchain created according to the documentation from the wiki mentioned in the first post would work too :-)
Yes, it would.   Is there any way you can compare the two setups ?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14079
Re: Compiling CHDK on Mint Linux using GCC 4.4.3
« Reply #9 on: 19 / April / 2012, 00:05:50 »
Thanks that worked! Although, it would be nice if my toolchain created according to the documentation from the wiki mentioned in the first post would work too :-)
Yes.
Comparing the output of  arm-elf-gcc -v between the two might provide some hints.
Don't forget what the H stands for.

 

Related Topics