Comments (15)
love
请提供报错信息!我们在官方master分支下和immortalwrt编译正常。。。。
from helloworld.
love
请提供报错信息!我们在官方master分支下和immortalwrt编译正常。。。。
MAKEFLAGS="" /home/sss/lede/staging_dir/host/bin/ninja -j1 -C /home/sss/lede/build_dir/hostpkg/gn-2024-01-24-a2e2717e/out
ninja: Entering directory `/home/sss/lede/build_dir/hostpkg/gn-2024-01-24-a2e2717e/out'
[1/287] CXX src/base/command_line.o
FAILED: src/base/command_line.o
clang++ -MMD -MF src/base/command_line.o.d -I../src -I. -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -std=c++20 -Wrange-loop-analysis -Wextra-semi-stmt -c ../src/base/command_line.cc -o src/base/command_line.o
error: unknown warning option '-Wextra-semi-stmt'; did you mean '-Wextra-semi'? [-Werror,-Wunknown-warning-option]
error: invalid value 'c++20' in '-std=c++20'
note: use 'c++98' or 'c++03' for 'ISO C++ 1998 with amendments' standard
note: use 'gnu++98' or 'gnu++03' for 'ISO C++ 1998 with amendments and GNU extensions' standard
note: use 'c++11' for 'ISO C++ 2011 with amendments' standard
note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard
note: use 'c++14' for 'ISO C++ 2014 with amendments' standard
note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard
note: use 'c++17' for 'ISO C++ 2017 with amendments' standard
note: use 'gnu++17' for 'ISO C++ 2017 with amendments and GNU extensions' standard
note: use 'c++2a' for 'Working draft for ISO C++ 2020' standard
note: use 'gnu++2a' for 'Working draft for ISO C++ 2020 with GNU extensions' standard
ninja: build stopped: subcommand failed.
make[3]: *** [Makefile:58: /home/sss/lede/build_dir/hostpkg/gn-2024-01-24-a2e2717e/.built] Error 1
make[3]: Leaving directory '/home/sss/lede/feeds/helloworld/gn'
time: package/feeds/helloworld/gn/host-compile#0.13#0.11#0.40
ERROR: package/feeds/helloworld/gn [host] failed to build.
make[2]: *** [package/Makefile:114: package/feeds/helloworld/gn/host/compile] Error 1
make[2]: Leaving directory '/home/sss/lede'
make[1]: *** [package/Makefile:110: /home/sss/lede/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/sss/lede'
make: *** [/home/sss/lede/include/toplevel.mk:231: world] Error 2
from helloworld.
看起来是编译环境的gcc版本问题,请再贴一下编译环境的gcc版本。。。因为编译环境的gcc版本必须是最低9.x版本
from helloworld.
看起来是编译环境的gcc版本问题,请再贴一下编译环境的gcc版本。。。因为编译环境的gcc版本必须是最低9.x版本
9.x版本的我这里编译不了,百度一下修改gcc版本搞定,云编译,本地编译都可用
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
sudo apt-get install -y gcc-13
sudo apt-get install -y g++-13
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 60 --slave /usr/bin/g++ g++ /usr/bin/g++-13
from helloworld.
看起来是编译环境的gcc版本问题,请再贴一下编译环境的gcc版本。。。因为编译环境的gcc版本必须是最低9.x版本
9.x版本的我这里编译不了,百度一下修改gcc版本搞定,云编译,本地编译都可用
sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa sudo apt-get install -y gcc-13 sudo apt-get install -y g++-13 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 60 --slave /usr/bin/g++ g++ /usr/bin/g++-13
所以必须确保编译环境的gcc版本是9.x及以上。。。。
from helloworld.
from helloworld.
clang++: not found
sudo apt-get install clang
from helloworld.
看起来是编译环境的gcc版本问题,请再贴一下编译环境的gcc版本。。。因为编译环境的gcc版本必须是最低9.x版本
9.x版本的我这里编译不了,百度一下修改gcc版本搞定,云编译,本地编译都可用
sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa sudo apt-get install -y gcc-13 sudo apt-get install -y g++-13 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 60 --slave /usr/bin/g++ g++ /usr/bin/g++-13
Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [142 B]
Hit:2 http://azure.archive.ubuntu.com/ubuntu jammy InRelease
Hit:6 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease
Hit:3 http://azure.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://azure.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:5 http://azure.archive.ubuntu.com/ubuntu jammy-security InRelease
Hit:7 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease
Reading package lists...
PPA publishes dbgsym, you may need to include 'main/debug' component
Repository: 'deb https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu/ jammy main'
Description:
Toolchain test builds; see https://wiki.ubuntu.com/ToolChain
More info: https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
Adding repository.
Found existing deb entry in /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
Adding deb entry to /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
Found existing deb-src entry in /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
Adding key to /etc/apt/trusted.gpg.d/ubuntu-toolchain-r-ubuntu-test.gpg with fingerprint 60C317803A41BA51845E371A1E9377A2BA9EF27F
Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [142 B]
Hit:2 http://azure.archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://azure.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://azure.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:5 http://azure.archive.ubuntu.com/ubuntu jammy-security InRelease
Hit:6 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease
Get:7 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/ppa/ubuntu jammy InRelease [23.8 kB]
Hit:8 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease
Get:9 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/ppa/ubuntu jammy/main amd64 Packages [267 kB]
Get:10 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/ppa/ubuntu jammy/main Translation-en [27.5 kB]
Fetched 319 kB in 1s (331 kB/s)
Reading package lists...
PPA publishes dbgsym, you may need to include 'main/debug' component
Repository: 'deb https://ppa.launchpadcontent.net/ubuntu-toolchain-r/ppa/ubuntu/ jammy main'
Description:
Toolchain builds for all architectures; see https://wiki.ubuntu.com/ToolChain
More info: https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/ppa
Adding repository.
Adding deb entry to /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-ppa-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-ppa-jammy.list
Adding key to /etc/apt/trusted.gpg.d/ubuntu-toolchain-r-ubuntu-ppa.gpg with fingerprint 60C317803A41BA51845E371A1E9377A2BA9EF27F
Reading package lists...
Building dependency tree...
Reading state information...
gcc-13 is already the newest version (13.1.0-8ubuntu1~22.04).
gcc-13 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
g++-13 is already the newest version (13.1.0-8ubuntu1~22.04).
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
update-alternatives: using /usr/bin/gcc-13 to provide /usr/bin/gcc (gcc) in auto mode
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
这个是没有安装成功吗
from helloworld.
我也是卡在gn这里,希望哪位大侠出个详细解决方案,小白们叩谢。
from helloworld.
sudo apt-get install clang
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
sudo apt-get install -y gcc-13
sudo apt-get install -y g++-13
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 60 --slave /usr/bin/g++ g++ /usr/bin/g++-13
from helloworld.
增加了以上几个命令还是不行,不知怎么搞了
我使用的gcc是9.4.0版本,你降级到这个版本绝对没有问题:
或者如果gcc版本是13.0,添加这个补丁:
gn/patches/010-gcc.patch
--- a/build/gen.py
+++ b/build/gen.py
@@ -368,7 +368,7 @@ def WriteGNNinja(path, platform, host, o
cxx = os.environ.get('CXX', 'g++')
ld = os.environ.get('LD', 'g++')
ar = os.environ.get('AR', 'ar -X64')
- elif platform.is_msys() or platform.is_mingw():
+ elif platform.is_msys() or platform.is_mingw() or platform.is_linux():
cxx = os.environ.get('CXX', 'g++')
ld = os.environ.get('LD', 'g++')
ar = os.environ.get('AR', 'ar')
from helloworld.
sudo apt-get install clang sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa sudo apt-get install -y gcc-13 sudo apt-get install -y g++-13 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 60 --slave /usr/bin/g++ g++ /usr/bin/g++-13
sudo apt-get install clang sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa sudo apt-get install -y gcc-13 sudo apt-get install -y g++-13 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 60 --slave /usr/bin/g++ g++ /usr/bin/g++-13
from helloworld.
sudo apt-get install clang sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa sudo apt-get install -y gcc-13 sudo apt-get install -y g++-13 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 60 --slave /usr/bin/g++ g++ /usr/bin/g++-13
增加了以上几个命令还是不行,不知怎么搞了sudo apt-get install clang sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa sudo apt-get install -y gcc-13 sudo apt-get install -y g++-13 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 60 --slave /usr/bin/g++ g++ /usr/bin/g++-13
增加了以上几个命令还是不行,不知怎么搞了
我的没问题,如果不执行更换gcc13的话,就编译不过去的,更换后就每次都成功
大佬,在github云编译怎么更换gcc13啊?谢谢
from helloworld.
Related Issues (20)
- 访问控制里面的几个域名列表是否可以考虑添加列表规则支持
- 编译后看不到helloworld HOT 2
- 有没有大佬发个编译好的包啊?我纯小白
- concurrency option is dispeared on naiveproxy after the update from v187 to v188
- 更新系统后不能保留自定义的黑白名单
- 能把ssr plus里面的kcptun插件设置成动态端口吗? HOT 1
- gn编译报错 HOT 13
- op v23.05.0 ssr 启动后 dnsmasq 53端口被关了 好像开了个5333, nslookup 报错
- GN编译错误
- libopenssl-legacy 依赖问题 HOT 8
- shadowsocks-rust编译失败 HOT 2
- naiveproxy 无法下载源码 HOT 1
- shadow-tls编译失败 HOT 5
- 编译报错,求救!!! HOT 2
- 启动ssrp时报错 HOT 6
- high cpu usage HOT 2
- 编译后安装问题 HOT 2
- ssrp在官方master分支的服务器显示问题,请问如何解决!?
- 添加wireguard协议保存 luci报错 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from helloworld.