[ELDK] [PATCH v1 1/1] META-ELDK: u-boot-mkimage: Unbreak build (missing SSL headers)

Gerhard Sittig gsi at denx.de
Wed Apr 16 16:02:23 CEST 2014


On Wed, 2014-04-16 at 14:19 +0200, Marek Vasut wrote:
> 
> On Monday, April 14, 2014 at 07:43:57 PM, Gerhard Sittig wrote:
> > in the absence of OpenSSL headers in the host, builds for the
> > u-boot-mkimage-native package fail with the following error
> > 
> >   mxsimage.c:18:25: fatal error: openssl/evp.h: No such file or directory
> > 
> > the error goes unnoticed when the host has libssl-dev installed, which
> > could be considered another issue because one could argue the host's
> > OpenSSL configuration should not influence the Yocto build
> > 
> > this change unbreaks compilation of the u-boot-mkimage-native package
> > 
> > Signed-off-by: Gerhard Sittig <gsi at denx.de>
> 
> While this is rather dirty, I don't see a better way without patching the U-Boot 
> Makefiles .

It appears my local tests have omitted one variant, adding

  HOSTCFLAGS="${CFLAGS}"

to the EXTRA_OEMAKE spec.  This would be preferrable to setting

  HOSTCC="${CC} ${CFLAGS}"

which gets perceived as unnatural and dirty.  In my previous
tests I must have misspelled this, or else it had become the
suggested patch.


Just did a quick test with U-Boot v2014.04.  To build this
version, the configure step is required as well (mandatory now,
even when building the tools exclusively).

For better demonstration of the changes I will cite the diff here
between the 2014.01 and the 2014.04 recipes instead of submitting
the complete recipe file.  Things build fine, the
'./tmp/sysroots/x86_64-linux/usr/bin/mkimage --help' command is
operational.  Haven't built another kernel yet, as this is
painfully time consuming.

Marek, as you are "mxs aware", can you check whether the
resulting native binaries fit your purposes?  Or whether we need
to configure for mx28, since this is forced in EXTRA_OEMAKE, too?


> We will have to port it to 5.6 and fix this in 5.6 to work with kbuild as well.

The 'HOSTCFLAGS="${CFLAGS}"' approach should work with both
U-Boot versions.  ELDK 5.6 probably uses something newer than
U-Boot v2014.01.  With this Kbuild version, the config step is
required.  "sandbox" should be OK for the "portable tools".


> Acked-by: Marek Vasut <marex at denx.de>

Thank you!  Of course I have to create a patch which passes
HOSTCFLAGS, while we agree that EXTRA_OEMAKE needs adjustment to
pick up the existing OpenSSL header files correctly, and that the
generic approach to the problem is OK.

I'd suggest that I rework the commit message to better reflect
the underlying problem.  In hindsight the v1 commit message looks
inappropriate.  Here is what I could come up with in the
meantime:

  META-ELDK: u-boot-mkimage: Unbreak build (missing SSL headers)

  building the u-boot-mkimage-native package breaks with the error message

    mxsimage.c:18:25: fatal error: openssl/evp.h: No such file or directory

  OpenSSL related header files are not found despite their being present
  in the native sysroot

  the error can be hidden by libssl-dev packages in the build machine, in
  this case the host's header files are used instead (which is another
  independent potential source of issues, building applications against
  headers that don't match the library which gets used at runtime)

  this change unbreaks compilation of the u-boot-mkimage-native package


virtually yours
Gerhard Sittig
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de


More information about the eldk mailing list