mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Alexander Dahl <ada@thorsis.com>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] Build U-Boot against host-openssl fails
Date: Mon, 25 Jul 2022 17:36:57 +0200	[thread overview]
Message-ID: <Yt64meQ9gBSWSNm+@pengutronix.de> (raw)
In-Reply-To: <15979690.J2xNbxXsf2@ada>

On Mon, Jul 25, 2022 at 04:41:45PM +0200, Alexander Dahl wrote:
> Hei hei,
> 
> although claiming it's optional latest U-Boot versions require OpenSSL on the 
> host.¹  I added an option to build host-openssl with commit 
> 0c779a60e50c40d522b1e9c20b5c75b2e57fde5a ("u-boot: Add option to depend on 
> host-openssl") but ptxdist u-boot package still fails to link to host openssl 
> package, message is always missing some openssl symbols.
> 
> I tried the same thing as barebox now in rules/u-boot.make like this:
> 
> +# use host pkg-config for host tools
> +U_BOOT_PATH        := PATH=$(HOST_PATH)
> 
> This does not help. 
> 
> I'm somehow suspecting the wrong pkg-config is called.  Affected is not the 
> target image, but the host tools (like mkimage) built alongside with the 
> target stuff (which you 1) can not disable to build and 2) need for certain 
> parts of the ptxdist package anyways, so not building those is no option).
> 
> I tried each combination of PTXCONF_U_BOOT_NEEDS_HOST_OPENSSL and 
> CONFIG_TOOLS_LIBCRYPTO in U-Boot kconfig, all fail.
> 
> buildroot has a fix for building against host-openssl, but I don't understand 
> it, and I'm not sure if the same approach would work in ptxdist.
> 
> Any ideas?
> 
> (Disclaimer: this only happens on a quite recent U-Boot, e.g. from 2022.)
> (More disclaimer: it does not happen if libssl-dev is installed on the build 
> host.)

This sounds like u-boot is calling /usr/bin/pkg-config instead of
.../sysroot-host/bin/pkg-config (and not the cross pkg-config either).

Maybe /usr/bin/pkg-config is called explicitly with the whole path
somewhere? That could be a "feature" to avoid the cross pkg-config when
cross-compiling.

Michael

> ¹ I consider this a bug, and I'm not the only one, but several attempts to fix 
> this in upstream U-Boot did not lead to merge any fix.
> 
> 
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2022-07-25 15:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25 14:41 Alexander Dahl
2022-07-25 15:36 ` Michael Olbrich [this message]
2022-07-25 19:09   ` Alexander Dahl
2022-07-26  7:43     ` Alexander Dahl
2022-07-29  6:40       ` Michael Olbrich
2022-08-03 11:20         ` Alexander Dahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yt64meQ9gBSWSNm+@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ada@thorsis.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox