Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 541352 - dev-embedded/u-boot-tools-2015.01 fails to build: tools/image-host.c:63:16: error: ‘HASH_MAX_DIGEST_SIZE’ undeclared (first use in this function)
Summary: dev-embedded/u-boot-tools-2015.01 fails to build: tools/image-host.c:63:16: e...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-25 16:18 UTC by Markus Meier
Modified: 2021-02-19 08:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-embedded:u-boot-tools-2015.01:20150223-120902.log (dev-embedded:u-boot-tools-2015.01:20150223-120902.log,5.14 KB, text/plain)
2015-02-25 16:18 UTC, Markus Meier
Details
.config (u-boot-config,2.73 KB, text/plain)
2015-02-28 10:18 UTC, Markus Meier
Details
emerge log (dev-embedded-u-boot-tools-2015.04-20150513-231420.log,5.50 KB, text/plain)
2015-05-14 09:02 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Meier gentoo-dev 2015-02-25 16:18:39 UTC
Created attachment 397492 [details]
dev-embedded:u-boot-tools-2015.01:20150223-120902.log

* Package:    dev-embedded/u-boot-tools-2015.01
 * Repository: gentoo
 * Maintainer: dev-embedded@gentoo.org
 * USE:        arm elibc_glibc kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox test userpriv usersandbox

  HOSTCC  tools/image-host.o
In file included from include/bootm.h:12:0,
                 from tools/image-host.c:13:
tools/image-host.c: In function ‘fit_image_process_hash’:
tools/image-host.c:63:16: error: ‘HASH_MAX_DIGEST_SIZE’ undeclared (first use in this function)
  uint8_t value[FIT_MAX_HASH_LEN];
                ^
tools/image-host.c:63:16: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.host:108: recipe for target 'tools/image-host.o' failed
make[1]: *** [tools/image-host.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:1093: recipe for target 'tools' failed
make: *** [tools] Error 2
 * ERROR: dev-embedded/u-boot-tools-2015.01::gentoo failed (compile phase):
 *   emake failed

Portage 2.2.17 (python 2.7.9-final-0, default/linux/arm/13.0/armv5te/desktop, gcc-4.9.2, glibc-2.20-r2, 3.9.2 armv5tel)
=================================================================
System uname: Linux-3.9.2-armv5tel-with-gentoo-2.2
KiB Mem:      513632 total,     35540 free
KiB Swap:    2104508 total,   1303412 free
Timestamp of repository gentoo: Sun, 22 Feb 2015 19:00:01 +0000
sh bash 4.3_p33-r1
ld GNU ld (Gentoo 2.25 p1.0) 2.25
ccache version 3.2.1 [disabled]
app-shells/bash:          4.3_p33-r1::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r2::gentoo, 3.2.5-r6::gentoo, 3.3.5-r1::gentoo, 3.4.2::gentoo
dev-util/ccache:          3.2.1-r1::gentoo
dev-util/cmake:           3.1.0::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.13.11::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.4_p6-r2::gentoo, 1.8.5-r5::gentoo, 1.9.6-r4::gentoo, 1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25::gentoo
sys-devel/gcc:            4.7.4::gentoo, 4.8.4::gentoo, 4.9.2::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://192.168.1.100/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv5tel-softfloat-linux-gnueabi"
CFLAGS="-O2 -march=armv5te -pipe"
CHOST="armv5tel-softfloat-linux-gnueabi"
CONFIG_PROTECT="/etc /usr/lib/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/spool/munin-async/.ssh"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=armv5te -pipe"
DISTDIR="/mnt/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n --jobs=2 --keep-going --backtrack=3"
FCFLAGS="-O2 -pipe -march=armv5te"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict test test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe -march=armv5te"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa apache2 arm berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm graphite gtk iconv jpeg lcms libav libnotify mad mng modules mp3 mp4 mpeg ncurses nls nptl ogg opengl pam pango pcre pdf png policykit ppds qt3support qt4 readline sdl semantic-desktop session spell ssl startup-notification svg tcpd test threads tiff truetype udev udisks unicode upower usb vorbis wxwidgets xcb xml xv xvid zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4 php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3 python3_4" RUBY_TARGETS="ruby19 ruby20 ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap omapfb dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2015-02-28 08:29:32 UTC
Can you attach your .config file please?

I think I can see the problem

FIT_MAX_HASH_LEN is only defined if CONFIG_FIT is enabled but it used used later on unconditionally.

Sounds like we need to enforce CONFIG_FIT in our tools build but this is really an upstream bug I think.
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2015-02-28 08:33:19 UTC
Moreover, can you edit the ebuild to use

emake sandbox_defconfig instead of defconfig

and see if that fixes your problem?
Comment 3 Markus Meier gentoo-dev 2015-02-28 10:18:10 UTC
Created attachment 397650 [details]
.config

(In reply to Markos Chandras from comment #1)
> Can you attach your .config file please?
Comment 4 Markos Chandras (RETIRED) gentoo-dev 2015-02-28 10:25:18 UTC
(In reply to Markos Chandras from comment #1)
> Can you attach your .config file please?
> 
> I think I can see the problem
> 
> FIT_MAX_HASH_LEN is only defined if CONFIG_FIT is enabled but it used used
> later on unconditionally.
> 
> Sounds like we need to enforce CONFIG_FIT in our tools build but this is
> really an upstream bug I think.

Ignore that. I was looking at the wrong thing...
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2015-02-28 10:28:52 UTC
(In reply to Markos Chandras from comment #4)
> (In reply to Markos Chandras from comment #1)
> > Can you attach your .config file please?
> > 
> > I think I can see the problem
> > 
> > FIT_MAX_HASH_LEN is only defined if CONFIG_FIT is enabled but it used used
> > later on unconditionally.
> > 
> > Sounds like we need to enforce CONFIG_FIT in our tools build but this is
> > really an upstream bug I think.
> 
> Ignore that. I was looking at the wrong thing...

no actually i was right. it still seems a problem with CONFIG_FIT. hash.h is only included if CONFIG_FIT is enabled.
Comment 6 Markos Chandras (RETIRED) gentoo-dev 2015-02-28 10:38:01 UTC
However, it builds fine without CONFIG_FIT on x86_64
Comment 7 Markus Meier gentoo-dev 2015-02-28 11:00:49 UTC
(In reply to Markos Chandras from comment #2)
> Moreover, can you edit the ebuild to use
> 
> emake sandbox_defconfig instead of defconfig
> 
> and see if that fixes your problem?

Nope, this doesn't help:

  HOSTCC  tools/image-host.o
In file included from include/bootm.h:12:0,
                 from tools/image-host.c:13:
tools/image-host.c: In function ‘fit_image_process_hash’:
tools/image-host.c:63:16: error: ‘HASH_MAX_DIGEST_SIZE’ undeclared (first use in this function)
  uint8_t value[FIT_MAX_HASH_LEN];
                ^
tools/image-host.c:63:16: note: each undeclared identifier is reported only once for each function it appears in
  WRAP    tools/common/image.c
  HOSTCC  tools/imagetool.o
scripts/Makefile.host:108: recipe for target 'tools/image-host.o' failed
make[1]: *** [tools/image-host.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:1093: recipe for target 'tools' failed
make: *** [tools] Error 2
 * ERROR: dev-embedded/u-boot-tools-2015.01::x-gentoo-x86 failed (compile phase):
 *   emake failed
Comment 8 Markos Chandras (RETIRED) gentoo-dev 2015-02-28 11:29:59 UTC
unfortunately I can't seem to suggest anything else. You need to do some debugging on your platform. after the switch to kconfig/kbuild build system, it should be easier to debug build problems in u-boot.
Comment 9 Toralf Förster gentoo-dev 2015-05-14 09:02:39 UTC
Created attachment 403234 [details]
emerge log

happened here to at a chroot tinderbox image,  log attached
Comment 10 Sergei Trofimovich (RETIRED) gentoo-dev 2020-02-03 07:47:41 UTC
Is it still a problem on the modern u-boot-tools?