maskedeken/trojan-gfw

請求順便也編譯下armv8(aarch64)版的trojan二進制文件

Closed this issue · 7 comments

ss916 commented

我嘗試過編譯trojan,但在一些設備無法運行,對於c語言編譯不是很了解。官方項目沒有預編譯armv8版二進制文件,所以請求作者幫助一下。非常感謝你編譯的mipsel版,在路由器上很好用。

arm的版本直接在arm的设备上按官方方法编译就可以了

ss916 commented

我是按照官方提供的方法編譯arm版trojan二進制文件,
apt install wget git clang cmake openssl
wget https://mirrors.ustc.edu.cn/termux/dists/stable/main/binary-aarch64/boost_1.69.0-2_aarch64.deb
wget https://mirrors.ustc.edu.cn/termux/dists/stable/main/binary-aarch64/boost-dev_1.69.0-2_aarch64.deb
chmod 777 boost_1.69.0-2_aarch64.deb
chmod 777 boost-dev_1.69.0-2_aarch64.deb
dpkg -i ./boost_1.69.0-2_aarch64.deb
dpkg -i ./boost-dev_1.69.0-2_aarch64.deb
git clone https://github.com/trojan-gfw/trojan
cd trojan/
cmake -DCMAKE_INSTALL_PREFIX=/data/data/com.termux/files/usr -DENABLE_MYSQL=OFF .
make install

確實編譯出來了,在安卓上是能正常使用,但把trojan複製到刷了openwrt系統的N1(同樣也是arm64)上無法運行,提示not found。
Screenshot_20200225-230551

在openwrt上运行

ldd /tmp/trojan

看看缺了那些库

錯誤日誌 ldd /tmp/trojan :
https://raw.githubusercontent.com/ss916/hosts/master/t/openwrt.txt

建议你用L大的openwrt里面的trojan包来编译就可以了

ss916 commented

非常感謝!!
測試可以正常運行!!