Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7B478C54EBC for ; Sat, 7 Jan 2023 21:51:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ADA3E8545F; Sat, 7 Jan 2023 22:51:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="cdCtona7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3156C854CF; Sat, 7 Jan 2023 22:51:17 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AD1E08545F for ; Sat, 7 Jan 2023 22:51:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 42F1060B8C; Sat, 7 Jan 2023 21:51:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56139C433D2; Sat, 7 Jan 2023 21:51:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673128271; bh=wJHIEE0F4yI966M6oX0Hn7b2mWjFxsTtplVvOV4UXdY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cdCtona7Tu+xHLfKGkXB/1CY0m5OTi4V4tYaZKpWGYeDgL4/DGMHv+OrL92bn8HmR Dlh+iukb2ZZ+9lG2FRGzARKZpAPZhd1lpC3H+hqIw+yOwHylT/6MG68ud9lsTOVc/f VHhoV8gQXRVhEvd3QDvD4PJigF1+4OKxEWVlTfv/s/oLCLgfiaD2QOns+wZjse4Ueu xEqiWcWzMW0kXf0QXcQteGbRwO4m0bV5nEMaHMUP9IW4/5oCadmDrc9XS2MWLqfNXz f8G3FBBAY027hAxJk8jb9e09hgbrrlngBIoSxr1JspZOzFHPsGaT/3q6wem5Ls8ttS yG8p4AbzPRWJQ== Received: by pali.im (Postfix) id 93FE2ADB; Sat, 7 Jan 2023 22:51:08 +0100 (CET) Date: Sat, 7 Jan 2023 22:51:08 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Tom Rini Cc: Philippe Schenker , Marek Vasut , Simon Glass , u-boot@lists.denx.de Subject: Re: Broken powerpc compilation since commit 141659187667 ("pylibfdt: Fix disable version normalization") Message-ID: <20230107215108.otnsnw3dkfp626mo@pali> References: <20230107212306.ahs2utfjinnnvdu6@pali> <20230107212400.GT3787616@bill-the-cat> <20230107212543.77lnae4hnnw5f6kv@pali> <20230107212805.GU3787616@bill-the-cat> <20230107213625.rj7hhoovi63aajcl@pali> <20230107214516.GW3787616@bill-the-cat> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230107214516.GW3787616@bill-the-cat> User-Agent: NeoMutt/20180716 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Saturday 07 January 2023 16:45:16 Tom Rini wrote: > On Sat, Jan 07, 2023 at 10:36:25PM +0100, Pali Rohár wrote: > > On Saturday 07 January 2023 16:28:05 Tom Rini wrote: > > > On Sat, Jan 07, 2023 at 10:25:43PM +0100, Pali Rohár wrote: > > > > On Saturday 07 January 2023 16:24:00 Tom Rini wrote: > > > > > On Sat, Jan 07, 2023 at 10:23:06PM +0100, Pali Rohár wrote: > > > > > > > > > > > Hello! Now I was going to test urgent release workaround/fix for this > > > > > > issue https://lists.denx.de/pipermail/u-boot/2023-January/503900.html > > > > > > but I figured out that I cannot compile u-boot from master branch for > > > > > > powerpc platform. make throws following error: > > > > > > > > > > > > LDS u-boot.lds > > > > > > HOSTLD scripts/dtc/dtc > > > > > > Traceback (most recent call last): > > > > > > File "scripts/dtc/pylibfdt/setup.py", line 23, in > > > > > > from setuptools import setup, Extension, sic > > > > > > ImportError: cannot import name 'sic' from 'setuptools' (/usr/lib/python3/dist-packages/setuptools/__init__.py) > > > > > > make[2]: *** [scripts/dtc/pylibfdt/Makefile:33: rebuild] Error 1 > > > > > > make[1]: *** [scripts/Makefile.build:398: scripts/dtc/pylibfdt] Error 2 > > > > > > make: *** [Makefile:2031: scripts_dtc] Error 2 > > > > > > > > > > > > git bisect showed me that problematic commit is one from yesterday: > > > > > > > > > > > > 141659187667 ("pylibfdt: Fix disable version normalization") > > > > > > > > > > > > Reverting it on top of master branch compiled u-boot for powerpc without > > > > > > issues. > > > > > > > > > > > > It looks like a bit complicated issue as that commit is fixing another > > > > > > commit from two weeks before: > > > > > > > > > > > > 440098c42e73 ("pylibfdt: Fix version normalization warning") > > > > > > > > > > > > Tom, do you have an idea how to handle this? > > > > > > > > > > What host distro are you on? > > > > > > > > On this build machine I have currently Debian 10. > > > > > > OK, and does undoing the mentioned commit and trying: > > > https://github.com/u-boot/u-boot/pull/266/commits/eb76bf5864b53938db639867ad5d75893b5a571e > > > instead work there? > > > > I checkout master branch, then I reverted commit 141659187667 and then > > I applied a495b8f497dc from github. But it does not work, it throws error: > > > > LDS u-boot.lds > > HOSTCC scripts/dtc/dtc-lexer.lex.o > > HOSTCC scripts/dtc/dtc-parser.tab.o > > Traceback (most recent call last): > > File "scripts/dtc/pylibfdt/setup.py", line 25, in > > from packaging import version > > ModuleNotFoundError: No module named 'packaging' > > make[2]: *** [scripts/dtc/pylibfdt/Makefile:33: rebuild] Error 1 > > make[1]: *** [scripts/Makefile.build:398: scripts/dtc/pylibfdt] Error 2 > > make[1]: *** Waiting for unfinished jobs.... > > make: *** [Makefile:2031: scripts_dtc] Error 2 > > Try this, which should just bring us back to printing an annoying but > harmless warning: > diff --git a/scripts/dtc/pylibfdt/setup.py b/scripts/dtc/pylibfdt/setup.py > index c07f65e6bcaf..8baae08770ca 100755 > --- a/scripts/dtc/pylibfdt/setup.py > +++ b/scripts/dtc/pylibfdt/setup.py > @@ -20,12 +20,17 @@ allows this script to be run stand-alone, e.g.: > ./pylibfdt/setup.py install [--prefix=...] > """ > > -from setuptools import setup, Extension, sic > +from setuptools import setup, Extension > from setuptools.command.build_py import build_py as _build_py > import os > import re > import sys > > +try: > + from setuptools import sic > +except ImportError: > + pass > + > srcdir = os.path.dirname(__file__) > > with open(os.path.join(srcdir, "../README"), "r") as fh: > @@ -113,7 +118,10 @@ progname = sys.argv[0] > files = os.environ.get('SOURCES', '').split() > cflags = os.environ.get('CPPFLAGS', '').split() > objdir = os.environ.get('OBJDIR') > -version = os.environ.get('VERSION') > +try: > + version = sic(os.environ.get('VERSION')) > +except: > + version = os.environ.get('VERSION') > swig_opts = os.environ.get('SWIG_OPTS', '').split() > > # If we were called directly rather than through our Makefile (which is often > @@ -137,7 +145,7 @@ class build_py(_build_py): > > setup( > name='libfdt', > - version=sic(version), > + version=version, > cmdclass = {'build_py' : build_py}, > author='Simon Glass', > author_email='sjg@chromium.org', > > -- > Tom This one works fine. It prints that UserWarning but u-boot.bin is built.