Skip to content

GN build of dartdevc failing on debian package builder #31613

Closed
@whesse

Description

@whesse

The builder that builds debian linux packages of dart has been failing since November 21, 2017, when https://dart-review.googlesource.com/c/sdk/+/18144 landed.

The GN build on this builder works differently, and it found a number of problems that the other builders didn't find, which have been fixed in https://dart-review.googlesource.com/c/sdk/+/28700 and https://dart-review.googlesource.com/c/sdk/+/28640

Now it is hitting a further error, where the same build target is being hit twice, and complains about duplication. This may be because the BUILD.gn file is referenced the first time with an absolute path and the second time with a GN relative path (starting with //). The error can be seen at https://logs.chromium.org/v/?s=chromium%2Fbb%2Fclient.dart%2Fdebianpackage-linux-be%2F4874%2F%2B%2Frecipes%2Fsteps%2FCreate_src_tarball%2F0%2Fstdout by searching for "Duplicate output file"

The debian package builder, at https://luci-milo.appspot.com/buildbot/client.dart/debianpackage-linux-be/ , works differently from other builders in that it tars up the entire source tree into a tar file, then unzips it into a temp directory, with the root directory of the source tree called "dart", not "sdk".

It then deletes selected file types within the source directory with the following commands:
rm -fr dart/out dart/Makefile
find . -name .tmp -execdir rm -f {} ;
find . -name .pyc -execdir rm -f {} ;
find . -name .mk -execdir rm -f {} ;
find . -name .Makefile -execdir rm -f {} ;
make[1]: Leaving directory '/tmp/tmpKDMRU8/dart-2.0.0-edge.0cad7e31682067d54786ad4ed30db03ac21472c7'
dh_clean
rm -f debian/dart.substvars
rm -f debian/dart.
.debhelper
rm -rf debian/dart/
rm -f debian/
.debhelper.log
rm -f debian/files
find . ( (
( -path .*/.git -o -path .*/.svn -o -path .*/.bzr -o -path .*/.hg -o -path .*/CVS ) -prune -o -type f -a
( -name '#
#' -o -name '.
' -o -name '*' -o -name DEADJOE
-o -name '.orig' -o -name '.rej' -o -name '.bak'
-o -name '.
.orig' -o -name ..rej -o -name '.SUMS'
-o -name TAGS -o ( -path '
/.deps/' -a -name '.P' )
) -exec rm -f {} + ) -o
( -type d -a -name autom4te.cache -prune -exec rm -rf {} + ) )
rm -f *-stamp

before running GN with the command:
python dart/tools/generate_buildfiles.py
which is the command that generates the error.

Can anyone help me debug this problem further. It seems to come from adding the dart_bootstrap target in line 202 of utils/dartdevc/BUILD.gn:
if (!prebuilt_dart_exe_works) {
deps += [ "$dart_root/runtime/bin:dart_bootstrap($dart_host_toolchain)" ]
}

It is also unclear why the prebuilt dart exe doesn't work: Only the 64-bit build works on this debian builder, but I have pasted the correct dart sdk over the 32 bit one checked out in tools/sdks/linux/dart-sdk manually, and it doesn't get overwritten as long as the hash of the downloaded SDK doesn't change.

@zanderso @munificent

Metadata

Metadata

Assignees

Labels

P3A lower priority bug or feature requestarea-infrastructureUse area-infrastructure for SDK infrastructure issues, like continuous integration bot changes.closed-cannot-reproduceClosed as we were unable to reproduce the reported issuedev-compiler-build

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions