Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go版本到1.22后,编译碰到的问题和解决经过,希望能给和我一样的小白一点参考。 #148

Open
Ucopyrightable opened this issue Mar 8, 2024 · 27 comments

Comments

@Ucopyrightable
Copy link

go版本更新以后,用的lean大的源码,碰到过mosdns编译错误,v2ray-plugin编译不过去,等等各种奇怪问题。解决按以下方式解决了。
1、用kenzok8大佬提供的go版本替代原来的go。
2、加入的软件源放在最前面。
3、听kenzok8大佬的,把两个mosdns删掉一个。

@Ucopyrightable
Copy link
Author

把软件源放在feeds.config.default里面第一行,然后再删掉重复的mosdns和用不到的一些插件,编译正常了。
rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb}
rm -rf feeds/luci/applications/luci-app-mosdns
rm -rf feeds/luci/applications/luci-app-smartdns
rm -rf feeds/packages/net/{alist,adguardhome,mosdns,smartdns}
rm -rf feeds/smpackage/luci-app-adguardhome
rm -rf feeds/smpackage/luci-app-bypass
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang

@keke1975
Copy link

keke1975 commented Mar 8, 2024

谢谢,我马上试试,结果回来报!
回来了!!! 用你的smpackage,没有编译成功。后来换成了kenzo和small后,成功了!!!!

@woni928
Copy link

woni928 commented Mar 9, 2024

谢谢,我马上试试,结果回来报! 回来了!!! 用你的smpackage,没有编译成功。后来换成了kenzo和small后,成功了!!!!

如何成功的?可以具体说一下吗,谢谢。

@Ucopyrightable
Copy link
Author

谢谢,我马上试试,结果回来报! 回来了!!! 用你的smpackage,没有编译成功。后来换成了kenzo和small后,成功了!!!!

smpackage里面插件更多也更新😎

@keke1975
Copy link

自己用,用不了这么多的插件,基本几个有就行了。对于用kenzo和small,我是这么设置的。
make distclean
./scripts/feeds clean
git pull
./scripts/feeds update -a
rm -rf feeds/kenzo/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb}
rm -rf feeds/luci/applications/luci-app-mosdns
rm -rf feeds/luci/applications/luci-app-smartdns
rm -rf feeds/packages/net/{alist,adguardhome,mosdns,smartdns}
rm -rf feeds/kenzo/luci-app-adguardhome
rm -rf feeds/packages/lang/golang
git clone https://github.com/sbwml/packages_lang_golang -b 22.x feeds/packages/lang/golang
./scripts/feeds install -a
make menuconfig

@kenzok8
Copy link
Owner

kenzok8 commented Mar 11, 2024

我来说明下吧 分三步

1、设置拉取源(二选一)

sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default
sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default

或者

sed -i '1i src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default

2、常规feends更新(不要运行install -a)

./scripts/feeds update -a

如果是拉取small-package的,可以试着删除下面插件

rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb}

Lean源码里可能冲突的插件,删除

rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,mosdns,smartdns}

拉取最新版golang编译

rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang

3、再安装feeds

./scripts/feeds install -a && make menuconfig

一键命令如下:(双仓库)

sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default
sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default
./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,mosdns,smartdns}
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
./scripts/feeds install -a 
make menuconfig

一键命令如下:(单仓库)

sed -i '1i src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default
./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,mosdns,smartdns}
rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb}
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
./scripts/feeds install -a 
make menuconfig

@woni928
Copy link

woni928 commented Mar 13, 2024

我来说明下吧 分三步

1、设置拉取源(二选一)

sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default
sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default

或者

sed -i '1i src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default

2、常规feends更新(不要运行install -a)

./scripts/feeds update -a

如果是拉取small-package的,可以试着删除下面插件

rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb}

Lean源码里可能冲突的插件,删除

rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns}

拉取最新版golang编译

rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang

3、再安装feeds

./scripts/feeds install -a && make menuconfig

一键命令如下:(双仓库)

sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default
sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default
./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns}
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
./scripts/feeds install -a 
make menuconfig

一键命令如下:(单仓库)

sed -i '1i src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default
./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns}
rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb}
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
./scripts/feeds install -a 
make menuconfig

已经添加
sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default
sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default
./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns}
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
./scripts/feeds install -a
make menuconfig

又出现新的问题
v2dat

@NeedforGit
Copy link

我来说明下吧 分三步

1、设置拉取源(二选一)

sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default
sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default

或者

sed -i '1i src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default

2、常规feends更新(不要运行install -a)

./scripts/feeds update -a

如果是拉取small-package的,可以试着删除下面插件

rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb}

Lean源码里可能冲突的插件,删除

rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns}

拉取最新版golang编译

rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang

3、再安装feeds

./scripts/feeds install -a && make menuconfig

一键命令如下:(双仓库)

sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default
sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default
./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns}
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
./scripts/feeds install -a 
make menuconfig

一键命令如下:(单仓库)

sed -i '1i src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default
./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns}
rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb}
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
./scripts/feeds install -a 
make menuconfig

已经添加 sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default ./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns} rm -rf feeds/packages/lang/golang git clone https://github.com/kenzok8/golang feeds/packages/lang/golang ./scripts/feeds install -a make menuconfig

又出现新的问题 v2dat

我是X86云编译,错误和你差不多一样。

@woni928
Copy link

woni928 commented Mar 13, 2024

我来说明下吧 分三步

1、设置拉取源(二选一)

sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default
sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default

或者

sed -i '1i src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default

2、常规feends更新(不要运行install -a)

./scripts/feeds update -a

如果是拉取small-package的,可以试着删除下面插件

rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb}

Lean源码里可能冲突的插件,删除

rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns}

拉取最新版golang编译

rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang

3、再安装feeds

./scripts/feeds install -a && make menuconfig

一键命令如下:(双仓库)

sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default
sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default
./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns}
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
./scripts/feeds install -a 
make menuconfig

一键命令如下:(单仓库)

sed -i '1i src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default
./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns}
rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb}
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
./scripts/feeds install -a 
make menuconfig

已经添加 sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default ./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns} rm -rf feeds/packages/lang/golang git clone https://github.com/kenzok8/golang feeds/packages/lang/golang ./scripts/feeds install -a make menuconfig
又出现新的问题 v2dat

我是X86云编译,错误和你差不多一样。

兄弟有眉目了吗 这么解决啊?

@NeedforGit
Copy link

我来说明下吧 分三步

1、设置拉取源(二选一)

sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default
sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default

或者

sed -i '1i src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default

2、常规feends更新(不要运行install -a)

./scripts/feeds update -a

如果是拉取small-package的,可以试着删除下面插件

rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb}

Lean源码里可能冲突的插件,删除

rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns}

拉取最新版golang编译

rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang

3、再安装feeds

./scripts/feeds install -a && make menuconfig

一键命令如下:(双仓库)

sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default
sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default
./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns}
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
./scripts/feeds install -a 
make menuconfig

一键命令如下:(单仓库)

sed -i '1i src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default
./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns}
rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb}
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
./scripts/feeds install -a 
make menuconfig

已经添加 sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default ./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns} rm -rf feeds/packages/lang/golang git clone https://github.com/kenzok8/golang feeds/packages/lang/golang ./scripts/feeds install -a make menuconfig
又出现新的问题 v2dat

我是X86云编译,错误和你差不多一样。

兄弟有眉目了吗 这么解决啊?

参考这个:#151 (comment)

P3TERX 云编译的话,在 diy-part2.sh 中添加:

sed -i 's#GO_PKG_TARGET_VARS.*# #g' feeds/packages/utils/v2dat/Makefile

@dongfangy2011
Copy link

dongfangy2011 commented Mar 18, 2024

我来说明下吧分三步

1、设置拉取源(二选一)

sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default
sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default

或者

sed -i '1i src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default

2、常规feends update(不要运行install -a)

./scripts/feeds update -a

如果是拉取small-package的,可以尝试删除下面插件

rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb}

Lean里可能冲突的插件,源码删除

rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,mosdns,smartdns}

拉取最新版本golang编译

rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang

3、重新安装feeds

./scripts/feeds install -a && make menuconfig

一键命令如下:(双仓库)

sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default
sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default
./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns}
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
./scripts/feeds install -a 
make menuconfig

一键命令如下:(单仓库)

sed -i '1i src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default
./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns && rm -rf feeds/packages/net/{alist,adguardhome,smartdns}
rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb}
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
./scripts/feeds install -a 
make menuconfig

这次用你说的双库就成功了,非常感谢

@dongfangy2011
Copy link

我的步驟是:1、拉取了lede的源码
2、修改feeds.conf.default ,把src-git kenzo https://github.com/kenzok8/openwrt-packages、src-git small https://github.com/kenzok8/small分别分别放在、第一、二行
3、运行cd lede
./scripts/feeds update -a
./scripts/feeds install -a
4、再运行
rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb}
rm -rf feeds/luci/applications/luci-app-mosdns
rm -rf feeds/luci/applications/luci-app-smartdns
rm -rf feeds/packages/net/{alist,adguardhome,mosdns,smartdns}
rm -rf feeds/smpackage/luci-app-adguardhome
rm -rf feeds/smpackage/luci-app-bypass
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
5、再就运行 make menuconfig make download -j8 make V=s -j1
ok............................................................................................................................谢谢大佬的提示。

@keke1975
Copy link

我的步驟是:1、拉取了lede的源码 2、修改feeds.conf.default ,把src-git kenzo https://github.com/kenzok8/openwrt-packages、src-git small https://github.com/kenzok8/small分别分别放在、第一、二行 3、运行cd lede ./scripts/feeds update -a ./scripts/feeds install -a 4、再运行 rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb} rm -rf feeds/luci/applications/luci-app-mosdns rm -rf feeds/luci/applications/luci-app-smartdns rm -rf feeds/packages/net/{alist,adguardhome,mosdns,smartdns} rm -rf feeds/smpackage/luci-app-adguardhome rm -rf feeds/smpackage/luci-app-bypass rm -rf feeds/packages/lang/golang git clone https://github.com/kenzok8/golang feeds/packages/lang/golang 5、再就运行 make menuconfig make download -j8 make V=s -j1 ok............................................................................................................................谢谢大佬的提示。
请问一下,你上边拉的库是那个双库,目录是kenzo和small,可你下边删除的却是都没有拉取的单库的smpackage,这smpackage都没拉取下来,你拿什么删??这怎么看怎么不对呀!!

@Ucopyrightable
Copy link
Author

我的步驟是:1、拉取了lede的源码 2、修改feeds.conf.default ,把src-git kenzo https://github.com/kenzok8/openwrt-packages、src-git small https://github.com/kenzok8/small分别分别放在、第一、二行 3、运行cd lede ./scripts/feeds update -a ./scripts/feeds install -a 4、再运行 rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb} rm -rf feeds/luci/applications/luci-app-mosdns rm -rf feeds/luci/applications/luci-app-smartdns rm -rf feeds/packages/net/{alist,adguardhome,mosdns,smartdns} rm -rf feeds/smpackage/luci-app-adguardhome rm -rf feeds/smpackage/luci-app-bypass rm -rf feeds/packages/lang/golang git clone https://github.com/kenzok8/golang feeds/packages/lang/golang 5、再就运行 make menuconfig make download -j8 make V=s -j1 ok............................................................................................................................谢谢大佬的提示。
请问一下,你上边拉的库是那个双库,目录是kenzo和small,可你下边删除的却是都没有拉取的单库的smpackage,这smpackage都没拉取下来,你拿什么删??这怎么看怎么不对呀!!

确实写混了……kenzo大佬在一篇回复写得非常清晰明了,可以翻一下

@keke1975
Copy link

用以上的方式好了十多天,现在又出问题了!!
错误图,请大大看一下,谢谢!!
make[3]: *** [Makefile:67: /home/keke/lede/dl/chinadns-ng@x86_64-linux-musl@x86_64@fast+lto] Error 2
make[3]: Leaving directory '/home/keke/lede/feeds/small/chinadns-ng'
time: package/feeds/small/chinadns-ng/compile#0.10#0.03#0.12
ERROR: package/feeds/small/chinadns-ng failed to build.
make[2]: *** [package/Makefile:116: package/feeds/small/chinadns-ng/compile] Error 1
make[2]: Leaving directory '/home/keke/lede'
make[1]: *** [package/Makefile:110: /home/keke/lede/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/keke/lede'
make: *** [/home/keke/lede/include/toplevel.mk:231:world] 错误 2

@kenzok8
Copy link
Owner

kenzok8 commented Mar 27, 2024

chinadns-ng编译错误,有拉取新源码吗?chinadns-ng已经升级到2024.03.25
git pull 一下
如果不清楚就

./scripts/feeds clean
./scripts/feeds update -a
./scripts/feeds install -a

@jerichon
Copy link

jerichon commented Mar 27, 2024 via email

@dongfangy2011
Copy link

chinadns-ng编译错误,有拉取新源码吗?chinadns-ng已经升级到2024.03.25 git pull 一下 如果不清楚就

./scripts/feeds clean
./scripts/feeds update -a
./scripts/feeds install -a

我按照你的方法成功编译,但是不能选择modns

@la8896
Copy link

la8896 commented Apr 18, 2024

现在又错误
用这

sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default
sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default
./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns
rm -rf feeds/packages/net/{alist,adguardhome,mosdns,xray*,v2ray*,v2ray*,sing*,smartdns}
rm -rf feeds/packages/utils/v2dat
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
./scripts/feeds install -a
make menuconfig

make download -j8 后
螢幕擷取畫面 2024-04-18 173206

make V=s -j1 后
make[3]: *** [Makefile:65: /home/la/lede/dl/smartdns-45.tar.gz] Error 2
make[3]: Leaving directory '/home/la/lede/feeds/kenzo/smartdns'
time: package/feeds/kenzo/smartdns/compile#0.63#0.38#35.88
ERROR: package/feeds/kenzo/smartdns failed to build.
make[2]: *** [package/Makefile:116: package/feeds/kenzo/smartdns/compile] Error 1
make[2]: Leaving directory '/home/la/lede'
make[1]: *** [package/Makefile:110: /home/la/lede/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/la/lede'
make: *** [/home/la/lede/include/toplevel.mk:231: world] Error 2

@la8896
Copy link

la8896 commented Apr 21, 2024

各位大佬,我试過了各位大佬方法也有同樣是smartdns错误,請問怎么解决?

@keke1975
Copy link

把smartdns编译进固件里就好了。

@la8896
Copy link

la8896 commented Apr 21, 2024

把smartdns编译进固件里就好了。
先谢谢您
但用正常编译方法也是一樣!
menuconfig裡也有選smartdns编译
但是一樣smartdns错误

git clone https://github.com/coolsnowwolf/lede
cd lede
sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default
sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default
git pull
./scripts/feeds update -a
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
./scripts/feeds install -a
make menuconfig
make download -j8

螢幕擷取畫面 2024-04-21 180229

@keke1975
Copy link

以下是我正常能运行的
make distclean
./scripts/feeds clean
git pull
./scripts/feeds update -a
rm -rf feeds/kenzo/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb}
rm -rf feeds/luci/applications/luci-app-mosdns
rm -rf feeds/luci/applications/luci-app-smartdns
rm -rf feeds/packages/net/{alist,adguardhome,mosdns,smartdns}
rm -rf feeds/kenzo/luci-app-adguardhome
rm -rf feeds/packages/lang/golang
git clone https://github.com/kenzok8/golang feeds/packages/lang/golang
./scripts/feeds install -a
make menuconfig

@la8896
Copy link

la8896 commented Apr 22, 2024

以下是我正常能运行的 make distclean ./scripts/feeds clean git pull ./scripts/feeds update -a rm -rf feeds/kenzo/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb} rm -rf feeds/luci/applications/luci-app-mosdns rm -rf feeds/luci/applications/luci-app-smartdns rm -rf feeds/packages/net/{alist,adguardhome,mosdns,smartdns} rm -rf feeds/kenzo/luci-app-adguardhome rm -rf feeds/packages/lang/golang git clone https://github.com/kenzok8/golang feeds/packages/lang/golang ./scripts/feeds install -a make menuconfig

终于找到原因了,原来是代理引起,引至下载档案不全,所以什样都不能完全下载正常包,谢谢了

@careysucci
Copy link

careysucci commented Aug 9, 2024

你好。 官方源码,用了新库编译会提示很多go库找不到
Building targets
package github.com/apernet/hysteria/app/v2
imports github.com/apernet/hysteria/app/v2/cmd
imports github.com/apernet/hysteria/app/v2/internal/tun
imports github.com/apernet/sing-tun
imports github.com/sagernet/sing/common/buf
imports github.com/sagernet/sing/common/atomic: build constraints exclude all Go files in /home/wy/git/openwrt/dl/go-mod-cache/github.com/sagernet/[email protected]/common/atomic
../../../../../dl/go-mod-cache/github.com/sagernet/[email protected]/common/buf/buffer.go:10:2: no required module provides package github.com/sagernet/sing/common/debug; to add it:
cd /home/wy/git/openwrt/build_dir/target-x86_64_musl/hysteria-app-v2.5.0/app
go get github.com/sagernet/sing/common/debug
../../../../../dl/go-mod-cache/github.com/apernet/[email protected]/monitor_linux.go:10:2: no required module provides package github.com/sagernet/sing/common/logger; to add it:
cd /home/wy/git/openwrt/build_dir/target-x86_64_musl/hysteria-app-v2.5.0/app
go get github.com/sagernet/sing/common/logger
../../../../../dl/go-mod-cache/google.golang.org/[email protected]/internal/filedesc/editions.go:11:2: no required module provides package google.golang.org/protobuf/internal/editiondefaults; to add it:
cd /home/wy/git/openwrt/build_dir/target-x86_64_musl/hysteria-app-v2.5.0/extras
go get google.golang.org/protobuf/internal/editiondefaults
../../../../../dl/go-mod-cache/github.com/klauspost/[email protected]/huff0/decompress_amd64.go:12:2: no required module provides package github.com/klauspost/compress/internal/cpuinfo; to add it:
cd /home/wy/git/openwrt/build_dir/target-x86_64_musl/hysteria-app-v2.5.0/extras
go get github.com/klauspost/compress/internal/cpuinfo
../../../../../dl/go-mod-cache/github.com/refraction-networking/[email protected]/cipher_suites.go:22:2: no required module provides package github.com/refraction-networking/utls/internal/boring; to add it:
cd /home/wy/git/openwrt/build_dir/target-x86_64_musl/hysteria-app-v2.5.0/extras
go get github.com/refraction-networking/utls/internal/boring
../../../../../dl/go-mod-cache/github.com/refraction-networking/[email protected]/u_common.go:16:2: no required module provides package github.com/refraction-networking/utls/internal/helper; to add it:
cd /home/wy/git/openwrt/build_dir/target-x86_64_musl/hysteria-app-v2.5.0/extras
go get github.com/refraction-networking/utls/internal/helper
../../../../../dl/go-mod-cache/github.com/spf13/[email protected]/iofs.go:14:2: no required module provides package github.com/spf13/afero/internal/common; to add it:
cd /home/wy/git/openwrt/build_dir/target-x86_64_musl/hysteria-app-v2.5.0/app
go get github.com/spf13/afero/internal/common

make[3]: *** [Makefile:62: /home/wy/git/openwrt/build_dir/target-x86_64_musl/hysteria-app-v2.5.0/.built] Error 1
make[3]: Leaving directory '/home/wy/git/openwrt/feeds/small/hysteria'
time: package/feeds/small/hysteria/compile#0.57#0.35#0.78
ERROR: package/feeds/small/hysteria failed to build.
make[2]: *** [package/Makefile:129: package/feeds/small/hysteria/compile] Error 1
make[2]: Leaving directory '/home/wy/git/openwrt'
make[1]: *** [package/Makefile:123: /home/wy/git/openwrt/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/wy/git/openwrt'
make: *** [/home/wy/git/openwrt/include/toplevel.mk:232: world] Error 2

@kenzok8
Copy link
Owner

kenzok8 commented Aug 10, 2024

golang 升级了 kenzok8/golang@66749c8

@careysucci
Copy link

careysucci commented Aug 12, 2024

你好, v2ray插件编译报错,麻烦帮看看
golang库已经更新到今天最新
编译指令:make package/feeds/small/v2ray-plugin/{clean,compile} -j1 V=s
以前编译从未出现过这个问题。
手动使用./build_dir/hostpkg/go-1.23.1/bin/go可以下载下方不存在报错的依赖库

Building targets
../../../../../dl/go-mod-cache/google.golang.org/[email protected]/reflect/protodesc/editions.go:12:2: no required module provides package google.golang.org/protobuf/internal/editiondefaults; to add it:
go get google.golang.org/protobuf/internal/editiondefaults
../../../../../dl/go-mod-cache/github.com/v2fly/v2ray-core/[email protected]/common/log/logger.go:10:2: no required module provides package github.com/v2fly/v2ray-core/v5/common/signal/done; to add it:
go get github.com/v2fly/v2ray-core/v5/common/signal/done
../../../../../dl/go-mod-cache/github.com/v2fly/v2ray-core/[email protected]/common/log/logger.go:11:2: no required module provides package github.com/v2fly/v2ray-core/v5/common/signal/semaphore; to add it:
go get github.com/v2fly/v2ray-core/v5/common/signal/semaphore
../../../../../dl/go-mod-cache/github.com/v2fly/v2ray-core/[email protected]/common/protofilter/filter.go:11:2: no required module provides package github.com/v2fly/v2ray-core/v5/common/environment/envctx; to add it:
go get github.com/v2fly/v2ray-core/v5/common/environment/envctx
../../../../../dl/go-mod-cache/github.com/v2fly/v2ray-core/[email protected]/common/protofilter/filter.go:12:2: no required module provides package github.com/v2fly/v2ray-core/v5/common/environment/filesystemcap; to add it:
go get github.com/v2fly/v2ray-core/v5/common/environment/filesystemcap
../../../../../dl/go-mod-cache/github.com/v2fly/v2ray-core/[email protected]/config.go:16:2: no required module provides package github.com/v2fly/v2ray-core/v5/common/cmdarg; to add it:
go get github.com/v2fly/v2ray-core/v5/common/cmdarg
../../../../../dl/go-mod-cache/github.com/v2fly/v2ray-core/[email protected]/common/environment/rootcap_impl.go:6:2: no required module provides package github.com/v2fly/v2ray-core/v5/common/platform/filesystem/fsifce; to add it:
go get github.com/v2fly/v2ray-core/v5/common/platform/filesystem/fsifce
../../../../../dl/go-mod-cache/github.com/v2fly/v2ray-core/[email protected]/common/environment/base.go:5:2: no required module provides package github.com/v2fly/v2ray-core/v5/features/extension/storage; to add it:
go get github.com/v2fly/v2ray-core/v5/features/extension/storage
../../../../../dl/go-mod-cache/github.com/v2fly/v2ray-core/[email protected]/common/protocol/headers.go:8:2: no required module provides package github.com/v2fly/v2ray-core/v5/common/bitmask; to add it:
go get github.com/v2fly/v2ray-core/v5/common/bitmask
../../../../../dl/go-mod-cache/github.com/v2fly/v2ray-core/[email protected]/transport/internet/config.go:11:2: no required module provides package github.com/v2fly/v2ray-core/v5/features; to add it:
go get github.com/v2fly/v2ray-core/v5/features
../../../../../dl/go-mod-cache/github.com/v2fly/v2ray-core/[email protected]/transport/internet/dialer.go:8:2: no required module provides package github.com/v2fly/v2ray-core/v5/transport/internet/tagged; to add it:
go get github.com/v2fly/v2ray-core/v5/transport/internet/tagged
../../../../../dl/go-mod-cache/github.com/v2fly/v2ray-core/[email protected]/transport/internet/udp/dispatcher_packetaddr.go:9:2: no required module provides package github.com/v2fly/v2ray-core/v5/common/protocol/udp; to add it:
go get github.com/v2fly/v2ray-core/v5/common/protocol/udp
../../../../../dl/go-mod-cache/github.com/v2fly/v2ray-core/[email protected]/transport/internet/tcp/dialer.go:11:2: no required module provides package github.com/v2fly/v2ray-core/v5/transport/internet/security; to add it:
go get github.com/v2fly/v2ray-core/v5/transport/internet/security
../../../../../dl/go-mod-cache/github.com/v2fly/v2ray-core/[email protected]/transport/internet/websocket/dialer.go:18:2: no required module provides package github.com/v2fly/v2ray-core/v5/features/extension; to add it:
go get github.com/v2fly/v2ray-core/v5/features/extension

make[2]: *** [Makefile:44: /home/wy/git/openwrt/build_dir/target-x86_64_musl/v2ray-plugin-5.15.1/.built] Error 1
make[2]: Leaving directory '/home/wy/git/openwrt/feeds/small/v2ray-plugin'
time: package/feeds/small/v2ray-plugin/compile#0.37#0.19#0.44
ERROR: package/feeds/small/v2ray-plugin failed to build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants