From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 25 Jul 2022 17:37:23 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oG096-003KP5-C9 for lore@lore.pengutronix.de; Mon, 25 Jul 2022 17:37:23 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1oG095-0002do-4O; Mon, 25 Jul 2022 17:37:23 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oG08g-0002df-Vs; Mon, 25 Jul 2022 17:36:59 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oG08g-0038xY-67; Mon, 25 Jul 2022 17:36:58 +0200 Received: from mol by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oG08f-00DZPd-6d; Mon, 25 Jul 2022 17:36:57 +0200 Date: Mon, 25 Jul 2022 17:36:57 +0200 From: Michael Olbrich To: Alexander Dahl Message-ID: Mail-Followup-To: Alexander Dahl , ptxdist@pengutronix.de References: <15979690.J2xNbxXsf2@ada> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <15979690.J2xNbxXsf2@ada> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain Subject: Re: [ptxdist] Build U-Boot against host-openssl fails X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false 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 |