jungle0755 / libyuv

Automatically exported from code.google.com/p/libyuv
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Android - ValueError: 'build' is not in list #536

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
export GYP_DEFINES="OS=android"
gclient runhooks

solutions = [
  { "name"        : "libyuv",
    "url"         : "https://chromium.googlesource.com/libyuv/libyuv",
    "deps_file"   : "DEPS",
    "managed"     : True,
    "custom_deps" : {
    },
    "safesync_url": "",
  },
]
target_os = ["android", "unix"]

produces the following error
________ running '/usr/bin/python -u libyuv/sync_chromium.py --target-revision 
dad6346948dde45a6e86c614692256c746d9bfb1' in 
'/usr/local/google/home/fbarchard/src/libyuva'
Chromium already up to date:  dad6346948dde45a6e86c614692256c746d9bfb1

________ running '/usr/bin/python libyuv/setup_links.py' in 
'/usr/local/google/home/fbarchard/src/libyuva'

________ running '/usr/bin/python libyuv/gyp_libyuv' in 
'/usr/local/google/home/fbarchard/src/libyuva'
Updating projects from gyp files...
Exception: 'build' is not in list
Traceback (most recent call last):
  File "/usr/local/google/home/fbarchard/src/libyuva/libyuv/chromium/src/tools/gyp/pylib/gyp/input.py", line 496, in CallLoadTargetBuildFile
    includes, depth, check, False)
  File "/usr/local/google/home/fbarchard/src/libyuva/libyuv/chromium/src/tools/gyp/pylib/gyp/input.py", line 417, in LoadTargetBuildFile
    build_file_data, PHASE_EARLY, variables, build_file_path)
  File "/usr/local/google/home/fbarchard/src/libyuva/libyuv/chromium/src/tools/gyp/pylib/gyp/input.py", line 1266, in ProcessVariablesAndConditionsInDict
    ProcessConditionsInDict(the_dict, phase, variables, build_file)
  File "/usr/local/google/home/fbarchard/src/libyuva/libyuv/chromium/src/tools/gyp/pylib/gyp/input.py", line 1145, in ProcessConditionsInDict
    variables, build_file)
  File "/usr/local/google/home/fbarchard/src/libyuva/libyuv/chromium/src/tools/gyp/pylib/gyp/input.py", line 1292, in ProcessVariablesAndConditionsInDict
    build_file)
  File "/usr/local/google/home/fbarchard/src/libyuva/libyuv/chromium/src/tools/gyp/pylib/gyp/input.py", line 1307, in ProcessVariablesAndConditionsInList
    ProcessVariablesAndConditionsInDict(item, phase, variables, build_file)
  File "/usr/local/google/home/fbarchard/src/libyuva/libyuv/chromium/src/tools/gyp/pylib/gyp/input.py", line 1292, in ProcessVariablesAndConditionsInDict
    build_file)
  File "/usr/local/google/home/fbarchard/src/libyuva/libyuv/chromium/src/tools/gyp/pylib/gyp/input.py", line 1307, in ProcessVariablesAndConditionsInList
    ProcessVariablesAndConditionsInDict(item, phase, variables, build_file)
  File "/usr/local/google/home/fbarchard/src/libyuva/libyuv/chromium/src/tools/gyp/pylib/gyp/input.py", line 1292, in ProcessVariablesAndConditionsInDict
    build_file)
  File "/usr/local/google/home/fbarchard/src/libyuva/libyuv/chromium/src/tools/gyp/pylib/gyp/input.py", line 1311, in ProcessVariablesAndConditionsInList
    expanded = ExpandVariables(item, phase, variables, build_file)
  File "/usr/local/google/home/fbarchard/src/libyuva/libyuv/chromium/src/tools/gyp/pylib/gyp/input.py", line 891, in ExpandVariables
    replacement = str(py_module.DoMain(parsed_contents[1:])).rstrip()
  File "/usr/local/google/home/fbarchard/src/libyuva/libyuv/chromium/src/build/android/gyp/java_cpp_enum.py", line 352, in DoMain
    for output_path, data in DoGenerate(input_paths):
  File "/usr/local/google/home/fbarchard/src/libyuva/libyuv/chromium/src/build/android/gyp/java_cpp_enum.py", line 249, in DoGenerate
    output = GenerateOutput(source_path, enum_definition)
  File "/usr/local/google/home/fbarchard/src/libyuva/libyuv/chromium/src/build/android/gyp/java_cpp_enum.py", line 290, in GenerateOutput
    'SCRIPT_NAME': GetScriptName(),
  File "/usr/local/google/home/fbarchard/src/libyuva/libyuv/chromium/src/build/android/gyp/java_cpp_enum.py", line 233, in GetScriptName
    build_index = script_components.index('build')
ValueError: 'build' is not in list

Error: Command '/usr/bin/python libyuv/gyp_libyuv' returned non-zero exit 
status 1 in /usr/local/google/home/fbarchard/src/libyuva

Likely broke on chromium DEPS roll
https://codereview.chromium.org/1535493002 

Original issue reported on code.google.com by fbarch...@google.com on 22 Dec 2015 at 1:02

GoogleCodeExporter commented 8 years ago
See also build bot failures

buildbot failure in Libyuv on Android Release

The Buildbot has detected a new failure on builder Android Release while 
building libyuv.
Full details are available at:
 http://build.chromium.org/p/client.libyuv/builders/Android%20Release/builds/716

Buildbot URL: http://build.chromium.org/p/client.libyuv/

Buildslave for this Build: vm322-m3

Build Reason: scheduler
Build Source Stamp: [branch master] 2560df9513e66080524a5b8dcea92b8ec657a8eb
Blamelist: fbarchard@google.com

BUILD FAILED: failed steps failed gclient runhooks

sincerely,
 -The Buildbot

Original comment by fbarch...@google.com on 5 Jan 2016 at 11:17

GoogleCodeExporter commented 8 years ago
I had a look at the bot and it was failing due to some file system permission 
issues that was possible to resolve by wiping a 
/mnt/data/b/build/slave/android/build/src/chromium/src/third_party/android_tools
 on disk. So both commit bots in 
https://build.chromium.org/p/client.libyuv/waterfall are now green.

However, I'm also able to reproduce the error in my local checkout, so I wonder 
what the difference can be. The bots also gets auto-updated depot tools, and it 
doesn't look related to depot tools to me, rather something with GYP.

Original comment by kjellan...@google.com on 10 Jan 2016 at 8:02

GoogleCodeExporter commented 8 years ago
OK I've figured it out: at 
https://code.google.com/p/chromium/codesearch#chromium/src/build/android/gyp/jav
a_cpp_enum.py&l=233 the script uses the absolute path to lookup the name of the 
script (in a very odd and probably bad way). If 'build' is not a part of the 
path, it simply fails.

The works in Chromium and WebRTC since the GYP scripts (build/gyp_chromium and 
webrtc/build/gyp_webrtc) are located in such paths. For libyuv, the gyp_libyuv 
is put straight into the root of the checkout, thus not containing 'build'.

The reason it passes on the libyuv buildbots is just pure luck, since their 
checkouts are located in a dir like: /b/build/slave/linux64/build/libyuv.

I'll see if I can make a bugfix for the java_cpp_enum.py script so this error 
goes away. 
Another option would be to try to find a way to not invoke that GYP stuff, but 
it's hard since libyuv_tests.gyp includes testing/android/native_test.gyp, 
which is where this comes from.

Workaround: Make a directory 'build' and move your libyuv workspace into it :)

Original comment by kjellan...@google.com on 10 Jan 2016 at 8:27

GoogleCodeExporter commented 8 years ago
CL up: https://codereview.chromium.org/1571243003/

Original comment by kjellan...@google.com on 11 Jan 2016 at 4:30

GoogleCodeExporter commented 8 years ago
build/ folder work around works, but roll forward causes a build error?

../../third_party/gflags/src/gflags.cc:281:53: error: unused typedef 
'true_false_equal' [-Werror,-Wunused-local-typedef]
    COMPILE_ASSERT(sizeof(kTrue) == sizeof(kFalse), true_false_equal);
                                                    ^
1 error generated.
[8/231] CXX obj/chromium/src/testing/gtest/src/gtest.gtest.o

Original comment by fbarch...@google.com on 13 Jan 2016 at 2:38

GoogleCodeExporter commented 8 years ago
The default warnings in Chromium for third party code has changed. 
You need to update gflags GYP+GN with the changes made in 
https://codereview.webrtc.org/1553033002

Original comment by kjellan...@google.com on 13 Jan 2016 at 8:12

GoogleCodeExporter commented 8 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/libyuv/libyuv.git/+/f7c6b1a1967c89513d8d6156dc1cf42ca5a16d2c

commit f7c6b1a1967c89513d8d6156dc1cf42ca5a16d2c
Author: Frank Barchard <fbarchard@google.com>
Date: Thu Jan 14 19:09:28 2016

pull gflags.gyp changes from webrtc

gflags has a build warning in the chromium version.

../../third_party/gflags/src/gflags.cc:281:53: error: unused typedef 
'true_false_equal' [-Werror,-Wunused-local-typedef]
    COMPILE_ASSERT(sizeof(kTrue) == sizeof(kFalse), true_false_equal);
                                                    ^
1 error generated.
[8/231] CXX obj/chromium/src/testing/gtest/src/gtest.gtest.o

Its been reported and fixed upstream
https://github.com/gflags/gflags/issues/125

But not pulled into chromium.  Last update to flags was in 2013.
This change disables the warning.

R=harryjin@google.com, kjellander@chromium.org, jkellander@chromium.org
BUG=libyuv:536, webrtc:5397, webrtc:5398, webrtc:5399

Review URL: https://codereview.chromium.org/1581123002 .

[modify] 
http://crrev.com/f7c6b1a1967c89513d8d6156dc1cf42ca5a16d2c/third_party/gflags/BUI
LD.gn
[modify] 
http://crrev.com/f7c6b1a1967c89513d8d6156dc1cf42ca5a16d2c/third_party/gflags/gfl
ags.gyp

Original comment by bugdroid1@chromium.org on 14 Jan 2016 at 7:09

GoogleCodeExporter commented 8 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/libyuv/libyuv.git/+/d1c6eb0887e83fb03e00aa9c35be59a26e4735a0

commit d1c6eb0887e83fb03e00aa9c35be59a26e4735a0
Author: Frank Barchard <fbarchard@google.com>
Date: Thu Jan 14 19:39:13 2016

Roll chromium to fix java_cpp_enum.py

Remove assumption on absolute paths in java_cpp_enum.py.

In java_cpp_enum.py there were assumptions on 'build' being
a component of the absolute path of the script invoking the
script. This leads to problems when other projects are using
the Chromium build toolchain (in this case libyuv), where
the script invoking GYP is located in the root of the project
dir (https://chromium.googlesource.com/libyuv/libyuv/+/master/gyp_libyuv).

TBR=harryjin@google.com, jkellander@chromium.org
BUG=libyuv:536

Review URL: https://codereview.chromium.org/1581773003 .

[modify] http://crrev.com/d1c6eb0887e83fb03e00aa9c35be59a26e4735a0/DEPS

Original comment by bugdroid1@chromium.org on 14 Jan 2016 at 7:39

GoogleCodeExporter commented 8 years ago

Original comment by fbarch...@google.com on 16 Jan 2016 at 2:13