setup_board/build_packages failing due to "ImportError: No module named elftools.elf.elffile"

1,923 views
Skip to first unread message

Kazuhiro Inaba

unread,
Jan 15, 2013, 9:00:45 PM1/15/13
to chromiu...@chromium.org
Latest trunk fails to build on my environment. Does anyone know how to resolve this?

(cr) ((9086a3f...)) $ ./build_packages
ChromeOS version information:
    CHROME_BRANCH=26
    CHROME_VERSION=
    CHROMEOS_VERSION_STRING=3563.0.2013_01_16_1052
    CHROME_BASE=
    CHROME_ORIGIN=LOCAL_SOURCE
INFO    : Elapsed time (run_chroot_version_hooks): 0m0s
10:52:30: INFO: Uploading command stats to 'https://chromiumos-build-stats.appspot.com/upload_command_stats'
INFO    : Updating chroot
Starting fast-emerge.
 Building package crossdev on root
Calculating deps...
Deps calculated in 0m0.6s

Total: 0 packages, Size of downloads: 0 kB
Done
Traceback (most recent call last):
  File "/home/kinaba/trunk/chromite/bin/cros_setup_toolchains", line 40, in <module>
    commandline.ScriptWrapperMain(FindTarget)
  File "/mnt/host/source/chromite/lib/commandline.py", line 380, in ScriptWrapperMain
    target = find_target_func(target)
  File "/home/kinaba/trunk/chromite/bin/cros_setup_toolchains", line 31, in FindTarget
    module = __import__('.'.join(target))
  File "/mnt/host/source/chromite/scripts/cros_setup_toolchains.py", line 22, in <module>
    import lddtree
  File "/mnt/host/source/chromite/third_party/lddtree.py", line 22, in <module>
    from elftools.elf.elffile import ELFFile
ImportError: No module named elftools.elf.elffile

Kazuhiro Inaba

unread,
Jan 15, 2013, 9:06:47 PM1/15/13
to chromiu...@chromium.org, Mike Frysinger

Mike Frysinger

unread,
Jan 15, 2013, 11:19:32 PM1/15/13
to Kazuhiro Inaba, chromium-os-dev
make sure your tree is up to date and fully synced. partials syncs
are never supported.

if, after doing that, `cros_setup_toolchains --help` errors out:
- chromite/third_party/pyelftools/ should exist
- chromite/__init__.py adds pyelftools to the search path
- `which cros_setup_toolchains` points to
~/trunk/chromite/bin/cros_setup_toolchains
- chromite/bin/cros_setup_toolchains is a symlink to ../scripts/wrapper.py
-mike
> --
> --
> Chromium OS Developers mailing list: chromiu...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en
>
>
>

Kazuhiro Inaba

unread,
Jan 15, 2013, 11:40:20 PM1/15/13
to chromiu...@chromium.org, Kazuhiro Inaba
#from the correct address

Thanks,

> make sure your tree is up to date and fully synced.  partials syncs
> are never supported.
I'm syncing to the tip with the simple "repo sync", but with minilayout. Is it unsupported now?

> - chromite/third_party/pyelftools/ should exist
NO
> - chromite/__init__.py adds pyelftools to the search path
YES
> - `which cros_setup_toolchains` points to ~/trunk/chromite/bin/cros_setup_toolchains
YES

> - chromite/bin/cros_setup_toolchains is a symlink to ../scripts/wrapper.py
YES

Kazuhiro Inaba

unread,
Jan 16, 2013, 12:10:41 AM1/16/13
to chromiu...@chromium.org, Kazuhiro Inaba
Gah, my minilayout checkout seems to be old.

I found
> repo init -m minilayout.xml is no longer supported, nor expected to fully
> work.
> From the root of the checkout, run chromite/bin/loman --upgrade-minilayout .
> That will convert your existing checkout to the new minilayout workflow,
> leaving your existing workon projects enabled.
in minilayout.xml and doing that -> repo sync again resolved the import issue.

Sorry to bother you, and thanks for the response.

Xiaohan Wang (王消寒)

unread,
Jan 31, 2013, 1:25:58 PM1/31/13
to Kazuhiro Inaba, Chromium OS dev
FWIW, I saw exactly the same "issue". I followed kinaba@'s instruction (chromite/bin/loman --upgrade-minilayout) and it worked.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages