zycet / 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

Open GoogleCodeExporter opened 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