building bsdiff with latest platform2 fails: pkg-config: Must specify package names on the command line |
||||
Issue description
I cannot build the 9999 ebuild of bsdiff anymore as there is no recent changes in its BUILD.gn file. Has there been any changes to the GN build system that can cause this?
$ FEATURES=test emerge-edgar bsdiff
ERROR at //common-mk/pkg_config.gni:13:26: Script returned non-zero exit code.
_pkg_config_result = exec_script(
^----------
Current dir: /build/edgar/var/cache/portage/dev-util/bsdiff/out/Default/
Command: python -- /build/edgar/tmp/portage/dev-util/bsdiff-9999/work/bsdiff-9999/platform2/common-mk/pkg-config_wrapper.py /build/edgar/build/bin/pkg-config
Returned 1.
stderr:
Must specify package names on the command line
Traceback (most recent call last):
File "/build/edgar/tmp/portage/dev-util/bsdiff-9999/work/bsdiff-9999/platform2/common-mk/pkg-config_wrapper.py", line 52, in <module>
sys.exit(main(sys.argv[1:]))
File "/build/edgar/tmp/portage/dev-util/bsdiff-9999/work/bsdiff-9999/platform2/common-mk/pkg-config_wrapper.py", line 27, in main
cflags = shlex.split(subprocess.check_output(argv + ['--cflags']))
File "/usr/lib64/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/build/edgar/build/bin/pkg-config', '--cflags']' returned non-zero exit status 1
See //bsdiff/BUILD.gn:32:1: whence it was called.
pkg_config("target_defaults") {
^------------------------------
See //common-mk/gn_root/BUILD.gn:14:5: which caused the file to be included.
"//${platform_subdir}:all",
^-------------------------
platform2.py: Unhandled exception:
Traceback (most recent call last):
File "/build/edgar/tmp/portage/dev-util/bsdiff-9999/work/bsdiff-9999/platform2/common-mk/platform2.py", line 446, in <module>
commandline.ScriptWrapperMain(lambda _: main)
File "/usr/lib64/python2.7/site-packages/chromite/lib/commandline.py", line 912, in ScriptWrapperMain
ret = target(argv[1:])
File "/build/edgar/tmp/portage/dev-util/bsdiff-9999/work/bsdiff-9999/platform2/common-mk/platform2.py", line 442, in main
getattr(p2, options.action)(options.args)
File "/build/edgar/tmp/portage/dev-util/bsdiff-9999/work/bsdiff-9999/platform2/common-mk/platform2.py", line 240, in configure
self.configure_gn()
File "/build/edgar/tmp/portage/dev-util/bsdiff-9999/work/bsdiff-9999/platform2/common-mk/platform2.py", line 359, in configure_gn
cwd=self.get_platform2_root())
File "/usr/lib64/python2.7/site-packages/chromite/lib/cros_build_lib.py", line 646, in RunCommand
raise RunCommandError(msg, cmd_result)
chromite.lib.cros_build_lib.RunCommandError: return code: 1; command: gn gen '--root=/build/edgar/tmp/portage/dev-util/bsdiff-9999/work/bsdiff-9999/platform2' '--args=platform_subdir="bsdiff" external_cflags=["-O2","-pipe","-march=corei7","-g","-fno-exceptions","-fno-unwind-tables","-fno-asynchronous-unwind-tables"] external_cppflags=["-D_FILE_OFFSET_BITS=64","-D_LARGEFILE_SOURCE","-D_LARGEFILE64_SOURCE"] enable_exceptions=false build_root="/build/edgar/var/cache/portage/dev-util/bsdiff" external_ldflags=["-Wl,-O2","-Wl,--as-needed"] platform2_root="/build/edgar/tmp/portage/dev-util/bsdiff-9999/work/bsdiff-9999/platform2" external_cxxflags=["-O2","-pipe","-march=corei7","-g","-fno-exceptions","-fno-unwind-tables","-fno-asynchronous-unwind-tables"] OS="linux" libdir="/usr/lib64" libbase_ver="456626" sysroot="/build/edgar" pkg_config="/build/edgar/build/bin/pkg-config" cc="x86_64-cros-linux-gnu-clang" cxx="x86_64-cros-linux-gnu-clang++" ar="x86_64-cros-linux-gnu-ar" use={metrics_uploader=false wifi=false coverage=false ubsan=false cros_debug=true kvm_host=false cros_host=false passive_metrics=false device_mapper=false json_store=false arm=false feedback=false pinweaver=false systemd=false direncryption=false abi_x86_64=true amd64=true opengles=false cert_provision=false msan=false fuzzer=false iwlwifi_dump=false cfm_enabled_device=false tpm2_simulator=false pppoe=false containers=false userland_GNU=true hammerd_api=false profiling=false wake_on_wifi=false gdmwimax=false tpm2=false buffet=false kernel_linux=true test=true binder=false wimax=false cellular=false asan=false vpn=false tcmalloc=false power_management=false cheets=false chromeos_dbus=false dbus=false ftdi_tpm=false wired_8021x=false attestation=false dhcpv6=false elibc_glibc=true tpm=false mtd=false}' /build/edgar/var/cache/portage/dev-util/bsdiff/out/Default
,
Dec 20
But the problem is why is it building on tot but not the 9999 ebuild? They both use the exact same BUILD.gn file :/ Regarding the emptyp pkg-config I thought this problem was resolved by oka@ a while back!!?
,
Dec 20
you've blacklisted the bsdiff package, so the platform2 code is not the same between the non-9999 & 9999 ebuilds
,
Dec 20
ooops, You are right. I forgot about that. So it means something in platform2 has changed that has caused this problem!! Mike, Do you think is it possible to modify the behavior of cros workon eclass to blacklist individual repositories in an ebuild that pulls in multiple repositories?! examples are puffin, bsdiff, etc. So that we only blacklist the bsdiff, puffin repository and not the platform2 one?! Would that be possible in theory (or practice)? Something like: CROS_WORKON_BLACKLIST=(1 0) instead of the current one. I can work on it if you think that's possible.
,
Dec 20
currently it's not possible ... either an ebuild is entirely pinned, or not. it doesn't seem like too unreasonable of a request, but i'm not sure about the balance. on one hand, you'd be able to detect regressions like this, but on the other, if we did want to break/migrate things, it's a lot more difficult to do so when you're also asking the person working on the build framework to update the respective projects at the sametime. i don't think people doing build work should be required to handle the dep rolls for the non-build logic (i.e. the majority of code in UE/bsdiff/puffin).
,
Dec 20
I understand, but what would be difference between this and updating the build code that touches projects in the platform2? For example, if someone works on a build specific change that require an update to all BUILD.gn files, then they have to update those files as well anyway. This will work the same for the puffin/bsdiff, etc. They need to update it there too. Are you concerned about they won't be able to like land everything in one CL, etc? Or your concern is that they might need to deal with other problems when upreving a blacklisted repository that has some other non-build related issue?! which is a valid concern and in that case let's keep the stuff as is!
,
Dec 20
projects under platform2 aren't blacklisted, so people updating the build know that non-build related code is already vetted if you look at bsdiff right now, the ebuild is pinned to e80e2243950174015342af10a97cec3a84fec068 while the bsdiff repo has had multiple commits since. any one of those commits could introduce problems unrelated to build. it shouldn't be the responsibility of people trying to make changes to the build framework to also roll & debug problems in those commits.
,
Dec 20
Agreed, But I guess there are only these two projects that are laid that way and they don't really change that much often and it would be better to catch these problems sooner than later. There are always people to help with these problem around if someone is changing the build only. Another option is to remove all the platform2 dependencies from those two projects which are not many I guess. That way we still get an upreved platform2, but these two still stay blacklisted.
,
Dec 20
there's three here -- AU/bsdiff/puffin if you try to not use platform2's logic, your unittests will become much more fragile. that is a pretty significant regression to the point where i don't think you can do it.
,
Dec 20
AU is not blacklisted, so it is not related IMO. It can stay as is. hmmm, you might be right, there are lots of dependencies to //common-mk which I guess you need to pull platform2 for it! unittests and fuzzers! Or by "unittests will become more fragile" you are referring to something else?! like the platform2/testrunner which we build?! Or e.g. ARM tests won't run? or something else?! I just want to understand the scope of the problem! :)
,
Dec 20
if you want to fork bsdiff/puffin the same way AU is then you could unblacklist it ... platform2 test framework takes care of qemu/sysroot isolation, but it also provides fuzzing/etc... as you noted.
,
Dec 21
,
Jan 2
,
Jan 3
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/859f8d03a706a214781d8b8546eb53602226ff09 commit 859f8d03a706a214781d8b8546eb53602226ff09 Author: Amin Hassani <ahassani@chromium.org> Date: Thu Jan 03 23:04:21 2019 Marking 9999 ebuild for dev-util/bsdiff as stable. Pulling in https://android-review.googlesource.com/c/platform/external/bsdiff/+/859122 BUG= chromium:916765 TEST=unittests Change-Id: I1fa032ffaf8b07456be7ae53bc02c38564fbe55d Reviewed-on: https://chromium-review.googlesource.com/1393543 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [rename] https://crrev.com/859f8d03a706a214781d8b8546eb53602226ff09/dev-util/bsdiff/bsdiff-4.3.1-r20.ebuild
,
Jan 7
|
||||
►
Sign in to add a comment |
||||
Comment 1 by vapier@chromium.org
, Dec 20it kind of looks like pkg-config is being run w/out any arguments. do you need to set pkg_deps all the time ? pkg_config("target_defaults") { pkg_deps = []