[U-Boot] binman: 'module' object has no attribute 'FinaliseOutputDir'

Simon Glass sjg at chromium.org
Wed Jun 21 03:29:40 UTC 2017


Hi Kevin,

On 2 June 2017 at 14:44, Kevin Hilman <khilman at baylibre.com> wrote:
> On Fri, Jun 2, 2017 at 11:00 AM, Simon Glass <sjg at chromium.org> wrote:
>> Hi Kevin,
>>
>> On 1 June 2017 at 17:08, Kevin Hilman <khilman at baylibre.com> wrote:
>>>
>>> On Thu, Jun 1, 2017 at 8:23 AM, Simon Glass <sjg at chromium.org> wrote:
>>> > Hi Kevin,
>>> >
>>> > On 1 June 2017 at 07:55, Kevin Hilman <khilman at baylibre.com> wrote:
>>> >> On Wed, May 31, 2017 at 12:19 PM, Simon Glass <sjg at chromium.org> wrote:
>>> >>> Hi Kevin,
>>> >>>
>>> >>> On 31 May 2017 at 12:13, Kevin Hilman <khilman at baylibre.com> wrote:
>>> >>>> While trying to build v2017.05 for sun5i-r8-chip (CHIP_defconfig), I get
>>> >>>> the following build error.  I'm not familiar with binman, so not sure
>>> >>>> what I should be looking for.
>>> >>>>
>>> >>>> $ CROSS_COMPILE=arm-linux-gnueabihf- make
>>> >>>>
>>> >>>> [...]
>>> >>>>
>>> >>>>  LD      spl/drivers/serial/built-in.o
>>> >>>>  LD      spl/drivers/built-in.o
>>> >>>>  LD      spl/common/built-in.o
>>> >>>>  LD      spl/lib/built-in.o
>>> >>>>  LD      spl/u-boot-spl
>>> >>>>  OBJCOPY spl/u-boot-spl-nodtb.bin
>>> >>>>  COPY    spl/u-boot-spl.bin
>>> >>>>  MKSUNXI spl/sunxi-spl.bin
>>> >>>>  BINMAN  u-boot-sunxi-with-spl.bin
>>> >>>>  binman: 'module' object has no attribute 'FinaliseOutputDir'
>>> >>>>  Makefile:1107: recipe for target 'u-boot-sunxi-with-spl.bin' failed
>>> >>>>  make: *** [u-boot-sunxi-with-spl.bin] Error 1
>>> >>>>
>>> >>>>
>>> >>>> If it matters, compiler is: gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05)
>>> >>>
>>> >>> Do you know what version of python you are using? I cannot imagine
>>> >>> what is happening here.
>>> >>
>>> >> $ python
>>> >> Python 2.7.12 (default, Nov 19 2016, 06:48:10)
>>> >> [GCC 5.4.0 20160609] on linux2
>>> >> Type "help", "copyright", "credits" or "license" for more information.
>>> >>>>>
>>> >>
>>> >> and fwiw, this is on Ubuntu 16.04 LTS.
>>> >
>>> > That's what I am using too. This is really mystifying. Are you able to
>>> > debug the python code?
>>>
>>> If you give me some pointers/suggestions, I'd be glad to, but I don't
>>> currently have much time to go wandering too deep into the uboot
>>> weeds.
>>
>> My guess is that you have a tools.py file somewhere in your Python
>> site_packages. You should be able to test this with:
>>
>> python
>>> import tools
>>
>> Perhaps 'dpkg -S tools.py' will tell you what package installed it.
>
> $ python
> Python 2.7.12 (default, Nov 19 2016, 06:48:10)
> [GCC 5.4.0 20160609] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import os.path
>>>> import tools
>>>> print os.path.abspath(tools.__file__)
> /usr/local/lib/python2.7/dist-packages/tools/__init__.pyc
>>>>
>
> So since this is in /usr/local, dpkg -S didn't help, so it was
> something installed by pip.  Turns out that it was the jira-python
> package, installed by pip that had installed this tools dir.
>
>> If you don't get an error then it suggests you already have this
>> package. That in turn would suggest that the fix is that the path
>> should be prepended instead of appended at the top of binman.py.
>
> "pip uninstall jira-python" also did the trick, but prepending worked
> too.  I suppose having a name slightly less generic than "tools" would
> also work.
>
> Anyways, I got it building now, so I'll let you decide which is the
> "right way" to fix.

OK thanks for helping with this. I sent a patch.

http://patchwork.ozlabs.org/patch/778613/

Regards,
Simon
[...]


More information about the U-Boot mailing list