Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: daniel.weck on June 04, 2008, 08:08:49 AM

Title: Can't compile anymore! creative.c:24:17: error: elf.h: No such file or directory
Post by: daniel.weck on June 04, 2008, 08:08:49 AM
UPDATE: I have downloaded elf.h and elftypes.h into /usr/include/ from the official Apple Darwin source:

http://www.opensource.apple.com/darwinsource/10.5/dtrace-48/sys/elftypes.h
http://www.opensource.apple.com/darwinsource/10.5/dtrace-48/sys/elf.h

So far Rockbox is compiling...

If it works, this is worth adding into the Wiki instructions. (I don't have permissions so please can someone do it ?)

---

Dear Rockbox experts,

I'm used to compile my own Rockbox binaries from SVN, as I have been experimenting with plugin implementations.

I'm using the cross-compiler on Mac OS X (Tiger 10.4.11), for my Toshiba Gigabeat F.

Today I get a compile error in both SIM and NORMAL modes (missing "elf.h" header).

Note: I had not compiled Rockbox for a while, so after I saw the error, I made sure to: clean everything up, re-install the ELF cross-compiler using rockboxdev.sh, and of course use tools/configure.sh to re-generate the Makefile.

EDIT: Here is the result of "configure":

40
Platform set to gigabeatf
Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (M)anual: (Defaults to N)
N
Normal build selected
Using source code root directory: /Users/danielweck/Rockbox/rockbox
Using arm-elf-gcc 4.0.3 (400)
Using arm-elf-ld 2.16.1
Created Makefile

Here is the compile error:

$ make
Consider upgrading to GNU make 3.81+ for optimum build performance.
make[1]: `rdf2binary' is up to date.
make[1]: `convbdf' is up to date.
make[1]: `codepages' is up to date.
gcc -O -g -W -Wall -Wshadow -pedantic   -c -o creative.o creative.c
creative.c:24:17: error: elf.h: No such file or directory
creative.c: In function 'elf_convert':
creative.c:84: error: 'Elf32_Ehdr' undeclared (first use in this function)
creative.c:84: error: (Each undeclared identifier is reported only once
creative.c:84: error: for each function it appears in.)
creative.c:84: error: 'main_header' undeclared (first use in this function)
creative.c:85: error: 'Elf32_Shdr' undeclared (first use in this function)
creative.c:85: error: 'section_header' undeclared (first use in this function)
creative.c:86: warning: ISO C90 forbids mixed declarations and code
creative.c:89: error: parse error before ')' token
creative.c:90: error: 'ELFMAG0' undeclared (first use in this function)
creative.c:91: error: 'ELFMAG1' undeclared (first use in this function)
creative.c:91: error: 'ELFMAG2' undeclared (first use in this function)
creative.c:91: error: 'ELFMAG3' undeclared (first use in this function)
creative.c:101: error: parse error before ')' token
creative.c:103: error: 'SHF_WRITE' undeclared (first use in this function)
creative.c:104: error: 'SHF_ALLOC' undeclared (first use in this function)
creative.c:104: error: 'SHF_EXECINSTR' undeclared (first use in this function)
creative.c:105: error: 'SHT_NOBITS' undeclared (first use in this function)
make[1]: *** [creative.o] Error 1
make: *** [tools] Error 2