title: Error: unrecognized command line option ‘-Wno-invalid-source-encoding’ [-Werror] within building Mesos
body: <p>My operating system is Ubuntu 18.10. I follow these steps on three nodes:
  To install Mesos I did these steps one by one without any errors, except every node has already had Open JDK 8, so I did not install Open JDK 8 again.</p>
  <pre><code>   sudo apt-get update
     sudo apt-get install -y tar wget git
     sudo apt-get install -y openjdk8-jdk (I did not do that)
     sudo apt-get install -y autoconf libtool
     sudo apt-get -y install build-essential python-dev python-six python- 
     virtualenv libcurl4-nss-dev libsasl2-dev libsasl2-modules maven 
     libapr1-dev libsvn-dev zlib1g-dev iputils-ping
     
  </code></pre>
  <p>The problem is begin when I want to build Mesos. I did these steps for that:</p>
  <pre><code>cd mesos-1.7.0
  ./bootstrap
  mkdir build
  cd build
  ../configure
  make
  </code></pre>
  <p>My IP addresses are 150.20.11.137,150.20.11.134,150.20.11.157. I downloaded Mesos package on all of them and extracted in the same path.
  I did &lt;../configure&gt; on every node without any problems, but when I run &quot;make&quot; I got this error on each node:</p>
  <blockquote>
  <p>third_party/cares/cares/ares_init.c: In function ‘ares_dup’:
  third_party/cares/cares/ares_init.c:301:17: error:
  argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did
  you mean to use the size of the destination? [-Werror=sizeof-pointer-
  memaccess]</p>
  </blockquote>
  <blockquote>
  <pre><code>       sizeof(src-&gt;local_dev_name));
  </code></pre>
  </blockquote>
  <pre><code>             ^
  </code></pre>
  <blockquote>
  <p>third_party/cares/cares/ares_init.c: At top level:</p>
  </blockquote>
  <blockquote>
  <p>cc1: error: unrecognized command line option ‘-Wno-invalid-source-
  encoding’ [-Werror]
  cc1: all warnings being treated as errors</p>
  </blockquote>
  <blockquote>
  <p>make[4]: *** [Makefile:2635: /home/spark/mesos-
  1.7.0/build/3rdparty/grpc-
  1.10.0/objs/opt/third_party/cares/cares/ares_init.o] Error 1</p>
  </blockquote>
  <blockquote>
  <p>make[4]: Leaving directory '/home/spark/mesos-
  1.7.0/build/3rdparty/grpc-1.10.0'</p>
  </blockquote>
  <blockquote>
  <p>make[3]: *** [Makefile:1446: grpc-1.10.0-build-stamp] Error 2</p>
  </blockquote>
  <blockquote>
  <p>make[3]: Leaving directory '/home/spark/mesos-1.7.0/build/3rdparty'</p>
  </blockquote>
  <blockquote>
  <p>make 2]: *** [Makefile:1035: all-recursive] Error 1</p>
  </blockquote>
  <blockquote>
  <p>make[2]: Leaving directory '/home/spark/mesos-1.7.0/build/3rdparty'</p>
  </blockquote>
  <blockquote>
  <p>make[1]: *** [Makefile:765: all] Error 2</p>
  </blockquote>
  <blockquote>
  <p>make[1]: Leaving directory '/home/spark/mesos-1.7.0/build/3rdparty'</p>
  </blockquote>
  <blockquote>
  <p>make: *** [Makefile:768: all-recursive] Error 1</p>
  </blockquote>