Bug #93
closedBuildroot 2011.02 fails
100%
Description
This release of Buildroot has the DSP tools integrated so it would be useful to get it working.
Not sure if this an issue with the icu build in Buildroot or with the Crosstool-NG build I've done separately.
The error is from Buildroot 2011.02:
/home/mjhammel/src/ximba/bb/src/../bld/crosstool-ng-1.8.2.bld/install/bin/arm-unknown-linux-uclibcgnueabi-g++ --sysroot=/home/mjhammel/src/ximba/bb/src/../bld/buildroot-2011.02.bld/staging//usr/arm-unknown-linux-uclibcgnueabi/sysroot -Os -pipe -Os -mtune=cortex-a8 -march=armv7-a -mabi=aapcs-linux -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -L/home/mjhammel/src/ximba/bb/src/../bld/buildroot-2011.02.bld/staging//usr/arm-unknown-linux-uclibcgnueabi/sysroot/lib -L/home/mjhammel/src/ximba/bb/src/../bld/buildroot-2011.02.bld/staging//usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/lib -o ../../bin/makeconv makeconv.o ucnvstat.o genmbcs.o gencnvex.o -L../../lib -licutu -L../../lib -licui18n -L../../lib -licuuc -L../../lib -L../../stubdata -licudata -lpthread -ldl -lm
/home/mjhammel/src/ximba/bb/bld/crosstool-ng-1.8.2.bld/install/bin/../lib/gcc/arm-unknown-linux-uclibcgnueabi/4.4.1/../../../../arm-unknown-linux-uclibcgnueabi/bin/ld: ../../bin/makeconv: hidden symbol `__sync_val_compare_and_swap_4' in /home/mjhammel/src/ximba/bb/bld/crosstool-ng-1.8.2.bld/install/bin/../lib/gcc/arm-unknown-linux-uclibcgnueabi/4.4.1/libgcc.a(linux-atomic.o) is referenced by DSO
/home/mjhammel/src/ximba/bb/bld/crosstool-ng-1.8.2.bld/install/bin/../lib/gcc/arm-unknown-linux-uclibcgnueabi/4.4.1/../../../../arm-unknown-linux-uclibcgnueabi/bin/ld: final link failed: Nonrepresentable section on output
A google search brought up this very similar problem:
http://old.nabble.com/Compilation-error-while-cross-compiling-LLVM-for-ARM-td26264469.html
(search for DSO to find the meat of the issue)
There is also this report:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40134
According to these, GCC 4.4.x supports the atomic intrinsics. I've
built Crosstool-NG with GCC4.4.1. I see nothing in the Crosstool-NG
about this support so I'm assuming:
1. It is in gcc 4.4.1 but Buildroot's 2011.02 makeconv build is not
compatible with this - 2010.10 seems to work okay.
2. It isn't in gcc 4.4.1 and I need some additional option to enable it
or switch to an appropriate version of the compiler that does
3. It is in gcc 4.4.1 and it works with makeconv but I'm just not using
the two together correctly somehow.
Related issues
Updated by Hammel over 13 years ago
Trying different versions of gcc (4.4.x) against Buildroot 2011.02. I hit different build problems. According to a report I made to the Buildroot bugzilla (https://bugs.busybox.net/show_bug.cgi?id=3529) these may be due to a very old uClibc. I need to rebuild the xcc with a newer version (0.9.31 or latest snapshot) of uClibc and try again. FWIW, the Linaro wiki suggests using gcc 4.5.2. I'm currently testing that compiler with the 0.9.30.2 uClibc against Buildroot 2011.02. Looking good so far but considering I hit fairly random incompatibilities on previous attempts with different gcc versions there's no telling if this will complete successfully.
Linaro gcc info: https://wiki.linaro.org/WorkingGroups/ToolChain/Using/GCCNative
Updated by Hammel over 13 years ago
Building Buildroot 2011.02 with Crosstool-NG 1.10.0, using gcc 4.5.2 and uClibc 0.9.31, I get this error:
AS arm/simple_idct_neon.o
arm/mpegvideo_arm.c:33:1: error: size of array 'x_H263_AIC' is negative
make3: * [arm/mpegvideo_arm.o] Error 1
make3: * Waiting for unfinished jobs....
CC matroska.o
CC matroskadec.o
CC md5proto.o
make3: Leaving directory `/home/mjhammel/src/ximba/bb/bld/buildroot-2011.02/output/build/mplayer-32726/ffmpeg/libavcodec'
I found some stuff about this on google - the links are at work. Apparently it's related to building mplayer on ARM systems that requires a patch. I'll update this entry tomorrow.
Updated by Hammel over 13 years ago
Here are those links:
http://comments.gmane.org/gmane.comp.video.mplayer.user/64844
http://permalink.gmane.org/gmane.comp.video.mplayer.user/64851
http://code.google.com/p/chromium/issues/detail?id=59123
Possible fixes (or at least closely related fixes):
http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/source/patched-ffmpeg-mt/libavcodec/arm/asm-offsets.h?r1=62568&r2=62567&pathrev=62568&diff_format=s
http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/README.chromium?r1=62568&r2=62567&pathrev=62568&diff_format=c
http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/source/patched-ffmpeg-mt/libavcodec/arm/asm-offsets.h?r1=62568&r2=62567&pathrev=62568&diff_format=c
One workaround is to disable the --enable-neon option in package/multimedia/mplayer/mplayer.mk but that will seriously affect the players ability to be useful on BeagleBoard.
Updated by Hammel over 13 years ago
It looks like I can disable mplayer from the build to get around this. If I do, the build completes just fine. Since mplayer is not used with the DSP-based playback (see FS#37) this probably isn't an issue.
I've got a 2011.02 rootfs built so I can test it on the board. I'll rebuild the kernel and uboot with the updated Crosstool-NG toolchain first.
Updated by Hammel over 13 years ago
Uboot and kernel rebuilt with updated toolchain. Ready to test tonight.
Updated by Hammel over 13 years ago
Note: xterm may not start because it can't find any fonts. The 2010.11 build didn't have the X11 fonts installed in the target rootfs. 2011.02 has them but in the wrong place. For some reason they got installed here:
buildroot-2011.02/output/target/home/mjhammel/src/ximba/bb/bld/buildroot-2011.02.bld/staging/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/share/fonts/X11/
Weird. The fonts are not in the crosstool tree, so buildroot copied them there for some odd reason. I can verify if xterm is not starting because of the missing fonts by just symlinking /usr/share/fonts/X11 to that directory in the rootfs.
Updated by Hammel over 13 years ago
The kernel doesn't boot with this configuration. I don't have any idea why yet. And I've tried quite a few different build options - so many in fact that I've lost track of what I've tried and what I got with each one.
So I'm backtracking. I went back to verify the build with BeagleBox's default configuration for Crosstool-NG 1.8.2 and kernel but with Buildroot 2011.02. Again, I hit the original DSO problem. That's good. I'm back where I started and can move forward in increments.
The next step is to try the latest gcc available to Crosstool-NG 1.8.2: gcc 4.4.3. The xcc is rebuilding now. When it's done I'll test the kernel build and then Buildroot.
Updated by Hammel over 13 years ago
This build completed: xcc 1.8.2 w/uClibc 0.9.30.2 and GCC 4.4.3, the Arago kernel build (2.6.32), and Buildroot 2011.02 with DSP support enabled. I also copied in the BUI and omapfb X11 packages and enabled them.
The build comes up cleanly. Now I can check the fonts issue and see if that helps xterm. But this much, at least, is enough to close this issue.
Updated by Hammel over 13 years ago
There appears to be a patch for the xfonts installation problem: http://git.buildroot.net/buildroot/commit/?id=117a8ea0eaabec72d7637f80f7a55fbba9ce67bf
Updated by Hammel over 13 years ago
Applied the patch but for some reason the build breaks. It's a new problem (see below) and I'm wondering if it has to do with building with too many parallel jobs (BR2_JLEVEL=6).
make5: Leaving directory `/home/mjhammel/src/ximba/bb/bld/buildroot-2011.02/output/build/host-icu-4.4.2/source/extra/uconv'
LD_LIBRARY_PATH=../../lib:../../stubdata:../../tools/ctestfw:$LD_LIBRARY_PATH MAKEFLAGS= ../../bin/pkgdata -p uconvmsg -O pkgdata.inc -m static -s uconvmsg -d uconvmsg -T uconvmsg uconvmsg/uconvmsg.lst
cd ../.. \
&& CONFIG_FILES=extra/uconv/uconv.1 CONFIG_HEADERS= /bin/sh ./config.status
icupkg: unable to open input file "uconvmsg/fr.res"
make4: * [package-resfiles] Error 4
make4: * Waiting for unfinished jobs....
Trying again with BR2_JLEVEL=2.
Updated by Hammel over 13 years ago
Removed patch and rebuilt using BR2_JLEVEL=6 - build completed successfully. Will try again with the patch by rebuilding only host-icu. If that works, I'll redo the entire build again.
Updated by Hammel over 13 years ago
Now I get this, which is teh same as the previous problem that I assumed was because of the number of jobs. Trying again with BR2_JLEVEL=2 instead.
/usr/bin/make4: Making `all' in `uconv'
/usr/lib64/ccache/g++ -D_REENTRANT -I../../common -I../../common -I../../i18n -I./../toolutil -DUCONVMSG_LINK=uconvmsg -I/home/mjhammel/src/ximba/bb/src/../bld/buildroot-2011.02.bld/staging//include -I/home/mjhammel/src/ximba/bb/src/../bld/buildroot-2011.02.bld/staging//usr/include -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -c -o uconv.o uconv.cpp
/usr/lib64/ccache/gcc -D_REENTRANT -I../../common -I../../common -I../../i18n -I./../toolutil -DUCONVMSG_LINK=uconvmsg -O2 -I/home/mjhammel/src/ximba/bb/src/../bld/buildroot-2011.02.bld/staging//include -I/home/mjhammel/src/ximba/bb/src/../bld/buildroot-2011.02.bld/staging//usr/include -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long -c -o uwmsg.o uwmsg.c
/bin/sh ../../mkinstalldirs uconvmsg
/bin/sh ../../mkinstalldirs uconvmsg
/usr/bin/make -f pkgdataMakefile
mkdir uconvmsg
rm -rf pkgdata.inc
mkdir uconvmsg
LD_LIBRARY_PATH=../../lib:../../stubdata:../../tools/ctestfw:$LD_LIBRARY_PATH ../../bin/genrb -e UTF-8 -s resources -d uconvmsg root.txt
mkdir: cannot create directory `uconvmsg': File exists
LD_LIBRARY_PATH=../../lib:../../stubdata:../../tools/ctestfw:$LD_LIBRARY_PATH ../../bin/genrb -e UTF-8 -s resources -d uconvmsg fr.txt
LD_LIBRARY_PATH=../../lib:../../stubdata:../../tools/ctestfw:$LD_LIBRARY_PATH MAKEFLAGS= ../../bin/pkgdata -p uconvmsg -O pkgdata.inc -m static -s uconvmsg -d uconvmsg -T uconvmsg uconvmsg/uconvmsg.lst
cd ../.. \
&& CONFIG_FILES=extra/uconv/uconv.1 CONFIG_HEADERS= /bin/sh ./config.status
icupkg: unable to open input file "uconvmsg/root.res"
make5: * [package-resfiles] Error 4
make5: Waiting for unfinished jobs....
uconv.cpp: In function 'int printTransliterators(UBool)':
uconv.cpp:393: warning: 'int32_t utrans_getAvailableID_44(int32_t, char, int32_t)' is deprecated (declared at ../../i18n/unicode/utrans.h:597)
uconv.cpp:393: warning: 'int32_t utrans_getAvailableID_44(int32_t, char*, int32_t)' is deprecated (declared at ../../i18n/unicode/utrans.h:597)
uconv.cpp:406: warning: 'int32_t utrans_getAvailableID_44(int32_t, char*, int32_t)' is deprecated (declared at ../../i18n/unicode/utrans.h:597)
uconv.cpp:406: warning: 'int32_t utrans_getAvailableID_44(int32_t, char*, int32_t)' is deprecated (declared at ../../i18n/unicode/utrans.h:597)
config.status: creating extra/uconv/uconv.1
config.status: WARNING: extra/uconv/uconv.1 contains a reference to the variable `datarootdir'
which seems to be undefined. Please make sure it is defined.
make4: * [all-recursive] Error 2
make3: [all-recursive] Error 2
make2: [/home/mjhammel/src/ximba/bb/bld/buildroot-2011.02/output/build/host-icu-4.4.2/.stamp_built] Error 2
make1: [.buildroot] Error 2
make: ** [buildroot-rebuild] Error 2
Updated by Hammel over 13 years ago
It rebuilt okay with BR2_JLEVEL=2 if only host-icu was removed from buildroot/output/build. Now I'll rebuild all of buildroot using BR2_JLEVEL=2 plus the fonts patch.
Updated by Hammel over 13 years ago
Rebuilding everything with the font patch and BR2_JLEVEL=2 fails with the following:
/home/mjhammel/src/ximba/bb/src/../bld/buildroot-2011.02.bld/staging//usr/bin/ucs2any: Can't read mapping file '/usr/share/fonts/X11/util/map-ISO8859-1': No such file or directory!
/home/mjhammel/src/ximba/bb/src/../bld/buildroot-2011.02.bld/staging//usr/bin/ucs2any: Can't read mapping file '/usr/share/fonts/X11/util/map-ISO8859-1': No such file or directory!
make2: * [courB10-ISO8859-1.bdf] Error 1
make2: Waiting for unfinished jobs....
make2: [courB08-ISO8859-1.bdf] Error 1
make2: Leaving directory `/home/mjhammel/src/ximba/bb/bld/buildroot-2011.02/output/build/xfont_font-adobe-100dpi-1.0.1'
make1: [/home/mjhammel/src/ximba/bb/bld/buildroot-2011.02/output/build/xfont_font-adobe-100dpi-1.0.1/.stamp_built] Error 2
make1: Leaving directory `/home/mjhammel/src/ximba/bb/bld/buildroot-2011.02'
make: ** [.buildroot] Error 2
Updated by Hammel over 13 years ago
Is this patch related to the problem? It should already be in 2011.02 since this is from May 2010:
http://git.buildroot.net/buildroot/commit/?id=4a57f7d261fdb93e4c8dac30907d7f06bf176f11
Updated by Hammel over 13 years ago
I applied the patch, but it does not appear to fix the problem. I also applied this patch:
http://git.buildroot.net/buildroot/commit/?id=6a86dd9c8eb0238a4bb8ffdd0fb04e62c12739fb
but it too appears to have no affect.
The file map-ISO8859-1 is part of the xfont_font-util-1.1.1 package and gets installed under the sysroot directory:
/usr/bin/install -c -m 644 map-ISO8859-1 map-ISO8859-2 map-ISO8859-3 map-ISO8859-4 map-ISO8859-5 map-ISO8859-6 map-ISO8859-7 map-ISO8859-8 map-ISO8859-9 map-ISO8859-10 map-ISO8859-11 map-ISO8859-13 map-ISO8859-14 map-ISO8859-15 map-ISO8859-16 map-JISX0201.1976-0 map-KOI8-R '/home/mjhammel/src/ximba/bb/src/../bld/buildroot-2011.02.bld/staging//usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/share/fonts/X11/util'
So while the host-built ucs2any is being used, it isn't looking in the sysroot directory for this file. It isn't clear if the problem is that xfont_font-util.1.1.1 is installing the map file in the wrong place or ucs2any is looking in the wrong place.
I posted this question to the buildroot mailing list a short time ago. Maybe someone there has some more info on this.
Updated by Hammel over 13 years ago
Rebuilt from scratch (with JLEVEL=1 - takes forever) with the following patches.
http://git.buildroot.net/buildroot/commit/?id=117a8ea0eaabec72d7637f80f7a55fbba9ce67bf
http://git.buildroot.net/buildroot/commit/?id=6a86dd9c8eb0238a4bb8ffdd0fb04e62c12739fb
Still fails in the same place. Search for missing map file in the build directory:
mjhammel(tty2)$ find . -name map-ISO8859-1
./staging/usr/share/fonts/X11/util/map-ISO8859-1
./staging/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/share/fonts/X11/util/map-ISO8859-1
So the file appears to be in the proper staging location. Assuming so, it now seems that xfonts_font-adobe-100dpi is not configured correctly to pick up the file from that location. Now looking for a way to fix this.
Updated by Hammel over 13 years ago
I added "mapdir" to this patch:
http://git.buildroot.net/buildroot/commit/?id=117a8ea0eaabec72d7637f80f7a55fbba9ce67bf
and the build completed successfully. The question is whether this is the correct fix for the problem. I checked the target rootfs and it appears that the fonts are properly installed.
I'll followup my own post with the fix and see if anyone responds. In the meantime I'll do another build from scratch with the updated patch.
Updated by Hammel over 13 years ago
The build from scratch completed successfully. I've checked in the patch update to the BeagleBox tree and posted a bug report on it to Buildroot.
Buildroot 2011.02 is now integrated into the tree and is the default version for the root file system.