From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 25 Jul 2022 21:10:25 +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 1oG3TF-003XKy-TD for lore@lore.pengutronix.de; Mon, 25 Jul 2022 21:10:25 +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 1oG3TE-0001Qc-MD; Mon, 25 Jul 2022 21:10:24 +0200 Received: from mout.kundenserver.de ([212.227.17.10]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oG3Se-0001QT-Ue for ptxdist@pengutronix.de; Mon, 25 Jul 2022 21:09:49 +0200 Received: from methusalix.internal.home.lespocky.de ([92.117.46.139]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MJEtx-1nvu0m46ot-00Kdv4; Mon, 25 Jul 2022 21:09:40 +0200 Received: from falbala.internal.home.lespocky.de ([192.168.243.94]) by methusalix.internal.home.lespocky.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oG3SS-0003yK-63; Mon, 25 Jul 2022 21:09:38 +0200 Date: Mon, 25 Jul 2022 21:09:35 +0200 From: Alexander Dahl To: Alexander Dahl , ptxdist@pengutronix.de Message-ID: Mail-Followup-To: Alexander Dahl , ptxdist@pengutronix.de References: <15979690.J2xNbxXsf2@ada> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SSbqHLdRTPe9C3PJ" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/2.0.5 (2021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fqy3 k1ZbXOA/XqF0ZnseIIVJHHOP60pTUt4bQMJAfw== X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=4.0 tests=AWL,BAYES_00, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 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 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 --SSbqHLdRTPe9C3PJ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Michael, Am Mon, Jul 25, 2022 at 05:36:57PM +0200 schrieb Michael Olbrich: > On Mon, Jul 25, 2022 at 04:41:45PM +0200, Alexander Dahl wrote: > > Hei hei, > >=20 > > although claiming it's optional latest U-Boot versions require OpenSSL = on the=20 > > host.=B9 I added an option to build host-openssl with commit=20 > > 0c779a60e50c40d522b1e9c20b5c75b2e57fde5a ("u-boot: Add option to depend= on=20 > > host-openssl") but ptxdist u-boot package still fails to link to host o= penssl=20 > > package, message is always missing some openssl symbols. > >=20 > > I tried the same thing as barebox now in rules/u-boot.make like this: > >=20 > > +# use host pkg-config for host tools > > +U_BOOT_PATH :=3D PATH=3D$(HOST_PATH) > >=20 > > This does not help.=20 > >=20 > > I'm somehow suspecting the wrong pkg-config is called. Affected is not= the=20 > > target image, but the host tools (like mkimage) built alongside with th= e=20 > > target stuff (which you 1) can not disable to build and 2) need for cer= tain=20 > > parts of the ptxdist package anyways, so not building those is no optio= n). > >=20 > > I tried each combination of PTXCONF_U_BOOT_NEEDS_HOST_OPENSSL and=20 > > CONFIG_TOOLS_LIBCRYPTO in U-Boot kconfig, all fail. > >=20 > > buildroot has a fix for building against host-openssl, but I don't unde= rstand=20 > > it, and I'm not sure if the same approach would work in ptxdist. > >=20 > > Any ideas? > >=20 > > (Disclaimer: this only happens on a quite recent U-Boot, e.g. from 2022= =2E) > > (More disclaimer: it does not happen if libssl-dev is installed on the = build=20 > > host.) >=20 > 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). >=20 > 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. Sorry, I wanted to paste the actual part from tools/Makefile (u-boot source) and this is it: 174 # MXSImage needs LibSSL 175 ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_ARMADA_38X)$(CONFIG_TOOLS_L= IBCRYPTO),) 176 HOSTCFLAGS_kwbimage.o +=3D \ 177 $(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo "= ") 178 HOSTLDLIBS_mkimage +=3D \ 179 $(shell pkg-config --libs libssl libcrypto 2> /dev/null || echo "-l= ssl -lcrypto") 180 181 # OS X deprecate openssl in favour of CommonCrypto, supress deprecation 182 # warnings on those systems 183 ifeq ($(HOSTOS),darwin) 184 HOSTCFLAGS_mxsimage.o +=3D -Wno-deprecated-declarations 185 HOSTCFLAGS_image-sig.o +=3D -Wno-deprecated-declarations 186 HOSTCFLAGS_rsa-sign.o +=3D -Wno-deprecated-declarations 187 endif 188 endif I'm not sure how I can verify what's actually called here? Just had another look at what buildroot does. Seems like host-pkg-config is required, IIRC that was not used by ptxdist. Not sure how I can let ptxdist use host pkg-config, but I hope I'll find out tomorrow. Greets Alex >=20 > Michael >=20 > > =B9 I consider this a bug, and I'm not the only one, but several attemp= ts to fix=20 > > this in upstream U-Boot did not lead to merge any fix. > >=20 > >=20 > >=20 > >=20 > >=20 >=20 > --=20 > 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 | --=20 /"\ ASCII RIBBON | =BBWith the first link, the chain is forged. The first \ / CAMPAIGN | speech censured, the first thought forbidden, the X AGAINST | first freedom denied, chains us all irrevocably.=AB / \ HTML MAIL | (Jean-Luc Picard, quoting Judge Aaron Satie) --SSbqHLdRTPe9C3PJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEwo7muQJjlc+Prwj6NK3NAHIhXMYFAmLe6msACgkQNK3NAHIh XMbW+A/+J85WBsEUwgdv5UDzPRF9Xa+m1PTr5GnNCAUJRVAe4K+2Yalpt3PbTpT5 yWrbF57eD9NzuXLNxS6rebdTJAC0QFQ/lrhzpkCAm3KcVZn/o7dZbOfcmNIcJEOZ l3ZMwoYpsB1Ai9KZY3/U6OKulHUb+CDHXJBl2arUiBK4S+XJ2ePdkDbp2/gAMrRL kA/gvbYP2SWap9KhIPLUHutwT/BIRc6gxSXpR/nWzjnnzUpKSp70e+FsMpHv0KMx FeqRMrRV2SOMDGpFBPdyFThR2AGKnpZZPyoQz/2dDijWZ+IAdZOZCEIsVApwr2R0 Xwr/s3yG0eudliBjstvjHBTGScWKNKTP7gN5LlE9EFWyPqKqDyEWE1Ef3xcWk7jP sCi75oBZ5FtPdrLv8xT6kJvYEKQVl8qeaqQSEKjTQn8joLeitPdC7qxxUem95j7N s//IRnMVZ1mLLnhepc2aXDBTI29n7K+hfMahrwxFzTGvFLbhyLJdkJdNk6Utuu5n hoFcHxoHBzWERAprCc+tlp9ucPEps5/fNMQK9qm+sjgxxvJEPvlgXweAU0sIuIxO l0C/VXEEo5fZ7FeXCB0xZR62awxKhqS/LOxgWBzfy86JHMfUzlziTEgazQjgpCvK RTQvin+JXzOSxKqKjLX5VLfRkG0lUHs5CEWF+SAh6vltH9YInYs= =xT8z -----END PGP SIGNATURE----- --SSbqHLdRTPe9C3PJ--