user4478: How do you compile a sketch with a custom library path using arduino-builder? The docs are a little light.
I have my source code organized like this:
lib
    SomeLib
        somelib.h
        somelib.cpp
src
    otherfile.h
    main.ino

I've installed Arduino 1.8.1 into /usr/share/arduino.
I'm trying to compile this for an Arduino Uno from my project root directory with:
arduino-builder -compile -hardware /usr/share/arduino/hardware -tools /usr/share/arduino/hardware/tools -libraries lib -fqbn arduino:avr:uno -build-path .build src/main.ino

But it returns this error:
fork/exec {runtime.tools.ctags.path}/ctags: no such file or directory

What's causing this error?

user26916: You need to specify the path to the tools-builder folder, which is where ctags is. Try this:
arduino-builder \
  -compile \
  -hardware /usr/share/arduino/hardware \
  -tools /usr/share/arduino/hardware/tools \
  -tools /usr/share/arduino/tools-builder \
  -libraries lib \
  -fqbn arduino:avr:uno \
  -build-path .build \
  src/main.ino


4478: <p>How do you compile a sketch with a custom library path using <a href="https://github.com/arduino/arduino-builder" rel="nofollow noreferrer">arduino-builder</a>? The docs are a little light.</p>

<p>I have my source code organized like this:</p>

<pre><code>lib
    SomeLib
        somelib.h
        somelib.cpp
src
    otherfile.h
    main.ino
</code></pre>

<p>I've installed Arduino 1.8.1 into /usr/share/arduino.</p>

<p>I'm trying to compile this for an Arduino Uno from my project root directory with:</p>

<pre><code>arduino-builder -compile -hardware /usr/share/arduino/hardware -tools /usr/share/arduino/hardware/tools -libraries lib -fqbn arduino:avr:uno -build-path .build src/main.ino
</code></pre>

<p>But it returns this error:</p>

<pre><code>fork/exec {runtime.tools.ctags.path}/ctags: no such file or directory
</code></pre>

<p>What's causing this error?</p>
 26916: <p>You need to specify the path to the <code>tools-builder</code> folder, which is where <code>ctags</code> is. Try this:</p>

<pre><code>arduino-builder \
  -compile \
  -hardware /usr/share/arduino/hardware \
  -tools /usr/share/arduino/hardware/tools \
  -tools /usr/share/arduino/tools-builder \
  -libraries lib \
  -fqbn arduino:avr:uno \
  -build-path .build \
  src/main.ino
</code></pre>
