问, Debian 11 能用上 gcc-4.8.5 吗?

2023-01-19 15:06:16 +08:00
 qazwsxkevin

生手提问,
因为要兼容旧的 opwerwrt 设备的 ov ,要编译一个比较老版本的 openvp* openvp*-2.3.2.tar ,去做 Server 端
2.3.2 不知道那年的版本了,gcc 10 编译失败, gcc 5.6 试过了,不行,再往前走,上 4.8.5 ,
整了这个,有些迷糊了,这路还能走下去吗?

root@TDebian:/root/gcc-4.8.5$ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... no
checking for mawk... mawk
checking for libatomic support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/root/gcc-4.8.5':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
root@TDebian:/root/gcc-4.8.5$ 

是不是还得先上再前于 4.8.5 的版本?
还是我已经走歪路了?

3083 次点击
所在节点    程序员
26 条回复
BrettD
2023-01-19 23:45:06 +08:00
代码有错误的话,跟着编译错误信息去改代码就行了
GeruzoniAnsasu
2023-01-20 00:43:56 +08:00
> 我需要一个 Debian 11 的新系统,要去跑一个非常古老版本(2.3.2)的 openvp* server

DOCKER is exactly what you need.

那都不用折腾编译了,直接制作一个含有 vpn server 的旧版系统的 docker image 就好了
littlewing
2023-01-20 19:02:08 +08:00
这种需要用老版本特定版本的问题一律用 Docker 解决
vivisidea
2023-01-21 12:44:12 +08:00
看看 docker 吧,现在资料都很全了,google 搜下就有了,有点概念需要学习下而已,docker 操作本身并不难,而且可能已经有人把你需要的镜像制作好了

学会了 docker 不光是这次编译问题,以后的类似的编译问题都能参考解决,不亏的
ysc3839
2023-01-21 19:15:12 +08:00
你需要用 OpenWrt 的 SDK 来编译,手动编译会非常麻烦
ysc3839
2023-01-21 19:16:24 +08:00
@ysc3839 看上去是我理解错了,你不需要动 OpenWrt ,那直接用 Docker 就行了

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/909888

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX