Reef: ec-utils (usb_updater in particular) cannot build with clang |
||||||||||
Issue descriptionSee, for instance, this PreCQ run: https://uberchromegw.corp.google.com/i/chromiumos.tryserver/builders/pre_cq/builds/4340 https://uberchromegw.corp.google.com/i/chromiumos.tryserver/builders/pre_cq/builds/4340/steps/BuildPackages/logs/stdio ec-utils-0.0.1-r3361: make: Entering directory '/build/reef/tmp/portage/chromeos-base/ec-utils-0.0.1-r3361/work/ec-utils-0.0.1/extra/usb_updater' ec-utils-0.0.1-r3361: x86_64-cros-linux-gnu-clang -std=gnu99 -g -Wall -Werror -Wpointer-arith -Wcast-align -Wcast-qual -Wundef -Wsign-compare -Wredundant-decls -Wmissing-declarations -O0 -I/build/reef/usr/include/libusb-1.0 -I../../include -I../../board/cr50 -I ../../chip/g -I../../util usb_updater.c -lusb-1.0 -lcrypto -o usb_updater ec-utils-0.0.1-r3361: In file included from usb_updater.c:32: ec-utils-0.0.1-r3361: In file included from ../../include/usb_descriptor.h:14: ec-utils-0.0.1-r3361: ../../chip/g/usb_hw.h:29:14: error: tentative array definition assumed to have ec-utils-0.0.1-r3361: one element [-Werror] ec-utils-0.0.1-r3361: static int (*usb_iface_request[]) (struct usb_setup_packet *req); ec-utils-0.0.1-r3361: ^ ec-utils-0.0.1-r3361: 1 error generated. ec-utils-0.0.1-r3361: make: *** [Makefile:40: usb_updater] Error 1 ec-utils-0.0.1-r3361: make: Leaving directory '/build/reef/tmp/portage/chromeos-base/ec-utils-0.0.1-r3361/work/ec-utils-0.0.1/extra/usb_updater' ec-utils-0.0.1-r3361: * ERROR: chromeos-base/ec-utils-0.0.1-r3361::chromiumos failed (compile phase): ec-utils-0.0.1-r3361: * emake failed --- On a related note, why don't EC changes get built on a PreCQ or CQ run? This should have been caught earlier. (This is not the first time that EC changes have blocked the kernel preCQ.)
,
Oct 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/c4e1a40e35a7d0f55a6a0bea55a1e325fdd41568 commit c4e1a40e35a7d0f55a6a0bea55a1e325fdd41568 Author: Brian Norris <briannorris@chromium.org> Date: Fri Oct 21 22:48:40 2016 Fixup usb_updater for reef/clang clang doesn't like the array here: ec-utils-0.0.1-r3361: x86_64-cros-linux-gnu-clang -std=gnu99 -g -Wall -Werror -Wpointer-arith -Wcast-align -Wcast-qual -Wundef -Wsign-compare -Wredundant-decls -Wmissing-declarations -O0 -I/build/reef/usr/include/libusb-1.0 -I../../include -I../../board/cr50 -I ../../chip/g -I../../util usb_updater.c -lusb-1.0 -lcrypto -o usb_updater ec-utils-0.0.1-r3361: In file included from usb_updater.c:32: ec-utils-0.0.1-r3361: In file included from ../../include/usb_descriptor.h:14: ec-utils-0.0.1-r3361: ../../chip/g/usb_hw.h:29:14: error: tentative array definition assumed to have ec-utils-0.0.1-r3361: one element [-Werror] ec-utils-0.0.1-r3361: static int (*usb_iface_request[]) (struct usb_setup_packet *req); ec-utils-0.0.1-r3361: ^ ec-utils-0.0.1-r3361: 1 error generated. But it's willing to forgive if this is extern. It should be extern anyway. BRANCH=none BUG= chromium:658436 TEST=reef pre-cq passes (building ec-utils) Change-Id: I5b5f8eb8dcdc3340487b118b30469c8cee73e182 Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/401421 Reviewed-by: Shawn N <shawnn@chromium.org> [modify] https://crrev.com/c4e1a40e35a7d0f55a6a0bea55a1e325fdd41568/chip/g/usb_hw.h
,
Oct 22 2016
Waiting for one more change to get through the CQ (it's not currently breaking, but it has the same anti-pattern): https://chromium-review.googlesource.com/#/c/402068/
,
Oct 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/5ab2ffdbe915223effa81ce8112e8636cf8c6084 commit 5ab2ffdbe915223effa81ce8112e8636cf8c6084 Author: Brian Norris <briannorris@chromium.org> Date: Fri Oct 21 23:25:49 2016 stm32: make usb_iface_request extern This isn't supposed to be static. And with CL:401421, we noticed that clang doesn't like this form. So fix this one too. BRANCH=none BUG= chromium:658436 TEST=build Change-Id: Ibd0c5724d5178c5ce8fc8c1b74382aeddd8f744d Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/402068 Reviewed-by: Shawn N <shawnn@chromium.org> [modify] https://crrev.com/5ab2ffdbe915223effa81ce8112e8636cf8c6084/chip/stm32/usb_dwc_hw.h
,
Oct 22 2016
,
Dec 25 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/23c1bea04d9320f75e71aab6bc46043d64c5c842 commit 23c1bea04d9320f75e71aab6bc46043d64c5c842 Author: Brian Norris <briannorris@chromium.org> Date: Fri Oct 21 22:48:40 2016 Fixup usb_updater for reef/clang clang doesn't like the array here: ec-utils-0.0.1-r3361: x86_64-cros-linux-gnu-clang -std=gnu99 -g -Wall -Werror -Wpointer-arith -Wcast-align -Wcast-qual -Wundef -Wsign-compare -Wredundant-decls -Wmissing-declarations -O0 -I/build/reef/usr/include/libusb-1.0 -I../../include -I../../board/cr50 -I ../../chip/g -I../../util usb_updater.c -lusb-1.0 -lcrypto -o usb_updater ec-utils-0.0.1-r3361: In file included from usb_updater.c:32: ec-utils-0.0.1-r3361: In file included from ../../include/usb_descriptor.h:14: ec-utils-0.0.1-r3361: ../../chip/g/usb_hw.h:29:14: error: tentative array definition assumed to have ec-utils-0.0.1-r3361: one element [-Werror] ec-utils-0.0.1-r3361: static int (*usb_iface_request[]) (struct usb_setup_packet *req); ec-utils-0.0.1-r3361: ^ ec-utils-0.0.1-r3361: 1 error generated. But it's willing to forgive if this is extern. It should be extern anyway. BRANCH=none BUG= chromium:658436 TEST=reef pre-cq passes (building ec-utils) Change-Id: I5b5f8eb8dcdc3340487b118b30469c8cee73e182 Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/401421 Reviewed-by: Shawn N <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/423288 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Trybot-Ready: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/23c1bea04d9320f75e71aab6bc46043d64c5c842/chip/g/usb_hw.h
,
Jan 21 2017
,
Mar 4 2017
,
Apr 17 2017
,
May 30 2017
,
Aug 1 2017
,
Aug 3 2017
Closing. Please reopen it if its not fixed. Thanks! |
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by briannorris@chromium.org
, Oct 21 2016Owner: briannorris@chromium.org
Status: Started (was: Available)