OpenWrt Forum Archive

Topic: build package "Capsulator" error

The content of this topic has been archived on 6 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hi guys,

  i want to build the "capsulator" from "http://www.openflow.org/wk/index.php/Tu … Capsulator" into a openwrt package. i download the Capsulator source file.
  i put it in the /package/Capsulator/src folder.
  i don't change the original Makefile in the Capsulator source file.
  the Capsulator/src/Makefile shows below.

# Makefile for Capsulator
# ------------------------------------------------------------------------------
# make        -- builds Capsulator and all dependencies in the default mode
# make debug  -- builds Capsulator in debug mode
# make release-- builds Capsulator in release mode
# make clean  -- clean up byproducts

# utility programs used by this Makefile
CC   = gcc
MAKE = gmake --no-print-directory

# set system-dependent variables
OSTYPE = $(shell uname)
ifeq ($(OSTYPE),Linux)
ARCH=-D_LINUX_
ENDIAN=-D_LITTLE_ENDIAN_
LIB_SOCKETS =
endif
ifeq ($(OSTYPE),SunOS)
ARCH=-D_SOLARIS_
ENDIAN=-D_BIG_ENDIAN_
LIB_SOCKETS = -lnsl -lsocket
endif

# define names of our build targets
APP = capsulator

# compiler and its directives
DIR_INC       =
DIR_LIB       =
LIBS          = $(LIB_SOCKETS) -lpthread
FLAGS_CC_BASE = -c -Wall $(ARCH) $(ENDIAN) $(DIR_INC)

# compiler directives for debug and release modes
BUILD_TYPE = debug
ifeq ($(BUILD_TYPE),debug)
FLAGS_CC_BUILD_TYPE = -g -D_DEBUG_
else
FLAGS_CC_BUILD_TYPE = -O3
endif

# put all the flags together
CFLAGS = $(FLAGS_CC_BASE) $(FLAGS_CC_BUILD_TYPE)

# project sources
SRCS = common.c capsulator.c get_ip_for_interface.c main.c
OBJS = $(patsubst %.c,%.o,$(SRCS))
DEPS = $(patsubst %.c,.%.d,$(SRCS))

# include the dependencies once we've built them
ifdef INCLUDE_DEPS
include $(DEPS)
endif

#########################
## PHONY TARGETS
#########################
# note targets which don't produce a file with the target's name
.PHONY: all clean clean-all clean-deps debug release deps

# build the program
all: $(APP)

# clean up by-products (except dependency files)
clean:
    rm -f *.o $(APP)

# clean up all by-products
clean-all: clean clean-deps

# clean up dependency files
clean-deps:
    rm -f .*.d

# shorthand for building debug or release builds
debug release:
    @$(MAKE) BUILD_TYPE=$@ all

# build the dependency files
deps: $(DEPS)

# includes are ready build command
IR=ir
$(APP).$(IR): $(OBJS)
    $(CC) -o $(APP) $(OBJS) $(DIR_LIB) $(LIBS)

#########################
## REAL TARGETS
#########################
$(APP): deps
    @$(MAKE) BUILD_TYPE=$(BUILD_TYPE) INCLUDE_DEPS=1 $@.$(IR)

$(DEPS): .%.d: %.c
    $(CC) -MM $(CFLAGS) $(DIRS_INC) $< > $@

and Capsulator/Makefile shows below.

include $(TOPDIR)/rules.mk

PKG_NAME:=Capsulator
PKG_RELEASE:=1

PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

define Package/Capsulator
    SECTION:=utils
    CATEGORY:=Utilities
    TITLE:=this is Capsulator_test
endef

define Package/Capsulator/description
    this is a test Capsulator!
endef

#CONFIGURE_VARS+= \
    CC="$(TOOLCHAIN_DIR)/bin/$(TARGET_CC)"
#MAKE_FLAGS += \
    CXXFLAGS="$(TARGET_CXXFLAGS) -fno-builtin -fno-rtti -nostdinc++" \
    CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
    LDFLAGS="$(TARGET_LDFLAGS) $(LDFLAGS)" \
    LIBS="$(TARGET_LIBS) -nodefaultlibs -luClibc++ -lm" \
    DESTDIR="$(PKG_INSTALL_DIR)"


define Build/Prepare
    mkdir -p $(PKG_BUILD_DIR)
    $(CP) ./src/* $(PKG_BUILD_DIR)/
endef

#define Build/Compile
#   $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS);
#endef

define Package/Capsulator/install
    $(INSTALL_DIR) $(1)/bin
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/Capsulator $(1)/bin
endef

$(eval $(call BuildPackage,Capsulator))

i am new to do this kind of thing. i try to build a helloworld package before, and it succeeds.
so i do some changes from the helloworld package.

here is the problem.

i do make package/Capsulator/compile
the error shows below.

crazygod@crazygod-virtual-machine:~/backfire$ make package/Capsulator/compile V=99
make[1]: Entering directory `/home/crazygod/backfire'
make[2]: Entering directory `/home/crazygod/backfire/package/Capsulator'
make -C /home/crazygod/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/Capsulator AR=mips-openwrt-linux-uclibc-ar AS="mips-openwrt-linux-uclibc-gcc -c -Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time -fhonour-copts -msoft-float" LD=mips-openwrt-linux-uclibc-ld NM=mips-openwrt-linux-uclibc-nm CC="mips-openwrt-linux-uclibc-gcc" GCC="mips-openwrt-linux-uclibc-gcc" CXX="mips-openwrt-linux-uclibc-g++" RANLIB=mips-openwrt-linux-uclibc-ranlib STRIP=mips-openwrt-linux-uclibc-strip OBJCOPY=mips-openwrt-linux-uclibc-objcopy OBJDUMP=mips-openwrt-linux-uclibc-objdump SIZE=mips-openwrt-linux-uclibc-size CROSS="mips-openwrt-linux-uclibc-" ARCH="mips" CXXFLAGS=" -fno-builtin -fno-rtti -nostdinc++" CPPFLAGS="-I/home/crazygod/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include -I/home/crazygod/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/include -I/home/crazygod/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/include -I/home/crazygod/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include/uClibc++ -I/include" LDFLAGS="-L/home/crazygod/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/lib -L/home/crazygod/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/lib -L/home/crazygod/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/lib " LIBS=" -nodefaultlibs -luClibc++ -lm" DESTDIR="/home/crazygod/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/Capsulator/ipkg-install";
make[3]: Entering directory `/home/crazygod/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/Capsulator'
mips-openwrt-linux-uclibc-gcc -MM -c -Wall mips -D_LITTLE_ENDIAN_  -g -D_DEBUG_  capsulator.c > .capsulator.d
mips-openwrt-linux-uclibc-gcc: mips: No such file or directory
make[3]: *** [.capsulator.d] Error 1
make[3]: Leaving directory `/home/crazygod/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/Capsulator'
make[2]: *** [/home/crazygod/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/Capsulator/.built] Error 2
make[2]: Leaving directory `/home/crazygod/backfire/package/Capsulator'
make[1]: *** [package/Capsulator/compile] Error 2
make[1]: Leaving directory `/home/crazygod/backfire'
make: *** [package/Capsulator/compile] Error 2

plz someone helps me.
any suggestion is appreciated.

(Last edited by crazygod1100908 on 13 May 2013, 10:04)

I _think_ it is because the ARCH flag, which is 'mips' should be something like '-mips' or '-mips32r2'
Presumably the helloworld make files override the Capsulator on, otherwise it would say -D_LINUX_
What changes did you make to helloworld?

hi~
Actually i just change the "helloworld" to "Capsulator". beacause i think it'll be ok.
but it's not my expected results.
make package/helloworld/compile is ok. but Capsulator is not. so sad~

Try

make clean
make make package/Capsulator/compile V=99

hi robthebrew~

  thanks your suggestion.
  i try make clean & make package/Capsulator/compile
  it seems the same as before error.

At this point I really have no idea.
My last guess is

make distclean

But I don't know how far this goes in the dist: best to back up your Capsulator dirs first.

what SDK are you using?

hi mapisto~

   i just used the way  "svn co svn://svn.openwrt.org/openwrt/branches/backfire" to get the SDK.
   i am new to this field, so i just follow "https://forum.openwrt.org/viewtopic.php?id=27344" the steps.
   thanks your reply.

(Last edited by crazygod1100908 on 14 May 2013, 10:08)

the compile process enters /home/crazygod/backfire/package/Capsulator , then do compile.
there is a line in the error message.

mips-openwrt-linux-uclibc-gcc: mips: No such file or directory

i check the the folder "/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1", it actually has this file "mips-openwrt-linux-uclibc-gcc" . it looks so weird~

In this line

mips-openwrt-linux-uclibc-gcc -MM -c -Wall mips -D_LITTLE_ENDIAN_  -g -D_DEBUG_  capsulator.c > .capsulator.d

it is the mips after -Wall that is the problem.

Make sure you read the Tunneling - Capsulator (Building section). Also, I created the following patch to remove the ARCH.

--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ APP = capsulator
 DIR_INC       =
 DIR_LIB       =
 LIBS          = $(LIB_SOCKETS) -lpthread
-FLAGS_CC_BASE = -c -Wall $(ARCH) $(ENDIAN) $(DIR_INC)
+FLAGS_CC_BASE = -c -Wall $(ENDIAN) $(DIR_INC)
 
 # compiler directives for debug and release modes
 BUILD_TYPE = debug

hi robthebrew,mazilo
  thanks for your reply.
  i follow the mazilo's suggestion. it works indeed.
  it seems almost successful.
  thanks a lot~

(Last edited by crazygod1100908 on 15 May 2013, 06:40)

Now, i load the package to my device(tplink wr1043nd)
some problems comes~

root@OpenWrt:/# capsulator
capsulator: can't load library 'libpthread.so.0'
root@OpenWrt:/# ldd capsulator
        libpthread.so.0 => not found
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x2aabe000)
        libc.so.0 => /lib/libc.so.0 (0x2aade000)
        ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x2aaa8000)

i think it means i don't install libpthread. i'll try it~
i appreciated to hear any suggestions.
thx~

(Last edited by crazygod1100908 on 15 May 2013, 08:01)

You probably need to install libpthread package.

Hi,crazygod1100908.
I need to build Capsulator too. I use Netgear WNDR4300 v1 and my OS is ubuntu 14.04.
My Capsulator/makefile is the same as yours.
My Capsulator/src/makefile shows belows. I change the FLAGS_CC_BASE and MAKE variable.

# Makefile for Capsulator
# ------------------------------------------------------------------------------
# make        -- builds Capsulator and all dependencies in the default mode
# make debug  -- builds Capsulator in debug mode
# make release-- builds Capsulator in release mode
# make clean  -- clean up byproducts

# utility programs used by this Makefile
CC   = gcc
MAKE = make --no-print-directory

# set system-dependent variables
OSTYPE = $(shell uname)
ifeq ($(OSTYPE),Linux)
ARCH=-D_LINUX_
ENDIAN=-D_LITTLE_ENDIAN_
LIB_SOCKETS =
endif
ifeq ($(OSTYPE),SunOS)
ARCH=-D_SOLARIS_
ENDIAN=-D_BIG_ENDIAN_
LIB_SOCKETS = -lnsl -lsocket
endif

# define names of our build targets
APP = capsulator

# compiler and its directives
DIR_INC       =
DIR_LIB       =
LIBS          = $(LIB_SOCKETS) -lpthread
FLAGS_CC_BASE = -c -Wall $(ENDIAN) $(DIR_INC)

# compiler directives for debug and release modes
BUILD_TYPE = debug
ifeq ($(BUILD_TYPE),debug)
FLAGS_CC_BUILD_TYPE = -g -D_DEBUG_
else
FLAGS_CC_BUILD_TYPE = -O3
endif

# put all the flags together
CFLAGS = $(FLAGS_CC_BASE) $(FLAGS_CC_BUILD_TYPE)

# project sources
SRCS = common.c capsulator.c get_ip_for_interface.c main.c
OBJS = $(patsubst %.c,%.o,$(SRCS))
DEPS = $(patsubst %.c,.%.d,$(SRCS))

# include the dependencies once we've built them
ifdef INCLUDE_DEPS
include $(DEPS)
endif

#########################
## PHONY TARGETS
#########################
# note targets which don't produce a file with the target's name
.PHONY: all clean clean-all clean-deps debug release deps

# build the program
all: $(APP)

# clean up by-products (except dependency files)
clean:
    rm -f *.o $(APP)

# clean up all by-products
clean-all: clean clean-deps

# clean up dependency files
clean-deps:
    rm -f .*.d

# shorthand for building debug or release builds
debug release:
    @$(MAKE) BUILD_TYPE=$@ all

# build the dependency files
deps: $(DEPS)

# includes are ready build command
IR=ir
$(APP).$(IR): $(OBJS)
    $(CC) -o $(APP) $(OBJS) $(DIR_LIB) $(LIBS)

#########################
## REAL TARGETS
#########################
$(APP): deps
    @$(MAKE) BUILD_TYPE=$(BUILD_TYPE) INCLUDE_DEPS=1 $@.$(IR)

$(DEPS): .%.d: %.c
    $(CC) -MM $(CFLAGS) $(DIRS_INC) $< > $@

The error shows below. It seems that a folder has not been created.

Collecting package info: done
Collecting target info: done
#
# configuration written to .config
#
make[1]: Entering directory `/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64'
make[2]: Entering directory `/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/package/Capsulator'
mkdir -p /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator
cp -fpR ./src/* /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator/
touch /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator/.prepared_ea23a9cda81e60a7910828c1395ed66a
rm -f /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.Capsulator_installed
(cd /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator/./; if [ -x ./configure ]; then find /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator/ -name config.guess | xargs -r chmod u+w; find /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator/ -name config.guess | xargs -r -n1 cp --remove-destination /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/scripts/config.guess; find /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator/ -name config.sub | xargs -r chmod u+w; find /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator/ -name config.sub | xargs -r -n1 cp --remove-destination /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/scripts/config.sub; AR="mips-openwrt-linux-uclibc-gcc-ar" AS="ccache_cc -c -Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float" LD=mips-openwrt-linux-uclibc-ld NM="mips-openwrt-linux-uclibc-gcc-nm" CC="ccache_cc" GCC="ccache_cc" CXX="ccache_cxx" RANLIB="mips-openwrt-linux-uclibc-gcc-ranlib" STRIP=mips-openwrt-linux-uclibc-strip OBJCOPY=mips-openwrt-linux-uclibc-objcopy OBJDUMP=mips-openwrt-linux-uclibc-objdump SIZE=mips-openwrt-linux-uclibc-size CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -mips16 -minterlink-mips16 " CXXFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -mips16 -minterlink-mips16 " CPPFLAGS="-I/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include -I/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/include -I/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/include " LDFLAGS="-L/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib -L/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/lib -L/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/lib -L/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib "   ./configure --target=mips-openwrt-linux --host=mips-openwrt-linux --build=x86_64-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls   ; fi; )
rm -f /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator/.configured_*
touch /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator/.configured_yyn
CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -mips16 -minterlink-mips16  -I/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include -I/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/include -I/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/include " CXXFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -mips16 -minterlink-mips16  -I/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include -I/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/include -I/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/include " LDFLAGS="-L/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib -L/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/lib -L/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/lib -L/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib " make -j1 -C /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator/. AR="mips-openwrt-linux-uclibc-gcc-ar" AS="ccache_cc -c -Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float" LD=mips-openwrt-linux-uclibc-ld NM="mips-openwrt-linux-uclibc-gcc-nm" CC="ccache_cc" GCC="ccache_cc" CXX="ccache_cxx" RANLIB="mips-openwrt-linux-uclibc-gcc-ranlib" STRIP=mips-openwrt-linux-uclibc-strip OBJCOPY=mips-openwrt-linux-uclibc-objcopy OBJDUMP=mips-openwrt-linux-uclibc-objdump SIZE=mips-openwrt-linux-uclibc-size CROSS="mips-openwrt-linux-uclibc-" ARCH="mips" ;
make[3]: Entering directory `/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator'
ccache_cc -MM -c -Wall -D_LINUX_ -D_LITTLE_ENDIAN_  -g -D_DEBUG_  common.c > .common.d
ccache_cc -MM -c -Wall -D_LINUX_ -D_LITTLE_ENDIAN_  -g -D_DEBUG_  capsulator.c > .capsulator.d
ccache_cc -MM -c -Wall -D_LINUX_ -D_LITTLE_ENDIAN_  -g -D_DEBUG_  get_ip_for_interface.c > .get_ip_for_interface.d
ccache_cc -MM -c -Wall -D_LINUX_ -D_LITTLE_ENDIAN_  -g -D_DEBUG_  main.c > .main.d
ccache_cc -c -Wall -D_LINUX_ -D_LITTLE_ENDIAN_  -g -D_DEBUG_   -c -o common.o common.c
cc1: note: someone does not honour COPTS correctly, passed 0 times
ccache_cc -c -Wall -D_LINUX_ -D_LITTLE_ENDIAN_  -g -D_DEBUG_   -c -o capsulator.o capsulator.c
cc1: note: someone does not honour COPTS correctly, passed 0 times
ccache_cc -c -Wall -D_LINUX_ -D_LITTLE_ENDIAN_  -g -D_DEBUG_   -c -o get_ip_for_interface.o get_ip_for_interface.c
cc1: note: someone does not honour COPTS correctly, passed 0 times
ccache_cc -c -Wall -D_LINUX_ -D_LITTLE_ENDIAN_  -g -D_DEBUG_   -c -o main.o main.c
main.c:24:70: warning: backslash and newline separated by space [enabled by default]
   -vb, -virtual_border_intf:  specifies a tap device name as border\n\ 
 ^
cc1: note: someone does not honour COPTS correctly, passed 0 times
ccache_cc -o capsulator common.o capsulator.o get_ip_for_interface.o main.o   -lpthread
make[3]: Leaving directory `/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator'
touch /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator/.built
mkdir -p /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/bin/ar71xx/packages /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator/ipkg-ar71xx/Capsulator/CONTROL /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo
install -d -m0755 /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator/ipkg-ar71xx/Capsulator/bin
install -m0755 /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator/Capsulator /home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator/ipkg-ar71xx/Capsulator/bin
install: cannot stat '/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/Capsulator/Capsulator': No such file or directory
make[2]: *** [/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/bin/ar71xx/packages/base/Capsulator_1_ar71xx.ipk] Error 1
make[2]: Leaving directory `/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/package/Capsulator'
make[1]: *** [package/Capsulator/compile] Error 2
make[1]: Leaving directory `/home/wucanrui/openwrt/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64'
make: *** [package/Capsulator/compile] Error 2

Can you give me some help or suggestion? Thank you.

Oh,I have solved the problem. Thank you.

The discussion might have continued from here.