title: Compiled executable stops on MIPS router with "not found"
body: <p>I need some GPIOs on my ASUS RT-AC66U. That's why I made a circuit board with an MCP2221A.</p>
  
  <p>With <a href="https://github.com/zkemble/libmcp2221" rel="nofollow noreferrer">this source</a> I was able to build the executable file and run it on my x86-64bit machine (Xubuntu 16.04) and everything works fine.</p>
  
  <p>Now I have cross-compiled the same source to MIPS and get this error:</p>
  
  <pre><code>frashman@ASUS-RT-AC66U:/tmp/home/root/gpio$ ls -la
  drwxrwxrwx    2 frashman root           180 Nov  1 12:16 .
  drwx------    4 frashman root           100 Nov  1 12:16 ..
  -rw-rw-rw-    1 frashman root           485 Nov  1 12:16 Makefile
  -rwxrwxr-x    1 frashman root         10044 Nov  1 12:16 gpio
  -rw-rw-r--    1 frashman root         19857 Nov  1 12:16 hid.c
  -rw-rw-r--    1 frashman root         13870 Nov  1 12:16 hidapi.h
  -rw-rw-r--    1 frashman root         24758 Nov  1 12:16 libmcp2221.h
  -rw-rw-r--    1 frashman root          3122 Nov  1 12:16 main.c
  -rw-rw-r--    1 frashman root          4456 Nov  1 12:16 main.o
  frashman@ASUS-RT-AC66U:/tmp/home/root/gpio$ ./gpio 
  -sh: ./gpio: not found
  </code></pre>
  
  <p>Ok, so I build the source on the router itself with a <a href="https://www.hqt.ro/how-to-install-debian-wheezy-mipsel/" rel="nofollow noreferrer">Debian subsystem</a> and the binary file runs without error (except for the 0 found devices - it was not connected at the time when a wrote this)</p>
  
  <pre><code>root@ASUS-RT-AC66U:/home/admin/gpio$ ./gpio 
  Starting!
  Looking for devices... found 0 devices
  Opening device... No MCP2221s found
  </code></pre>
  
  <p>But, if i want to run this binary on the main system of the router it will stop with the same error:</p>
  
  <pre><code>frashman@ASUS-RT-AC66U:/tmp/mnt/entware/entware/debian/home/admin/gpio$ ./gpio 
  -sh: ./gpio: not found
  </code></pre>
  
  <p>This is the makefile:</p>
  
  <pre><code>PROJECT=gpio
  
  SOURCES= \
      main.c
  
  CFLAGS= \
      -c \
      -Wall \
      -Wextra \
      -Wstrict-prototypes \
      -Wunused-result \
      -O3 \
      -std=c99 \
      -fmessage-length=0 \
      -mtune=mips32r2 \
      -mips32r2
  
  LDFLAGS= \
      -s
  
  LDLIBS= \
      -lmcp2221
  
  EXECUTABLE=$(PROJECT)
  
  CC=mipsel-linux-gnu-gcc
  OBJECTS=$(SOURCES:.c=.o)
  
  
  all: $(SOURCES) $(EXECUTABLE)
  
  $(EXECUTABLE): $(OBJECTS)
      $(CC) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@
  
  .c.o:
      $(CC) $(CFLAGS) $&lt; -o $@
  
  clean:
      rm -rf *.o $(EXECUTABLE)
  
  .PHONY: clean all
  </code></pre>
  
  <p>Does anyone have an idea why that could be?</p>