MuJJus / openwrt-n2n

N2N V2 Edge native protocol and Supernode for OpenWrt
http://www.ntop.org/products/n2n/
GNU General Public License v3.0
36 stars 34 forks source link

SVN url outdated #1

Closed YoRyan closed 8 years ago

YoRyan commented 8 years ago

The server with the source code seems to have been changed, it's now shop.ntop.org instead of svn.ntop.org, breaking the build.

So that line in the Makefile should now be PKG_SOURCE_URL:=https://shop.ntop.org/svn/ntop/trunk/n2n/n2n_v2

pocha commented 8 years ago

I think there is another problem. The compilation does not complete currently & ipks are not getting built.

YoRyan commented 8 years ago

@pocha Working fine here. Fedora 24.

curl 'https://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/OpenWrt-SDK-15.05.1-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2' | tar xj
cd OpenWrt-SDK-15.05.1-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/
git clone 'https://github.com/MuJJus/openwrt-n2n' package/n2n
make menuconfig
sed -i 's#https://svn.ntop.org/svn/ntop/trunk/n2n/n2n_v2#https://shop.ntop.org/svn/ntop/trunk/n2n/n2n_v2#' Makefile
sed -i 's/PKG_REV:=9343/PKG_REV:=9347/' Makefile
make package/n2n/compile
ls bin/ar71xx/packages/base/

I have been unable to build the LuCI packages but can do without those...

pocha commented 8 years ago
pocha@ubuntu:~/OpenWrt-SDK-15.05-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64$ make package/n2n/compile V=s
#
# configuration written to .config
#
make[1]: Entering directory `/home/pocha/OpenWrt-SDK-15.05-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64'
make[2]: Entering directory `/home/pocha/OpenWrt-SDK-15.05-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/package/n2n'
make -C /home/pocha/OpenWrt-SDK-15.05-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/n2n-2.1_svn9343 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" INSTALL_PROG=":"
make[3]: Entering directory `/home/pocha/OpenWrt-SDK-15.05-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/n2n-2.1_svn9343'
make[3]: *** No rule to make target `n2n_v2.7.gz', needed by `all'.  Stop.
make[3]: Leaving directory `/home/pocha/OpenWrt-SDK-15.05-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/n2n-2.1_svn9343'
make[2]: *** [/home/pocha/OpenWrt-SDK-15.05-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/n2n-2.1_svn9343/.built] Error 2
make[2]: Leaving directory `/home/pocha/OpenWrt-SDK-15.05-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/package/n2n'
make[1]: *** [package/n2n/compile] Error 2
make[1]: Leaving directory `/home/pocha/OpenWrt-SDK-15.05-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64'
make: *** [package/n2n/compile] Error 2
MuJJus commented 8 years ago

fixed, thanks.

pocha commented 8 years ago

I think there is some issue with svn checkout

A    n2n-2.1_svn9347/win32/wintap.c
A    n2n-2.1_svn9347/win32/getopt1.c
A    n2n-2.1_svn9347/win32/n2n_win32.h
svn: E175002: GET request failed: 403 Forbidden
svn: E155000: Destination directory exists; please remove the directory or use --force to   overwrite
svn: E155000: 'n2n-2.1_svn9347' already exists
make[2]: *** [/home/pocha/OpenWrt-SDK-15.05-ar71xx-generic_gcc-4.8-linaro_uClibc-  0.9.33.2.Linux-x86_64/dl/n2n-2.1_svn9347.tar.gz] Error 1

I could see a copy of the checked out directory inside tmp/dl directory. I tar.gzed it & placed it in dl/ directory to avoid re-checkout . It worked. But then, things get stuck at

ccache_cc -Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -mips16 -minterlink-mips16 -c tuntap_netbsd.c
make[3]: *** No rule to make target `tuntap_linux.o', needed by `n2n.a'.  Stop.
make[3]: Leaving directory `/home/pocha/OpenWrt-SDK-15.05-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/n2n-2.1_svn9347'
make[2]: *** [/home/pocha/OpenWrt-SDK-15.05-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/n2n-2.1_svn9347/.built] Error 2

Machine - Ubuntu SDK - 15.05

pocha commented 8 years ago

Ok. I figured some files have not come because of the checkout error. tuntap_linux.c is one of them. I copied it from elsewhere & it has now moved to the next step. But now I am stuck at

make[3]: *** No rule to make target `edge.8.gz', needed by `all'.  Stop.
pocha commented 8 years ago

Hmm . ok so a lot of other files have not been copied. Figured each & copied them one by one. Able to build it.

I think the codebase could be moved from svn to somewhere on github. I am not really an openwrt expert so cant really change Makefile to use git instead of svn. Else I would have done that.

Just a suggestion. The svn co behaves pretty randomly at times.

MuJJus commented 8 years ago

@pocha please try 1d34e5a

pocha commented 8 years ago

Cool this works.