clang-format missing?

1,411 views
Skip to first unread message

Egor Pasko

unread,
Oct 7, 2014, 10:08:05 AM10/7/14
to chromium-dev
I am on ubuntu Trusty, and  'git cl format' fails with:

Problem while looking for clang-format in Chromium source tree:
  File does not exist: /path/to/chromium/build/buildtools/linux64/clang-format

is it known?

Primiano Tucci

unread,
Oct 7, 2014, 11:34:12 AM10/7/14
to Egor Pasko, chromium-dev
Did you gclient runhooks (not just gyp) at least once in the new checkout?

clang-format is pulled via hooks in DEPS. What is the content of your src/buildtools/linux64/ ? Do you see just the .sha1 file there?

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Carlos

unread,
Oct 7, 2014, 12:09:43 PM10/7/14
to chromi...@chromium.org, pa...@google.com
I am also seeing this same problem.

I might had never run gclient runhooks before but I did it as you suggested and it threw an error in the end:

Updating projects from gyp files...
gyp: /usr/local/ssd/clankium/src/third_party/guava/guava.gyp not found (cwd: /usr/local/ssd/clankium)
Error: Command /usr/bin/python src/build/gyp_chromium returned non-zero exit status 1 in /usr/local/ssd/clankium

And in my case I don't have a src/buildtools dir...

Egor Pasko

unread,
Oct 7, 2014, 12:11:02 PM10/7/14
to Primiano Tucci, chromium-dev
On Tue, Oct 7, 2014 at 5:33 PM, Primiano Tucci <prim...@chromium.org> wrote:
Did you gclient runhooks (not just gyp) at least once in the new checkout?

I did run it.
 
clang-format is pulled via hooks in DEPS. What is the content of your src/buildtools/linux64/ ? Do you see just the .sha1 file there?

hmmm, there exists 'src/buildtools/linux64/clang-format' (and the .sha1), but 'git cl format' looks in another location: 'build/buildtools/linux64/clang-format'

to answer the question:
shell> ls buildtools/linux64/
clang-format
clang-format.sha1
gn
gn_args.txt
gn.sha1
upload_gn

On Tue, Oct 7, 2014 at 3:07 PM, Egor Pasko <pa...@chromium.org> wrote:
I am on ubuntu Trusty, and  'git cl format' fails with:

Problem while looking for clang-format in Chromium source tree:
  File does not exist: /path/to/chromium/build/buildtools/linux64/clang-format

is it known?

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev




--
Egor Pasko

Primiano Tucci

unread,
Oct 9, 2014, 7:35:50 AM10/9/14
to Egor Pasko, chromium-dev
Can you check if something is setting CHROMIUM_BUILDTOOLS_PATH in your environment (cr?) ?
The implementation in depot_tools seems to look in

Which is right (src/buildtools/...) unless you override with the aforementioned env var.

Also, what happens if you run:
$ python /path/to/depot_tools/clang_format.py --dump-config ?


Egor Pasko

unread,
Oct 9, 2014, 9:07:15 AM10/9/14
to Primiano Tucci, chromium-dev
On Thu, Oct 9, 2014 at 1:35 PM, Primiano Tucci <prim...@chromium.org> wrote:
Can you check if something is setting CHROMIUM_BUILDTOOLS_PATH in your environment (cr?) ?

It is unset:
shell> set | grep CHROMIUM_BUILDTOOLS_PATH | wc -l
0
shell> cr shell set | grep CHROMIUM_BUILDTOOLS_PATH | wc -l
0

The implementation in depot_tools seems to look in

Which is right (src/buildtools/...) unless you override with the aforementioned env var.

Also, what happens if you run:
$ python /path/to/depot_tools/clang_format.py --dump-config ?

same error is printed

That thing GetGClientPrimarySolutionName() is returning 'build' for me while I would prefer 'src' obviously. It is coming from a .gclient having this structure:
solutions = [{'deps_file': '.DEPS.git',
  'managed': True,
  'name': 'build',
 {'custom_deps': {},
  'deps_file': '.DEPS.git',
  'managed': True,
  'name': 'lalala',
  'safesync_url': '',
target_os = ['android']

So wow, changing the order of the two elements in 'solutions' helps. I guess I just added the 'build' part manually to have it around. The fact that depot_tools look only at the very first item .. well .. broke my assumptions. Also I suspect my config leaked to Carlos somehow ..

--
Egor Pasko
Reply all
Reply to author
Forward
0 new messages