I'm trying to install Clockwordmod Tether on my Ubuntu 16.10 laptop in order to facilitate USB tethering with the corresponding app on Google Play.

I've downloaded and extracted the Tether tar file. The instructions for installation are very simple. Just run the following in a terminal:

cd /home/username/Tether/node

But when I run make, it always ends in this error:

../deps/v8/src/checks.h:251:22: warning: typedef ‘__StaticAssertTypedef__125’ locally defined but not used [-Wunused-local-typedefs]
     SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
../deps/v8/src/checks.h:241:39: note: in definition of macro ‘SEMI_STATIC_JOIN_HELPER’
 #define SEMI_STATIC_JOIN_HELPER(a, b) a##b
../deps/v8/src/checks.h:251:5: note: in expansion of macro ‘SEMI_STATIC_JOIN’
     SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
../deps/v8/src/checks.h:283:30: note: in expansion of macro ‘STATIC_CHECK’
 #define STATIC_ASSERT(test)  STATIC_CHECK(test)
../deps/v8/src/v8utils.h:125:3: note: in expansion of macro ‘STATIC_ASSERT’
   STATIC_ASSERT(sizeof(T) == kPointerSize);
In file included from ../deps/v8/src/elements.h:32:0,
                 from ../deps/v8/src/objects-inl.h:38,
                 from ../deps/v8/src/v8.h:60,
                 from ../deps/v8/src/accessors.cc:28:
../deps/v8/src/objects.h: At global scope:
../deps/v8/src/objects.h:5017:44: error: left operand of shift expression ‘(-1 << 3)’ is negative [-fpermissive]
   static const int kElementsKindMask = (-1 << kElementsKindShift) &
../deps/v8/src/objects.h:7152:36: error: left operand of shift expression ‘(-8 << 26)’ is negative [-fpermissive]
       (~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) |
deps/v8/tools/gyp/v8_base.target.mk:209: recipe for target '/home/username/Tether/node/out/Release/obj.target/v8_base/deps/v8/src/accessors.o' failed
make[1]: *** [/home/username/Tether/node/out/Release/obj.target/v8_base/deps/v8/src/accessors.o] Error 1
make[1]: Leaving directory '/home/username/Tether/node/out'
Makefile:26: recipe for target 'node' failed
make: *** [node] Error 2

Looking on the net, it was suggested to install the following:

sudo apt-get install libssl-dev cmake g++ lib32ncurses5 nodejs-legacy

But this didn't help. I also saw that it might have something to do with a Python version issue, but I could not find user level instructions on how to deal with that.

Is there a way I can resolve this and install Tether on my Ubuntu laptop? And is the solution something that can be explained in terms that someone who knows nothing about configure or make can understand?


Thanks to DropHammer99's answer below, it seems I was able to successfully compile the program. This is how the XXFLAGS=-fpermissive make command ended after a few minutes:

  LINK(target) /home/username/Tether/node/out/Release/node: Finished
  touch /home/username/Tether/node/out/Release/obj.target/node_dtrace_header.stamp
  touch /home/username/Tether/node/out/Release/obj.target/node_dtrace_provider.stamp
  touch /home/username/Tether/node/out/Release/obj.target/node_dtrace_ustack.stamp
  touch /home/username/Tether/node/out/Release/obj.target/node_etw.stamp
make[1]: Leaving directory '/home/username/Tether/node/out'
ln -fs out/Release/node node

Unfortunately, though, when I first ran the program as instructed in the README file, it crashed with this error:

~/Tether$ sudo linux/run.sh
[sudo] password for username: 
Starting Tether...
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
linux/run.sh: line 39: 21096 Segmentation fault      (core dumped) $NODE/node tether.js

Is this program just not going to work, or is there something I can do to resolve this segmentation fault error?

  • I just had a look. The Clockworkmod-tether tar gz file contains source code from 2012. It might be hard to make that work properly. And perhaps a silly question : usb tethering worked fine on a smart phone I've used in the last few months (On Android 6.x, wifi on the phone, usb tethering, Internet to a desktop), without root privileges. Does you phone or your phone company restrict you in using tethering ?
    – albert j
    Commented Jan 20, 2017 at 0:25
  • @albertj, thanks for responding. The tethering function has been hobbled by the data service company I originally purchased the phone from.
    – Questioner
    Commented Jan 21, 2017 at 3:14

8 Answers 8


That error is the C++ compiler complaining about some usable but less than ideal code. With the right command line options, you can tell the compiler to ignore code issues like that and keep going. This isn't always the best solution, but it will get things to compile and work.

First, run make clean to get rid of anything left behind from your old build attempt.

Then, run CXXFLAGS=-fpermissive make to try again with the C++ compiler downgrading those code issues to warnings.

I was able to reproduce your error on my 64-bit 16.10 install, and this workaround allowed the build to get past that error for me.

Unfortunately, the build seemed to fail further along with this issue:

make -C out BUILDTYPE=Release V=1
make[1]: Entering directory '/home/username/work/Tether/node/out'
  LD_LIBRARY_PATH=/home/username/work/Tether/node/out/Release/lib.host:/home/username/work/Tether/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/tools/gyp; mkdir -p /home/username/work/Tether/node/out/Release/obj.target/v8_snapshot/geni; "/home/username/work/Tether/node/out/Release/mksnapshot" --log-snapshot-positions --logfile "/home/username/work/Tether/node/out/Release/obj.target/v8_snapshot/geni/snapshot.log" "/home/username/work/Tether/node/out/Release/obj.target/v8_snapshot/geni/snapshot.cc"
Segmentation fault (core dumped)
deps/v8/tools/gyp/v8_snapshot.target.mk:13: recipe for target '/home/username/work/Tether/node/out/Release/obj.target/v8_snapshot/geni/snapshot.cc' failed
make[1]: *** [/home/username/work/Tether/node/out/Release/obj.target/v8_snapshot/geni/snapshot.cc] Error 139
make[1]: Leaving directory '/home/username/work/Tether/node/out'
Makefile:26: recipe for target 'node' failed
make: *** [node] Error 2

I'm still looking into that issue. Try the initial workaround, as maybe your system won't hit the second issue that mine did.

Update: I was able to sidestep that second issue by telling the config tool to skip the snapshot step. Unfortunately, I have no idea what the snapshot step is supposed to do, and am afraid I might just be postponing a failure until later. If you want to try this second workaround too, here is a command sequence to try:

make distclean
./configure --without-snapshot
CXXFLAGS=-fpermissive make
  • Thank you for this answer. I was able to compile with your XXFLAGS=-fpermissive make command, and fortunately I did not hit the second issue you described. However, when I ran the program, there was some kind of segmentation fault error. Is that something that can be resolved in the compile process? I've updated my question with the new situation and output.
    – Questioner
    Commented Jan 14, 2017 at 2:54
  • Segmentation fault errors are much more difficult to resolve, most likely outside the scope of the compile process.
    – JustinB
    Commented Jan 14, 2017 at 5:06
  • Well, that's disappointing. Thanks for helping anyway. :)
    – Questioner
    Commented Jan 14, 2017 at 6:00
  • 1
    the segfault suggests that the permissive make was too permissive and built broken code or possibly its linked with an unexpected version of a library.
    – Amias
    Commented Jan 16, 2017 at 10:59
  • I awarded this answer the bounty because, a) I had to award it because the deadline coming up, and b) although all the answers here were very helpful and appreciated, this answer did technically get me over the compiling issue which was the original problem outlined in the question.
    – Questioner
    Commented Jan 21, 2017 at 3:16

It seems that Clockwordmod Tether linux app is out-of-date and needs a significant maintenance. I have compiled node with help of above answers. But it gave

linux/run.sh: line 39: 25901 Segmentation fault $NODE/node tether.js

error. When I check its node version, I saw that v0.8.14. This version is very very old that it's out of documentation. When I edited run.sh file and make it use my system installed nodejs (v4.8.2), it failed message: [TypeError: os.setupTun is not a function]

As being gnu/linux users, we need to find another alternative up-to-date solution this application!


I have a fix for now.

  • Go in file: spaces.cc in node/deps/v8/src
  • Go to function: bool PagedSpace::AdvanceSweeper (approximately line 2274)
  • Add return true; at the beginning of the method.


make distclean
./configure --without-snapshot
CXXFLAGS=-fpermissive make

Run tether:

sudo linux/run.sh

It connects and is in the network manager!

  • 2
    I was successfully connected for few minutes, then the error "./run.sh: line 39: 22873 Segmentation fault $NODE/node tether.js" occurs and the connection is lost. is there a solution ?
    – Nasreddine
    Commented Aug 31, 2017 at 8:11
  • 1
    I had the same segfault, and I solved it by commenting out a the entire do-while loop in the method. The fix can be found here. github.com/bemehiser/Tether Commented Mar 10, 2018 at 6:42

When you get a segfault its usually a mismatch of libraries causing unexpected behaviour.

a segfault will cause a core dump, this is a dump to a file of the running state of the program just before i crashed , you can use this to debug why it crashed. This is complex stuff.

by default core dumping is often switched off , to switch it on you will need to ensure your ulimit settings allow a core file to be made , you can then load this core file in to a debugger and have it show you where it got stuck.

to configure your session to allow cores to be generated:

ulimit -c unlimited

then run your program and allow it to segfault and create a file called core

to diagnose it you can use the gnu debugger GDB (where your program is called programname and the corefile is called core)

sudo apt-get install gdb
gdb programname core

the program will then run up to the point where it segfaults and you will get a prompt , you can enter "bt" to get a backtrace which should point you at the origin of the problem. This info will be of use in a bug report even if you don't understand it.

Often compiled code is stripped of its debug info which can make this approach much harder.

For more info - http://bl0rg.krunch.be/segfault-gdb-strace.html

  • Thank you for responding. I tried running the ulimit -c unlimited command before the Tether command, but it didn't change anything. I then tried running gdp programname corefile, but it simply said gdp command not found. After that, I'm afraid your description is way above me, so I'm not totally sure what else I should be doing.
    – Questioner
    Commented Jan 17, 2017 at 2:48
  • sorry , there were missing bits , i've updated the answer
    – Amias
    Commented Jan 19, 2017 at 9:20

Re from:Bob Dickens Jr/BobDCoder,2017 I am not sure where to reply to this issue, so I hope this is the right place.

I seen some errors that are explainable in the build error and wish to comment on them as I am sure it will take the errors away and might further the compile.

./run.sh: line 38: ../linux/adb: No such file or directory This issue is related to the Tether/Linux you will find a run.sh and there is a line right below cd ../nodethat needs to be edited. Find ../linux/adb and change this line to adb start-server if you did a install of ADB, or /your/path/to/adb adb start-server if you simply copy and pasted adb in /usr/bin/adb or some other directory.

That should remove that ../linux/adb Error

I am using Ubuntu 16.04 and i downloaded the rar file you mentioned above, and ran

./configure && make

I managed to build without errors, here is my make log for build , have you tried doing make clean and then ./configure && make after you installed those new packages?



Here was my output after i ran ~/Documents/Tether/linux/run.sh as root.

  Starting Tether...
 ./run.sh: line 38: ../linux/adb: No such file or directory
  Opening tun device.
  Opening tun device: /dev/net/tun
  Forking worker.
  Opening tun device.
  adb binary path: "/home/username/Documents/Tether/linux/adb"
  Checking phone status...
  tun worker initialized.
  { [Error: Command failed: /bin/sh: 1:/home/username/Documents/Tether/linux/adb: not found
  ] killed: false, code: 127, signal: null }
  Fatal error setting up TCP listener. (Exiting)
  A possible cause may be that a "node.exe" processes was left     dangling.
  Please kill any node processes you find running.
  This may also be cause by a firewall that disallows connections to   Tether.

   ReferenceError: exitTether is not defined
   at Server.<anonymous> (/home/username/Documents/Tether/node-tuntap/tuntap.js:558:7)
   at Server.EventEmitter.emit (events.js:96:17)
   at Server._listen2.self._handle.onconnection (net.js:894:14)
   at process.startup.processNextTick.process._tickCallback (node.js:244:9)
   TCP Catcher worker has died. Exiting.
   { '0': 1, '1': null }

I guess the reasons why Tether is not running in this case would be:

  1. nodejs-legacy is not installed (from run.sh line 39:$NODE/node tether.js),
  2. Android SDK is not installed (from run.sh line 38: ../linux/adb start-server).

But i did not get any segmentation fault error. I have no idea about Nodejs, have you tried if node works properly as standalone command?

Seems like your ..adb/server start-server has been executed successfully. It looks like there's a problem with $NODE/node tether.js on line 39. Here,tether.js file is the first argument to node command. I would try to execute node tether.js as a standalone command on the terminal.

  • Thank you for answering. After a successful compile, are you able to successfully run the program? I was able to successfully compile the program with the command XXFLAGS=-fpermissive make, but, I couldn't run it, as I've described in my updated question.
    – Questioner
    Commented Jan 14, 2017 at 2:56
  • Thanks for following up. I checked that I have nodejs-legacy installed, and I also installed the Android SDK. Unfortunately, when I run the program I get the same segmentation fault error. It seems this is simply not going to work.
    – Questioner
    Commented Jan 14, 2017 at 6:01
  • You're welcome! It seems you are not the only person who has Segmenation fault(core dumped) issue with node See here . The issue seemed to have resolved for some people when they recompiled thedependencies using npm rebuild
    – Abel Tom
    Commented Jan 14, 2017 at 8:20
  • Thanks for the additional tip. I had to install npm, and then I ran npm rebuild, but unfortunately it did not solve the segmentation fault.
    – Questioner
    Commented Jan 15, 2017 at 3:56

To correct my failing minds typos

Re from:Bob Dickens Jr/BobDCoder,2017

I seen an error that is explainable in the build error results and wish to suggest several thoughts of correction as I am sure it will take that error out of the picture and might further the compile and make.

./run.sh: line 38: ../linux/adb: No such file or directory This issue is obviously related to a file in the Tether/Linux directory/folder called run.sh which needs to be edited.

There is a line right below cd ../node that needs to be edited so Find (line 38)../linux/adb and change this line to adb start-server if you did a automatic install of ADB.

cd ../node

adb start-server

An automatic install it should have automatically set the path in the above setup!

However if you manually created a directory and copied adb to /usr/bin/adb OR If you copied adb to some other directory then you may need to change the lines to the code below. cd /your/path/to/adb adb start-server.

However since line 37 reads cd ../node and puts you in the node directory, it is unclear if the second change in directory (line 38)cd /some/custom/directory adb start-server will cause the compiler or run.sh to error again as it would take you out of the node directory as it runs.

The reason for this for this is cd .. in the code and needs to be pointed out. cd .. has for decades been used to back out of the current directory by one level, So.....

  • ( run.sh ) is in tether/linux directory to start with and where it is running.
  • But in the run.sh code itself, when it runs, it tells run.sh to back out of the /linux sub-directory to /Tether with a "cd .." portion of (line 37) the command!
  • With the finish of the command on line 37 /node it also tells it to switch to the node directory. . . . If such is the case I took the liberty of re-coding line 37, 38 and a new lines as to correct this issue.

cd ../node

cd /usr/bin/adb

adb start-server

cd /YourAbsolute/path/back/to/Tether/node

or you could simply try removing line 37s code cd ../node and trying the below

cd /usr/bin/adb

adb start-server

cd /YourAbsolute/path/back/to/Tether/node

It is unclear to me if Node needs to run before starting the adb server or if Node can run after the adb server has started (I think logically the later) would work.

With a little playing, that should remove the ../linux/adb Error


Another trick to try is short,quick and simple but may defeat the problem. Make a copy of the newer installed adb file and paste it into the tether/linux directory with run.sh and let it overwrite the older copy of adb as it obviously does not work.

I honestly think that the old adb is corrupt or maybe its just sleepy! lol

I haven't tried this workaround myself, but it's is at least worth a try.


Ubuntu 16.04LTS

sudo apt-get install android-tools-adb
sudo ln -s /android/platform-tools/adb /bin/adb
sudo apt-get install npm 
npm install chainsaw 


No editing of files. Unfortunately unsure if the first two commands are related as this was something I was experimenting with the prior night.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .