Building amd64-generic image: issue with building

57 views
Skip to first unread message

Carmelo Carbonara

unread,
Dec 4, 2017, 11:22:12 PM12/4/17
to Chromium OS dev
Hi all
Below is the tail output of the console where i'm building Chromium OS for amd64-generic board.

#bash -x ./build_image --board=${BOARD} --noenable_rootfs_verification test




Traceback (most recent call last):
 
File "/mnt/host/source/chromite/bin/cros_set_lsb_release", line 169, in <module>
   
DoMain()
 
File "/mnt/host/source/chromite/bin/cros_set_lsb_release", line 165, in DoMain
    commandline
.ScriptWrapperMain(FindTarget)
 
File "/mnt/host/source/chromite/lib/commandline.py", line 911, in ScriptWrapperMain
    ret
= target(argv[1:])
 
File "/mnt/host/source/chromite/scripts/cros_set_lsb_release.py", line 124, in main
    opts
= _ParseArguments(argv)
 
File "/mnt/host/source/chromite/scripts/cros_set_lsb_release.py", line 102, in _ParseArguments
    hostname
= cros_build_lib.GetHostName(fully_qualified=True)
 
File "/mnt/host/source/chromite/lib/cros_build_lib.py", line 777, in GetHostName
    hostname
= socket.gethostbyaddr(hostname)[0]
socket
.herror: [Errno 1] Unknown host
+ check_full_disk
+ local prev_ret=1
+ set +e
+ [[ 1 -ne 0 ]]
++ df -B 1M /mnt/host/source/src/build/images/amd64-generic/R65-10186.0.2017_12_04_1853-a1/rootfs
+ local 'df=Filesystem     1M-blocks  Used Available Use% Mounted on
/dev/loop1          1969  1098       872  56% /mnt/host/source/src/build/images/amd64-generic/R65-10186.0.2017_12_04_1853-a1/rootfs'

+ [[ Filesystem     1M-blocks  Used Available Use% Mounted on
/dev/loop1          1969  1098       872  56% /mnt/host/source/src/build/images/amd64-generic/R65-10186.0.2017_12_04_1853-a1/rootfs == *100%* ]]
+ set -e
+ unmount_image
+ [[ 8 -eq 0 ]]
+ /mnt/host/source/src/scripts/mount_gpt_image.sh --unmount --from /mnt/host/source/src/build/images/amd64-generic/R65-10186.0.2017_12_04_1853-a1/chromiumos_base_image.bin --rootfs_mountpt /mnt/host/source/src/build/images/amd64-generic/R65-10186.0.2017_12_04_1853-a1/rootfs --stateful_mountpt /mnt/host/source/src/build/images/amd64-generic/R65-10186.0.2017_12_04_1853-a1/stateful --esp_mountpt /mnt/host/source/src/build/images/amd64-generic/R65-10186.0.2017_12_04_1853-a1/esp --delete_mountpts
INFO    
: Unmounting image from /mnt/host/source/src/build/images/amd64-generic/R65-10186.0.2017_12_04_1853-a1/stateful and /mnt/host/source/src/build/images/amd64-generic/R65-10186.0.2017_12_04_1853-a1/rootfs
Cleaning up /usr/local symlinks for /mnt/host/source/src/build/images/amd64-generic/R65-10186.0.2017_12_04_1853-a1/stateful/dev_image
+ MOUNT_GPT_OPTIONS=()
+ delete_prompt
+ echo 'An error occurred in your build so your latest output directory' 'is invalid.'
An error occurred in your build so your latest output directory is invalid.
+ '[' -t 0 -a -t 1 -a admin '!=' chrome-bot ']'
+ read -p 'Would you like to delete the output directory (y/N)? ' SURE
Would you like to delete the output directory (y/N)?






Notes:
Re:
GetHostName
    hostname
= socket.gethostbyaddr(hostname)[0]
socket
.herror: [Errno 1] Unknown host
The workstation I'm using is x86_64 Debian GNU/Linux 8.9 (jessie) networked in private IPv4 space with internal DNS and Rev PTR configured; hostname responds correctly as well


On selecting No there is an image file chromiumos_base_image.bin in the
/src/build/images/amd64-generic/R65-10186.0.2017_12_04_1853-a1
directory but no /latest subdirectory which I would imagine would be a symlink to the latest build after a completed build (if I get the gist of the development guide).

When I mount the image or cros_flash it to USB the only obvious thing to me is there are not bootloaders.

I tried building test and dev, updated chroot, depot_tools and repo sync'd

Hoping someone more experinced can shed some light on getting this build to complete.

Thx





Mike Frysinger

unread,
Dec 5, 2017, 1:27:48 AM12/5/17
to Carmelo Carbonara, Chromium OS dev
usually this is because your local system is misconfigured and the hostname that's used doesn't resolve

when you're inside of the sdk, what does this show:
  hostname
  cat /etc/hosts
  ping -c 1 $(hostname)
-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


Carmelo Carbonara

unread,
Dec 5, 2017, 3:55:04 AM12/5/17
to Chromium OS dev, cpcnet...@gmail.com
..it shows and resolves the correct hostname = lisadell

(cr) ((b5f1d69...)) admin@lisadell ~/trunk/src/scripts $ hostname
lisadell
(cr) ((b5f1d69...)) admin@lisadell ~/trunk/src/scripts $ cat /etc/hosts
127.0.0.1    localhost
::1        localhost ip6-localhost ip6-loopback
ff02::1        ip6-allnodes
ff02::2        ip6-allrouters
#AWS VPC hosts


lisadell.cpcnetworking.home 192.168.65.9

(cr) ((b5f1d69...)) admin@lisadell ~/trunk/src/scripts $  ping -c 1 $(hostname)
PING lisadell.cpcnetworking.home (192.168.65.9) 56(84) bytes of data.
64 bytes from 192.168.65.9: icmp_seq=1 ttl=64 time=0.045 ms

--- lisadell.cpcnetworking.home ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.045/0.045/0.045/0.000 ms
(cr) ((b5f1d69...)) admin@lisadell ~/trunk/src/scripts $

Mike Frysinger

unread,
Dec 5, 2017, 11:42:52 PM12/5/17
to Chromium OS dev
use `hostname -f` instead of `hostname`.  the code in this case is looking for the full name.

this is the python code:
  python -c 'from chromite.lib import cros_build_lib; print(cros_build_lib.GetHostName(True))'
-mike

--

Carmelo Carbonara

unread,
Dec 6, 2017, 8:39:08 AM12/6/17
to Chromium OS dev
Mike
 hostname -f while in chroot

(cr) ((b5f1d69...)) admin@lisadell ~/trunk/src/scripts $ hostname -f
lisadell
.cpcnetworking.home

Carmelo Carbonara

unread,
Dec 6, 2017, 8:42:14 AM12/6/17
to Chromium OS dev
Mike
from what I see

Description

The gethostbyname*() and gethostbyaddr*() functions are obsolete. Applications should use getaddrinfo(3) and getnameinfo(3) instead.


Something about these functions being problematic with IPv6 but that shouldn't be a problem in my case I'm in an IPv4 environment

Carmelo Carbonara

unread,
Dec 6, 2017, 8:52:17 AM12/6/17
to Chromium OS dev
...there are some python errors just before the build quits; looks like it has to do with the shutdown sequence which is what I'm experiencing on booting from usb.

Traceback (most recent call last):
 
File "/mnt/host/source/chromite/bin/cros_set_lsb_release", line 169, in <module>
   
DoMain()
 
File "/mnt/host/source/chromite/bin/cros_set_lsb_release", line 165, in DoMain
    commandline
.ScriptWrapperMain(FindTarget)
 
File "/mnt/host/source/chromite/lib/commandline.py", line 911, in ScriptWrapperMain
    ret
= target(argv[1:])
 
File "/mnt/host/source/chromite/scripts/cros_set_lsb_release.py", line 124, in main
    opts
= _ParseArguments(argv)
 
File "/mnt/host/source/chromite/scripts/cros_set_lsb_release.py", line 102, in _ParseArguments
    hostname
= cros_build_lib.GetHostName(fully_qualified=True)
 
File "/mnt/host/source/chromite/lib/cros_build_lib.py", line 777, in GetHostName
    hostname
= socket.gethostbyaddr(hostname)[0]
socket
.herror: [Errno 1] Unknown
host
INFO    
: Unmounting image from /mnt/host/source/src/build/images/amd64-generic



After the build my image drops out and leaves an image without a bootloader.

I added the bootloader and get it to boot

First boot I get a chromiumos splash screen and it hangs

Subsequent boots it finds / decompresses the kernel and a few seconds later it reboots to the desktop hard drive.

If you have any insight on this i'd appreciate it.

Networking setup here is fine even in the chroot.

Carmelo Carbonara

unread,
Dec 9, 2017, 1:25:00 AM12/9/17
to Chromium OS dev

as it turns out

socket.gethostbyaddr(hostname)[0]socket.herror: [Errno 1] Unknown host

was ending the image build because in my case, gethostbyaddr() was not returning a PTR query from my DNS server

the build went through without any errors after clearing that up.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages