| View previous topic :: View next topic |
| Author |
Message |
geeksheik Tux's lil' helper


Joined: 07 Sep 2003 Posts: 99 Location: Zürich, Switzerland
|
Posted: Thu Sep 06, 2012 11:21 am Post subject: u-boot-tools-2011.12 fails to build |
|
|
u-boot-tools-2011.12 fails on my platform. It is not a masked package.
| Code: |
/var/tmp/portage/dev-embedded/u-boot-tools-2011.12/work/u-boot-2011.12/include -I /var/tmp/portage/dev-embedded/u-boot-tools-2011.12/work/u-boot-2011.12/lib/libfdt -I /var/tmp/portage/dev-embeYS_TEXT_BASE= -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -o default_imag
In file included from /usr/include/image.h:22
from aisimage.c:29:
/usr/include/rgbpixel.h:22:20: schwerwiegender Fehler: config.h: Datei oder Verzeichnis nicht gef
Kompilierung beendet.
make[1]: *** [aisimage.o] Fehler 1
make[1]: *** Warte auf noch nicht beendete Prozes
In file included from /usr/include/image.h:22
from default_image.c:31:
/usr/include/rgbpixel.h:22:20: schwerwiegender Fehler: config.h: Datei oder Verzeichnis nicht gef
Kompilierung beendet.
make[1]: *** [default_image.o] Fehler 1
make[1]: Leaving directory `/var/tmp/portage/dev-embedded/u-boot-tools-2011.12/work/u-boot-2011.12/tool
make: *** [tools-all] Fehler 2
* ERROR: dev-embedded/u-boot-tools-2011.12 failed (com
* emake failed
*
* If you need support, post the output of `emerge --info '=dev-embedded/u-boot-tools-2011.12'`,
* the complete build log and the output of `emerge -pqv '=dev-embedded/u-boot-tools-2011.12'`.
* The complete build log is located at '/var/tmp/portage/dev-embedded/u-boot-tools-2011.12/temp/build.log
* The ebuild environment file is located at '/var/tmp/portage/dev-embedded/u-boot-tools-2011.12/temp/environ
* Working directory: '/var/tmp/portage/dev-embedded/u-boot-tools-2011.12/work/u-boot-2011.
* S: '/var/tmp/portage/dev-embedded/u-boot-tools-2011.12/work/u-boot-tools-2011.12
|
A little investigation shows that the C file generating the error:
| Quote: | /var/tmp/portage/dev-embedded/u-boot-tools-2011.12/work/u-boot-2011.12/tools/aisimage.c
|
includes image.h:
| Code: | # grep -n image.h /var/tmp/portage/dev-embedded/u-boot-tools-2011.12/work/u-boot-2011.12/tools/aisimage.c
27:#include "mkimage.h"
28:#include "aisimage.h"
29:#include <image.h>
|
...which pulls in
rather than it's own image.h at:
| Quote: | /var/tmp/portage/dev-embedded/u-boot-tools-2011.12/work/u-boot-2011.12/include/image.h
|
It turns out that /usr/lib/image.h is part of the lensfun package:
| Code: | # equery belongs /usr/include/image.h
* Searching for /usr/include/image.h ...
media-libs/lensfun-0.2.6 (/usr/include/image.h)
|
At first glance, it seems like the fix is to replace all instances of:
#include <image.h>
with
#include "image.h"
in the code tree.
However, while this did make compilation go further, it still failed with the same error later. At the moment, I'm at a loss to come up with a simple patch to fix this seemingly-simple issue.
Anybody else looked into this one? |
|
| Back to top |
|
 |
geeksheik Tux's lil' helper


Joined: 07 Sep 2003 Posts: 99 Location: Zürich, Switzerland
|
Posted: Thu Sep 06, 2012 11:41 am Post subject: |
|
|
Fix #2 seem to be the following:
Update the include directives to use the normal "-I" for the local include directory, rather than the "-idirafter" directive. Then remove the OBJTREE/include directive.
The following:
| Code: | HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \
-idirafter $(OBJTREE)/include2 \
-idirafter $(OBJTREE)/include \
-I $(SRCTREE)/lib/libfdt \
-I $(SRCTREE)/tools \
-DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \
-DUSE_HOSTCC \
-D__KERNEL_STRICT_NAMES
|
then becomes:
| Code: | HOSTCPPFLAGS = -I $(SRCTREE)/include \
-idirafter $(OBJTREE)/include2 \
-I $(SRCTREE)/lib/libfdt \
-I $(SRCTREE)/tools \
-DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \
-DUSE_HOSTCC \
-D__KERNEL_STRICT_NAMES
|
This must be done in the following Makefiles:
| Quote: | #grep -n -r "HOSTCPP.*idirafter" *
work/u-boot-2011.12/tools/Makefile:160:HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \
work/u-boot-2011.12/tools/imls/Makefile:52:HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \
work/u-boot-2011.12/tools/env/Makefile:30:HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \
|
However, there's still a linker error:
| Quote: | x86_64-pc-linux-gnu-gcc -march=core2 -mtune=generic -O2 -pipe -I /var/tmp/portage/dev-embedded/u-boot-tools-2011.12/work/u-boot-2011.12/include -idirafter /var/tmp/portage/dev-embedded/u-boot-tools-2011.12/work/u-boot-2011.12/include2 -I /var/tmp/portage/dev-embedded/u-boot-tools-2011.12/work/u-boot-2011.12/lib/libfdt -I /var/tmp/portage/dev-embedded/u-boot-tools-2011.12/work/u-boot-2011.12/tools -DCONFIG_SYS_TEXT_BASE= -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -Wl,-O1 -Wl,--as-needed -o ubsha1 os_support.o sha1.o ubsha1.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: errno: TLS definition in /lib64/libc.
/lib64/libc.so.6: could not read symbols: Bad value
collect2: ld gab 1 als Ende-Status zurück
make[1]: *** [ubsha1] Fehler 1
make[1]: *** Warte auf noch nicht beendete Prozesse...
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: errno: TLS definition in /lib64/libc.so.6 section .tbss mismatches non-TLS reference in aisimage.
/lib64/libc.so.6: could not read symbols: Bad value
collect2: ld gab 1 als Ende-Status zurück
make[1]: *** [mkimage] Fehler 1
make[1]: Leaving directory `/var/tmp/portage/dev-embedded/u-boot-tools-2011.12/work/u-boot-2011.1
make: *** [tools-all] Fehler 2
* ERROR: dev-embedded/u-boot-tools-2011.12 failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=dev-embedded/u-boot-tools-2011.12'`,
* the complete build log and the output of `emerge -pqv '=dev-embedded/u-boot-tools-2011.12'`.
* The complete build log is located at '/var/tmp/portage/dev-embedded/u-boot-tools-2011.12/temp/build.log
* The ebuild environment file is located at '/var/tmp/portage/dev-embedded/u-boot-tools-2011.12/temp/environ
* Working directory: '/var/tmp/portage/dev-embedded/u-boot-tools-2011.12/work/u-boot-2011.
* S: '/var/tmp/portage/dev-embedded/u-boot-tools-2011.12/work/u-boot-2011.12'
|
|
|
| Back to top |
|
 |
Marsupilami23 n00b


Joined: 11 Jun 2002 Posts: 18 Location: Roseville, CA
|
Posted: Sun May 04, 2014 7:20 pm Post subject: U-boot fails to build with aisimage error |
|
|
I know this is an old post, but still is an issue.
The work around for me was to rename the original /usr/include/image.h file to something else and copy the u-boot srcdir/include/image.h to the /usr/include directory, then re-compile.
Once done, don't forget to rename the original image.h back. _________________ Been there, done that! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|