Hello OpenMoko developers,

I'm trying to build OpenMoko from scratch via MokoMakefile as described in the 
wiki. This worked well for me several weeks ago, so I wasn't expecting any 
issues. So far I ran across two problems - one is  with OpenEmbedded, the other 
with  my kernel configuration. As I couldn't find references or solutions to 
these in the wiki or the mailing list, I thought it would be best to mention 
them here. I'd welcome any hints about whether / how to proceed with the 
problems.

###################

One problen I had was a compilation error with libsdl-mixer-1.2.6. This might 
be a problem of OpenEmbedded, though:

--------
NOTE: make -j 5
make[1]: Entering directory 
`/home/moko/2007.2/build/tmp/work/armv4t-angstrom-linux-gnueabi/libsdl-mixer-1.2.6-r2/SDL_mixer-1.2.6'
Making all in timidity
make[2]: Entering directory 
`/home/moko/2007.2/build/tmp/work/armv4t-angstrom-linux-gnueabi/libsdl-mixer-1.2.6-r2/SDL_mixer-1.2.6/timidity'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory 
`/home/moko/2007.2/build/tmp/work/armv4t-angstrom-linux-gnueabi/libsdl-mixer-1.2.6-r2/SDL_mixer-1.2.6/timidity'
make[2]: Entering directory 
`/home/moko/2007.2/build/tmp/work/armv4t-angstrom-linux-gnueabi/libsdl-mixer-1.2.6-r2/SDL_mixer-1.2.6'
/bin/sh ./libtool --tag=CC --mode=link ccache arm-angstrom-linux-gnueabi-gcc 
-march=armv4t -mtune=arm920t  
-isystem/home/moko/2007.2/build/tmp/staging/arm-angstrom-linux-gnueabi/u
sr/include -fexpensive-optimizations -frename-registers -fomit-frame-pointer 
-Os 
-I/home/moko/2007.2/build/tmp/staging/arm-angstrom-linux-gnueabi/usr/include/SDL
 -D_REENTRANT -DUS
E_RWOPS -DCMD_MUSIC -DWAV_MUSIC -DLIBMIKMOD_MUSIC -pthread -D_REENTRANT 
-DMID_MUSIC -DUSE_TIMIDITY_MIDI -I./timidity -DOGG_MUSIC  
-L/home/moko/2007.2/build/tmp/staging/arm-angstro
m-linux-gnueabi/usr/lib 
-Wl,-rpath-link,/home/moko/2007.2/build/tmp/staging/arm-angstrom-linux-gnueabi/usr/lib
 -Wl,-O1 -o libSDL_mixer.la -rpath /usr/lib -no-undefined -release 1.
2 -version-info 2:4:2 -export-symbols-regex Mix_.* load_aiff.lo load_voc.lo 
load_ogg.lo mixer.lo music.lo music_cmd.lo music_ogg.lo wavestream.lo 
effect_position.lo effect_stereor
everse.lo effects_internal.lo  timidity/libtimidity.la   -lvorbisfile -lvorbis 
-logg -L/home/moko/2007.2/build/tmp/staging/arm-angstrom-linux-gnueabi/usr/lib 
-Wl,-rpath,/home/moko
/2007.2/build/tmp/staging/arm-angstrom-linux-gnueabi/usr/lib -lSDL -lpthread 
-L/usr/lib -lmikmod -ldl -L/usr/lib -lm
rm -fr  .libs/libSDL_mixer.exp .libs/libSDL_mixer.ver
generating symbol list for `libSDL_mixer.la'
/home/moko/2007.2/build/tmp/cross/bin/arm-angstrom-linux-gnueabi-nm -B  
.libs/load_aiff.o .libs/load_voc.o .libs/load_ogg.o .libs/mixer.o .libs/music.o 
.libs/music_cmd.o .libs/mus
ic_ogg.o .libs/wavestream.o .libs/effect_position.o 
.libs/effect_stereoreverse.o .libs/effects_internal.o  
timidity/.libs/libtimidity.a | sed -n -e 's/^.*[     ]\([ABCDGIRSTW][ABC
DGIRSTW]*\)[    ][      ]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' | 
/bin/sed 's/.* //' | sort | uniq > .libs/libSDL_mixer.exp
/home/moko/2007.2/build/tmp/staging/x86_64-linux/usr/bin/grep -E -e "Mix_.*" 
".libs/libSDL_mixer.exp" > ".libs/libSDL_mixer.expT"
mv -f ".libs/libSDL_mixer.expT" ".libs/libSDL_mixer.exp"
echo "{ global:" > .libs/libSDL_mixer.ver
 cat .libs/libSDL_mixer.exp | sed -e "s/\(.*\)/\1;/" >> .libs/libSDL_mixer.ver
 echo "local: *; };" >> .libs/libSDL_mixer.ver
 ccache arm-angstrom-linux-gnueabi-gcc -march=armv4t -mtune=arm920t -shared  
.libs/load_aiff.o .libs/load_voc.o .libs/load_ogg.o .libs/mixer.o .libs/music.o 
.libs/music_cmd.o .lib
s/music_ogg.o .libs/wavestream.o .libs/effect_position.o 
.libs/effect_stereoreverse.o .libs/effects_internal.o -Wl,--whole-archive 
timidity/.libs/libtimidity.a -Wl,--no-whole-arch
ive  -Wl,--rpath 
-Wl,/home/moko/2007.2/build/tmp/staging/arm-angstrom-linux-gnueabi/usr/lib 
-pthread 
-L/home/moko/2007.2/build/tmp/staging/arm-angstrom-linux-gnueabi/usr/lib -L/us
r/lib 
/home/moko/2007.2/build/tmp/staging/arm-angstrom-linux-gnueabi/usr/lib/libvorbisfile.so
 
/home/moko/2007.2/build/tmp/staging/arm-angstrom-linux-gnueabi/usr/lib/libvorbis.so
 /
home/moko/2007.2/build/tmp/staging/arm-angstrom-linux-gnueabi/usr/lib/libogg.so 
-lSDL -lpthread 
/home/moko/2007.2/build/tmp/staging/arm-angstrom-linux-gnueabi/usr/lib/libmikmod.so
 -ldl -lm  -march=armv4t -mtune=arm920t -Wl,-rpath-link 
-Wl,/home/moko/2007.2/build/tmp/staging/arm-angstrom-linux-gnueabi/usr/lib 
-Wl,-O1 -Wl,-rpath -Wl,/home/moko/2007.2/build/t
mp/staging/arm-angstrom-linux-gnueabi/usr/lib -Wl,-soname 
-Wl,libSDL_mixer-1.2.so.0 -Wl,-version-script -Wl,.libs/libSDL_mixer.ver -o 
.libs/libSDL_mixer-1.2.so.0.2.4
/home/moko/2007.2/build/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/../../../../arm-angstrom-linux-gnueabi/bin/ld:
 skipping incompatible /usr/lib/libc.so when searching for
 -lc
/usr/lib/libc.a: could not read symbols: File format not recognized
collect2: ld returned 1 exit status
make[2]: *** [libSDL_mixer.la] Error 1
make[2]: Leaving directory 
`/home/moko/2007.2/build/tmp/work/armv4t-angstrom-linux-gnueabi/libsdl-mixer-1.2.6-r2/SDL_mixer-1.2.6'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/home/moko/2007.2/build/tmp/work/armv4t-angstrom-linux-gnueabi/libsdl-mixer-1.2.6-r2/SDL_mixer-1.2.6'
FATAL: oe_runmake failed
--------

Apparently, (ARM) libc is missing. A closer look at the linker command shows 
that although 
"-L/home/moko/2007.2/build/tmp/staging/arm-angstrom-linux-gnueabi/usr/lib/" 
appears multiple times, a line like 
"-L/home/moko/2007.2/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/" is 
missing. Guess where libc.a resides?

Now my quick-and-dirty fix to this is to modify the (configure-generated) 
Makefile for libsdl-mixer to include the additional linker library search path 
when I run across this error. Then I re-run "make openmoko-deve-image", and as 
the configure stage is already done and the makefile has been fixed up 
manually, the compile stage works now.
This sucks. Unfortunately I don't know where to look in the OpenEmbedded 
framework to make sure the additional linker library search path is passed to 
configure in the corresponding stage as things ought to be. I understand that 
shell scripts are generated for every package somewhere along the process which 
care about the package's stages.

I'm in need of some pointers here.

###################

The second problem was related to the kernel config of my machine - nonetheless 
I find it interesting enough to mention. When building glibc-2.6.1-r4 qemu 
wouldn't run glibc's (ARM native) localedef 
(glibc-2.6.1-r4/locale-tree/bin/localedef). Thanks to strace it turns out that 
qemu wants to mmap memory below a certain address but gets EACCESS in return. 
In my case mmap needed to map to 0x8000, so "echo 128 
>/proc/sys/vm/mmap_min_addr" sure fixed me up. I'm mentioning this here for 
documentation purposes.

###################

Additionally I encountered the "xserver-kdrive configure fails" problem 
described here: 
<http://lists.openmoko.org/pipermail/distro-devel/2008-April/000425.html>. The 
fix described there works for me.

Regards,
Thilo Fromm


Reply via email to