Code Monkey home page Code Monkey logo

Comments (15)

zxlhhyccc avatar zxlhhyccc commented on July 24, 2024

love

请提供报错信息!我们在官方master分支下和immortalwrt编译正常。。。。

from helloworld.

sunaihui avatar sunaihui commented on July 24, 2024

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.

zxlhhyccc avatar zxlhhyccc commented on July 24, 2024

看起来是编译环境的gcc版本问题,请再贴一下编译环境的gcc版本。。。因为编译环境的gcc版本必须是最低9.x版本

from helloworld.

281677160 avatar 281677160 commented on July 24, 2024

看起来是编译环境的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.

zxlhhyccc avatar zxlhhyccc commented on July 24, 2024

看起来是编译环境的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.

love-dy avatar love-dy commented on July 24, 2024

image
升级GCC 13 还是云编译还是报错

from helloworld.

love-dy avatar love-dy commented on July 24, 2024

clang++: not found

sudo apt-get install clang

from helloworld.

binge8 avatar binge8 commented on July 24, 2024

看起来是编译环境的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.

dfbucy090 avatar dfbucy090 commented on July 24, 2024

我也是卡在gn这里,希望哪位大侠出个详细解决方案,小白们叩谢。

from helloworld.

love-dy avatar love-dy commented on July 24, 2024

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

image
增加了以上几个命令还是不行,不知怎么搞了

from helloworld.

zxlhhyccc avatar zxlhhyccc commented on July 24, 2024

增加了以上几个命令还是不行,不知怎么搞了

我使用的gcc是9.4.0版本,你降级到这个版本绝对没有问题:
image
或者如果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.

281677160 avatar 281677160 commented on July 24, 2024

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

image 增加了以上几个命令还是不行,不知怎么搞了

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

image 增加了以上几个命令还是不行,不知怎么搞了
QQ截图20240220003605
我的没问题,如果不执行更换gcc13的话,就编译不过去的,更换后就每次都成功

from helloworld.

smdx avatar smdx commented on July 24, 2024

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
image 增加了以上几个命令还是不行,不知怎么搞了

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
image 增加了以上几个命令还是不行,不知怎么搞了
QQ截图20240220003605
我的没问题,如果不执行更换gcc13的话,就编译不过去的,更换后就每次都成功

大佬,在github云编译怎么更换gcc13啊?谢谢

from helloworld.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.