aa65535/openwrt-simple-obfs

无法构建

t123yh opened this issue · 14 comments

使用 Ubuntu 16.04, 在 OpenWrt 15.05.1 x86_64 SDK 下构建,提示如下错误信息:

make[3]: Entering directory '/home/t123yh/OpenWrt-SDK-15.05.1-x86-64_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/package/simple-obfs'
mkdir -p /home/t123yh/OpenWrt-SDK-15.05.1-x86-64_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/dl
echo "Checking out files from the git repository..."; mkdir -p /home/t123yh/OpenWrt-SDK-15.05.1-x86-64_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/tmp/dl && cd /home/t123yh/OpenWrt-SDK-15.05.1-x86-64_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/tmp/dl && rm -rf simple-obfs-0.0.2-1 && [ \! -d simple-obfs-0.0.2-1 ] && git clone https://github.com/shadowsocks/simple-obfs.git simple-obfs-0.0.2-1 --recursive && (cd simple-obfs-0.0.2-1 && git checkout 149b57d24d90fff3f7983b42967f6354acb5eeca && git submodule update) && echo "Packing checkout..." && rm -rf simple-obfs-0.0.2-1/.git && 	tar czf /home/t123yh/OpenWrt-SDK-15.05.1-x86-64_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/tmp/dl/simple-obfs-0.0.2-149b57d24d90fff3f7983b42967f6354acb5eeca.tar.gz simple-obfs-0.0.2-1 && mv /home/t123yh/OpenWrt-SDK-15.05.1-x86-64_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/tmp/dl/simple-obfs-0.0.2-149b57d24d90fff3f7983b42967f6354acb5eeca.tar.gz /home/t123yh/OpenWrt-SDK-15.05.1-x86-64_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/dl/ && rm -rf simple-obfs-0.0.2-1; 
Checking out files from the git repository...
Cloning into 'simple-obfs-0.0.2-1'...
remote: Counting objects: 810, done.
remote: Total 810 (delta 0), reused 0 (delta 0), pack-reused 810
Receiving objects: 100% (810/810), 1.35 MiB | 520.00 KiB/s, done.
Resolving deltas: 100% (207/207), done.
Checking connectivity... done.
Submodule 'libcork' (https://github.com/shadowsocks/libcork.git) registered for path 'libcork'
Cloning into 'libcork'...
remote: Counting objects: 3728, done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 3728 (delta 9), reused 0 (delta 0), pack-reused 3706
Receiving objects: 100% (3728/3728), 1.42 MiB | 533.00 KiB/s, done.
Resolving deltas: 100% (1955/1955), done.
Checking connectivity... done.
Submodule path 'libcork': checked out '892a8846dcbed4ef068d8e3b642f1132eb08c85c'
error: The following untracked working tree files would be overwritten by checkout:
	libcork/COPYING
	libcork/Makefile.am
	libcork/README.markdown
	libcork/include/libcork/cli.h
	libcork/include/libcork/cli/commands.h
	libcork/include/libcork/config.h
	libcork/include/libcork/config/arch.h
	libcork/include/libcork/config/bsd.h
	libcork/include/libcork/config/config.h
	libcork/include/libcork/config/gcc.h
	libcork/include/libcork/config/linux.h
	libcork/include/libcork/config/macosx.h
	libcork/include/libcork/config/mingw32.h
	libcork/include/libcork/config/solaris.h
	libcork/include/libcork/config/version.h
	libcork/include/libcork/core.h
	libcork/include/libcork/core/allocator.h
	libcork/include/libcork/core/api.h
	libcork/include/libcork/core/attributes.h
	libcork/include/libcork/core/byte-order.h
	libcork/include/libcork/core/callbacks.h
	libcork/include/libcork/core/error.h
	libcork/include/libcork/core/gc.h
	libcork/include/libcork/core/hash.h
	libcork/include/libcork/core/id.h
	libcork/include/libcork/core/mempool.h
	libcork/include/libcork/core/net-addresses.h
	libcork/include/libcork/core/timestamp.h
	libcork/include/libcork/core/types.h
	libcork/include/libcork/core/u128.h
	libcork/include/libcork/ds.h
	libcork/include/libcork/ds/array.h
	libcork/include/libcork/ds/bitset.h
	libcork/include/libcork/ds/buffer.h
	libcork/include/libcork/ds/dllist.h
	libcork/include/libcork/ds/hash-table.h
	libcork/include/libcork/ds/managed-buffer.h
	libcork/include/libcork/ds/ring-buffer.h
	libcork/include/libcork/ds/slice.h
	libcork/include/libcork/ds/stream.h
	libcork/include/libcork/helpers/errors.h
	libcork/include/libcork/helpers/gc.h
	libcork/include/libcork/helpers/posix.h
	libcork/include/libcork/os.h
	libcork/include/libcork/os/files.h
	libcork/include/libcork/os/process.h
	libcork/include/libcork/os/subprocess.h
	libcork/include/libcork/threads.h
	libcork/include/libcork/threads/atomics.h
	libcork/include/libcork/threads/basics.h
Please move or remove them before you can switch branches.
Aborting
Makefile:62: recipe for target '/home/t123yh/OpenWrt-SDK-15.05.1-x86-64_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/dl/simple-obfs-0.0.2-149b57d24d90fff3f7983b42967f6354acb5eeca.tar.gz' failed

原因已经找到,旧的 simple-obfs(149b57d)没有使用 libcork 的 submodule,而新版使用了 submodule,导致在更新时出现错误。只需要将 simple-obfs 版本更新即可,或在克隆时指定参数直接克隆到原来的版本。我怀疑这是 Git 的设计错误,即:当存储库老版本未使用 submodule 而新版本加入时,checkout 到老版本并不会去掉 submodule。

然而最新版也无法构建,提示找不到 libudns 库。

pexcn commented

要添加 libudns 依赖吧

@pexcn 这货是 shadowsocks 他们搞的,没有 OpenWrt 的 feed,神坑

pexcn commented

奇怪…我上次也编译过这个,很顺利就编译好了。。

@pexcn obfs 库版本更新了,加了 submodule,就编译不了了

这个编译问题怎么解决呢?

LEDE 下编译最新的版本,出现找不到libudns的问题,被卡住了

解决了

fiepi commented

同样的问题 请问怎么解决

fiepi•git/openwrt/chaos_calmer(chaos_calmer⚡)»make package/simple-obfs/compile V=99                     [3:13:04]
make[1]: Entering directory '/home/fiepi/Workspace/git/openwrt/chaos_calmer'
make[2]: Entering directory '/home/fiepi/Workspace/git/openwrt/chaos_calmer/package/libs/toolchain'
if [ -f /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libc" >> /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install
if [ -f /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libgcc" >> /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install
if [ -f /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libstdcpp" >> /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install
if [ -f /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libpthread" >> /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install
if [ -f /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "librt" >> /home/fiepi/Workspace/git/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install
make[2]: Leaving directory '/home/fiepi/Workspace/git/openwrt/chaos_calmer/package/libs/toolchain'
make[2]: Entering directory '/home/fiepi/Workspace/git/openwrt/chaos_calmer/package/simple-obfs'
mkdir -p /home/fiepi/Workspace/git/openwrt/chaos_calmer/dl
echo "Checking out files from the git repository..."; mkdir -p /home/fiepi/Workspace/git/openwrt/chaos_calmer/tmp/dl && cd /home/fiepi/Workspace/git/openwrt/chaos_calmer/tmp/dl && rm -rf simple-obfs-0.0.2-1 && [ \! -d simple-obfs-0.0.2-1 ] && git clone https://github.com/shadowsocks/simple-obfs.git simple-obfs-0.0.2-1 --recursive && (cd simple-obfs-0.0.2-1 && git checkout 149b57d24d90fff3f7983b42967f6354acb5eeca && git submodule update) && echo "Packing checkout..." && rm -rf simple-obfs-0.0.2-1/.git && 	tar czf /home/fiepi/Workspace/git/openwrt/chaos_calmer/tmp/dl/simple-obfs-0.0.2-149b57d24d90fff3f7983b42967f6354acb5eeca.tar.gz simple-obfs-0.0.2-1 && mv /home/fiepi/Workspace/git/openwrt/chaos_calmer/tmp/dl/simple-obfs-0.0.2-149b57d24d90fff3f7983b42967f6354acb5eeca.tar.gz /home/fiepi/Workspace/git/openwrt/chaos_calmer/dl/ && rm -rf simple-obfs-0.0.2-1; 
Checking out files from the git repository...
Cloning into 'simple-obfs-0.0.2-1'...
remote: Counting objects: 845, done.
remote: Compressing objects: 100% (35/35), done.
remote: Total 845 (delta 17), reused 0 (delta 0), pack-reused 810
Receiving objects: 100% (845/845), 1.39 MiB | 661.00 KiB/s, done.
Resolving deltas: 100% (224/224), done.
Submodule 'libcork' (https://github.com/shadowsocks/libcork.git) registered for path 'libcork'
Cloning into '/home/fiepi/Workspace/git/openwrt/chaos_calmer/tmp/dl/simple-obfs-0.0.2-1/libcork'...
remote: Counting objects: 3735, done.        
remote: Compressing objects: 100% (7/7), done.        
remote: Total 3735 (delta 0), reused 0 (delta 0), pack-reused 3728        
Receiving objects: 100% (3735/3735), 1.43 MiB | 487.00 KiB/s, done.
Resolving deltas: 100% (1959/1959), done.
Submodule path 'libcork': checked out '3bcb8324431d3bd4be5e4ff2a4323b455c8d5409'
error: The following untracked working tree files would be overwritten by checkout:
	libcork/COPYING
	libcork/Makefile.am
	libcork/README.markdown
	libcork/include/libcork/cli.h
	libcork/include/libcork/cli/commands.h
	libcork/include/libcork/config.h
	libcork/include/libcork/config/arch.h
	libcork/include/libcork/config/bsd.h
	libcork/include/libcork/config/config.h
	libcork/include/libcork/config/gcc.h
	libcork/include/libcork/config/linux.h
	libcork/include/libcork/config/macosx.h
	libcork/include/libcork/config/mingw32.h
	libcork/include/libcork/config/solaris.h
	libcork/include/libcork/config/version.h
	libcork/include/libcork/core.h
	libcork/include/libcork/core/allocator.h
	libcork/include/libcork/core/api.h
	libcork/include/libcork/core/attributes.h
	libcork/include/libcork/core/byte-order.h
	libcork/include/libcork/core/callbacks.h
	libcork/include/libcork/core/error.h
	libcork/include/libcork/core/gc.h
	libcork/include/libcork/core/hash.h
	libcork/include/libcork/core/id.h
	libcork/include/libcork/core/mempool.h
	libcork/include/libcork/core/net-addresses.h
	libcork/include/libcork/core/timestamp.h
	libcork/include/libcork/core/types.h
	libcork/include/libcork/core/u128.h
	libcork/include/libcork/ds.h
	libcork/include/libcork/ds/array.h
	libcork/include/libcork/ds/bitset.h
	libcork/include/libcork/ds/buffer.h
	libcork/include/libcork/ds/dllist.h
	libcork/include/libcork/ds/hash-table.h
	libcork/include/libcork/ds/managed-buffer.h
	libcork/include/libcork/ds/ring-buffer.h
	libcork/include/libcork/ds/slice.h
	libcork/include/libcork/ds/stream.h
	libcork/include/libcork/helpers/errors.h
	libcork/include/libcork/helpers/gc.h
	libcork/include/libcork/helpers/posix.h
	libcork/include/libcork/os.h
	libcork/include/libcork/os/files.h
	libcork/include/libcork/os/process.h
	libcork/include/libcork/os/subprocess.h
	libcork/include/libcork/threads.h
	libcork/include/libcork/threads/atomics.h
	libcork/include/libcork/threads/basics.h
Please move or remove them before you switch branches.
Aborting
make[2]: *** [Makefile:63: /home/fiepi/Workspace/git/openwrt/chaos_calmer/dl/simple-obfs-0.0.2-149b57d24d90fff3f7983b42967f6354acb5eeca.tar.gz] Error 1
make[2]: Leaving directory '/home/fiepi/Workspace/git/openwrt/chaos_calmer/package/simple-obfs'
make[1]: *** [package/Makefile:192: package/simple-obfs/compile] Error 2
make[1]: Leaving directory '/home/fiepi/Workspace/git/openwrt/chaos_calmer'
make: *** [/home/fiepi/Workspace/git/openwrt/chaos_calmer/include/toplevel.mk:183: package/simple-obfs/compile] Error 2

@fiepi 把commit号改为上游的
但是libudns怎么解决?

给Makefile打patch

@xingezhang 愿闻其详

fix via 3408f2d