Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: ew on September 01, 2010, 05:08:37 PM

Title: At a total loss trying to build
Post by: ew on September 01, 2010, 05:08:37 PM
I had a working build environment several weeks ago, and tried to build a couple of days ago.

I had issues (which I reported in http://forums.rockbox.org/index.php?topic=25615.0 - but decided that my issues may be different and I did not want to hijack that thread).

So - here is the background and the problem.

Because of the issues that I was having, I just decided to recreate my build environment from scratch.  I followed the instructions from http://www.rockbox.org/wiki/VMwareDevelopmentPlatform, download a new VMWare Debian image, download the source, created a build directory and tried to build.

At this point, I would think that I have a clean build environment and a clean copy of the source.

I am trying to build a Sansa e200 simulator (../tools/configure->50->s and make)

I am getting the following error

Quote
.
.
.
GENLANG apps/lang/walon.lang
GENLANG apps/lang/arabic.lang
GENLANG apps/lang/chinese-simp.lang
GENLANG apps/lang/chinese-trad.lang
GENLANG apps/lang/hindi.lang
GENLANG apps/lang/japanese.lang
GENLANG apps/lang/korean.lang
GENLANG apps/lang/thai.lang
GEN lang/max_language_size.h
CC apps/language.c
/home/user/rockbox/apps/language.c: In function `lang_load':
/home/user/rockbox/apps/language.c:77: error: `SEEK_CUR' undeclared (first use in this function)
/home/user/rockbox/apps/language.c:77: error: (Each undeclared identifier is reported only once
/home/user/rockbox/apps/language.c:77: error: for each function it appears in.)
/home/user/rockbox/apps/language.c:86: error: `SEEK_SET' undeclared (first use in this function)
make: *** [/home/user/rockbox/build-sim/apps/language.o] Error 1
user@debian:~/rockbox/build-sim$           

Any ideas?

Thanks in advance for any assistance.

ew
Title: Re: At a total loss trying to build
Post by: nls on September 03, 2010, 03:18:55 PM
try adding
Code: [Select]
#include <stdio.h>to the top of language.h
Title: Re: At a total loss trying to build
Post by: ew on September 03, 2010, 05:35:42 PM
That got me past that error.

Compilation continued until the following error:

Quote
CC apps/metadata/asf.c
.
.
.
CC apps/metadata/adx.c
CC apps/metadata/flac.c
CC apps/metadata/monkeys.c
CC apps/metadata/mp4.c
CC apps/metadata/mpc.c
/home/user/rockbox/apps/metadata/mpc.c: In function `get_musepack_metadata':
/home/user/rockbox/apps/metadata/mpc.c:133: error: `SEEK_SET' undeclared (first use in this function)
/home/user/rockbox/apps/metadata/mpc.c:133: error: (Each undeclared identifier is reported only once
/home/user/rockbox/apps/metadata/mpc.c:133: error: for each function it appears in.)
make: *** [/home/user/rockbox/build-sim/apps/metadata/mpc.o] Error 1
user@debian:~/rockbox/build-sim$

Also, why should I have to add a line to the source?

Thanks for the assistance.
Title: Re: At a total loss trying to build
Post by: nls on September 04, 2010, 02:14:35 AM
Yes, it's the same problem, some of this seems to just work by luck but it's also strange that your headers are different from everyone elses. Although the debian in the vmware image is *very* old.
Title: Re: At a total loss trying to build
Post by: ew on September 05, 2010, 08:16:54 AM
It is very strange if my headers are different than anybody else. I used svn to download a new copy of the source.  Is the svn that is included in the Debian image old and therefore not downloading a full copy of the source?  Is there a newer/better Debian image (or other image) that I can/should be using?

EDIT:

Well I was fixing alot of similar things (#include <stdio.h> in various .h files)  Then I got to the following.

Quote
.
.
.
.
CC apps/codecs/aiff.c
LD aiff.codec
CC apps/codecs/speex.c
CC apps/codecs/libspeex/bits.c
CC apps/codecs/libspeex/cb_search.c
CC apps/codecs/libspeex/exc_10_16_table.c
CC apps/codecs/libspeex/exc_10_32_table.c
CC apps/codecs/libspeex/exc_20_32_table.c
CC apps/codecs/libspeex/exc_5_256_table.c
CC apps/codecs/libspeex/exc_5_64_table.c
CC apps/codecs/libspeex/exc_8_128_table.c
CC apps/codecs/libspeex/filters.c
CC apps/codecs/libspeex/gain_table.c
CC apps/codecs/libspeex/gain_table_lbr.c
CC apps/codecs/libspeex/hexc_10_32_table.c
CC apps/codecs/libspeex/hexc_table.c
CC apps/codecs/libspeex/high_lsp_tables.c
CC apps/codecs/libspeex/lsp.c
CC apps/codecs/libspeex/lsp_tables_nb.c
CC apps/codecs/libspeex/ltp.c
CC apps/codecs/libspeex/modes.c
CC apps/codecs/libspeex/modes_wb.c
CC apps/codecs/libspeex/nb_celp.c
CC apps/codecs/libspeex/quant_lsp.c
CC apps/codecs/libspeex/sb_celp.c
CC apps/codecs/libspeex/speex.c
CC apps/codecs/libspeex/speex_callbacks.c
CC apps/codecs/libspeex/oggframing.c
CC apps/codecs/libspeex/stereo.c
CC apps/codecs/libspeex/speex_header.c
AR libspeex.a
LD speex.codec
CC apps/codecs/adx.c
LD adx.codec
/home/user/rockbox/build-sim/apps/codecs/libcodec.a(fixedpoint.o)(.text.fp_sqrt+0x24): In function `isqrt':
/home/user/rockbox/apps/fixedpoint.c:112: undefined reference to `__builtin_clzl'
collect2: ld returned 1 exit status
make: *** [/home/user/rockbox/build-sim/apps/codecs/adx.codec] Error 1
user@debian:~/rockbox/build-sim$ vmware-toolbox&

What is confusing to me is that a couple of weeks ago I could compile with no problem.  I am still at a total loss.  Any ideas would be welcome.

Thanks  in advance
Title: Re: At a total loss trying to build
Post by: nls on September 06, 2010, 12:21:34 PM
it's your system headers that are different from what everyone else has, these were not used for compiling sims before but that has changed recently due to reorganizations comming from the RaaA work.
that you gcc doesn't have __builtin_clzl indicates it's older than 3.4 which is really old.
Maybe this vmware image will work better
http://forums.rockbox.org/index.php?topic=25084.0

getting a more recent evironment is likely the best way to fix this since the hacks you will need to keep compiling with such an old environment will only increase.
Title: Re: At a total loss trying to build
Post by: ew on September 06, 2010, 01:03:54 PM
Thanks - I guess I will have to update my build environment.  I appreciate the assistance.
Title: Re: At a total loss trying to build
Post by: saratoga on September 06, 2010, 01:19:02 PM
Theres also ready configured virtualbox images of ubuntu all over the place:

http://sourceforge.net/projects/virtualboximage/files/Ubuntu%20Linux/9.10/ubuntu-9.10.vdi.7z/download

<500MB and then you just need to svn co the rockbox source and run rockboxdev.sh to build the compilers.