Code Monkey home page Code Monkey logo

Comments (13)

coolsnowwolf avatar coolsnowwolf commented on August 27, 2024

host gcc 版本是多少?

from helloworld.

liwenjie119 avatar liwenjie119 commented on August 27, 2024

host gcc 版本是多少?

编译的x86平台,应该是toolchain-x86_64_gcc-11.3.0_musl。奇怪的问题是,本地编译总是卡在这里,make dirclean了也还是卡,但是在线编译貌似是正常编译通过了,搞得我也不知道到底有没有问题

from helloworld.

xiexiaosheng avatar xiexiaosheng commented on August 27, 2024

你安装的是Ubuntu(Preview)吗?

from helloworld.

liwenjie119 avatar liwenjie119 commented on August 27, 2024

你安装的是Ubuntu(Preview)吗?
wsl2装的是
Ubuntu 23.10 (GNU/Linux 6.7.0-rc8-microsoft-standard-WSL2 x86_64)
难道是相关编译的依赖版本问题?

from helloworld.

gsblay avatar gsblay commented on August 27, 2024

Ubuntu 22.04本地编译PW, 报gn错误。

from helloworld.

bi4tms avatar bi4tms commented on August 27, 2024

物理机安装的Ubuntu20.04,toolchain为11.3.0,编译报错,日志如下:
touch /home/x86.6.6/lede/build_dir/hostpkg/gn-2024-01-24-a2e2717e/.preparedf54f9e38f05fc30b58b2dbb87be33533_6664517399ebbbc92a37c5bb081b5c53
python3 /home/x86.6.6/lede/build_dir/hostpkg/gn-2024-01-24-a2e2717e/build/gen.py --no-last-commit-position
touch /home/x86.6.6/lede/build_dir/hostpkg/gn-2024-01-24-a2e2717e/.configured
MAKEFLAGS="" /home/x86.6.6/lede/staging_dir/host/bin/ninja -j1 -C /home/x86.6.6/lede/build_dir/hostpkg/gn-2024-01-24-a2e2717e/out
ninja: Entering directory `/home/x86.6.6/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
/bin/sh: 1: clang++: not found
ninja: build stopped: subcommand failed.
make[3]: *** [Makefile:58: /home/x86.6.6/lede/build_dir/hostpkg/gn-2024-01-24-a2e2717e/.built] Error 1
make[3]: Leaving directory '/home/x86.6.6/lede/feeds/passwall_packages/gn'
time: package/feeds/passwall_packages/gn/host-compile#7.12#0.74#13.72
ERROR: package/feeds/passwall_packages/gn [host] failed to build.
make[2]: *** [package/Makefile:114: package/feeds/passwall_packages/gn/host/compile] Error 1
make[2]: Leaving directory '/home/x86.6.6/lede'
make[1]: *** [package/Makefile:110: /home/x86.6.6/lede/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/x86.6.6/lede'
make: *** [/home/x86.6.6/lede/include/toplevel.mk:231:world] 错误 2
make distclean后再次编译同样报错,gn更新前没有问题
@coolsnowwolf

from helloworld.

qqsir-dev avatar qqsir-dev commented on August 27, 2024

云编译报错:
make[3] -C feeds/packages/lang/rust host-compile
ERROR: package/luci-app-ssr-plus/gn [host] failed to build.
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
make: *** [/home/runner/work/AutoLede/AutoLede/openwrt/include/toplevel.mk:231: world] Error 1

from helloworld.

bi4tms avatar bi4tms commented on August 27, 2024

物理机安装的Ubuntu20.04,toolchain为11.3.0,编译报错,日志如下: touch /home/x86.6.6/lede/build_dir/hostpkg/gn-2024-01-24-a2e2717e/.preparedf54f9e38f05fc30b58b2dbb87be33533_6664517399ebbbc92a37c5bb081b5c53 python3 /home/x86.6.6/lede/build_dir/hostpkg/gn-2024-01-24-a2e2717e/build/gen.py --no-last-commit-position touch /home/x86.6.6/lede/build_dir/hostpkg/gn-2024-01-24-a2e2717e/.configured MAKEFLAGS="" /home/x86.6.6/lede/staging_dir/host/bin/ninja -j1 -C /home/x86.6.6/lede/build_dir/hostpkg/gn-2024-01-24-a2e2717e/out ninja: Entering directory `/home/x86.6.6/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 /bin/sh: 1: clang++: not found ninja: build stopped: subcommand failed. make[3]: *** [Makefile:58: /home/x86.6.6/lede/build_dir/hostpkg/gn-2024-01-24-a2e2717e/.built] Error 1 make[3]: Leaving directory '/home/x86.6.6/lede/feeds/passwall_packages/gn' time: package/feeds/passwall_packages/gn/host-compile#7.12#0.74#13.72 ERROR: package/feeds/passwall_packages/gn [host] failed to build. make[2]: *** [package/Makefile:114: package/feeds/passwall_packages/gn/host/compile] Error 1 make[2]: Leaving directory '/home/x86.6.6/lede' make[1]: *** [package/Makefile:110: /home/x86.6.6/lede/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2 make[1]: Leaving directory '/home/x86.6.6/lede' make: *** [/home/x86.6.6/lede/include/toplevel.mk:231:world] 错误 2 make distclean后再次编译同样报错,gn更新前没有问题 @coolsnowwolf

apt install clang后已编译通过

from helloworld.

liwenjie119 avatar liwenjie119 commented on August 27, 2024

一样,clang装上也不太行,还是报错

[1/5] CXX src/gn/resolved_target_deps_unittest.o
FAILED: src/gn/resolved_target_deps_unittest.o
g++ -MMD -MF src/gn/resolved_target_deps_unittest.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++17 -c ../src/gn/resolved_target_deps_unittest.cc -o src/gn/resolved_target_deps_unittest.o
In file included from ../src/gn/resolved_target_deps.h:8,
                 from ../src/gn/resolved_target_deps_unittest.cc:5:
../src/base/containers/span.h:393:12: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
  393 | span<const uint8_t, (X == dynamic_extent ? dynamic_extent : sizeof(T) * X)>
      |            ^~~~~~~
../src/base/containers/span.h:393:75: error: template argument 1 is invalid
  393 | span<const uint8_t, (X == dynamic_extent ? dynamic_extent : sizeof(T) * X)>
      |                                                                           ^
../src/base/containers/span.h: In function 'int base::as_bytes(span<T, Extent>)':
../src/base/containers/span.h:395:34: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
  395 |   return {reinterpret_cast<const uint8_t*>(s.data()), s.size_bytes()};
      |                                  ^~~~~~~
../src/base/containers/span.h:395:34: error: expected '>' before 'uint8_t'
../src/base/containers/span.h:395:34: error: expected '(' before 'uint8_t'
  395 |   return {reinterpret_cast<const uint8_t*>(s.data()), s.size_bytes()};
      |                                  ^~~~~~~
      |                                  (
../src/base/containers/span.h:395:34: error: 'uint8_t' was not declared in this scope
  395 |   return {reinterpret_cast<const uint8_t*>(s.data()), s.size_bytes()};
      |                                  ^~~~~~~
../src/base/containers/span.h:19:1: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
   18 | #include "base/stl_util.h"
  +++ |+#include <cstdint>
   19 |
../src/base/containers/span.h:395:42: error: expected primary-expression before '>' token
  395 |   return {reinterpret_cast<const uint8_t*>(s.data()), s.size_bytes()};
      |                                          ^
../src/base/containers/span.h:395:69: error: expected ')' before '}' token
  395 |   return {reinterpret_cast<const uint8_t*>(s.data()), s.size_bytes()};
      |                                                                     ^
      |                                                                     )
../src/base/containers/span.h: At global scope:
../src/base/containers/span.h:401:6: error: 'uint8_t' was not declared in this scope
  401 | span<uint8_t, (X == dynamic_extent ? dynamic_extent : sizeof(T) * X)>
      |      ^~~~~~~
../src/base/containers/span.h:401:6: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../src/base/containers/span.h:401:69: error: template argument 1 is invalid
  401 | span<uint8_t, (X == dynamic_extent ? dynamic_extent : sizeof(T) * X)>
      |                                                                     ^
../src/base/containers/span.h: In function 'int base::as_writable_bytes(span<T, Extent>)':
../src/base/containers/span.h:403:28: error: 'uint8_t' does not name a type
  403 |   return {reinterpret_cast<uint8_t*>(s.data()), s.size_bytes()};
      |                            ^~~~~~~
../src/base/containers/span.h:403:28: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../src/base/containers/span.h:403:35: error: expected '>' before '*' token
  403 |   return {reinterpret_cast<uint8_t*>(s.data()), s.size_bytes()};
      |                                   ^
../src/base/containers/span.h:403:35: error: expected '(' before '*' token
  403 |   return {reinterpret_cast<uint8_t*>(s.data()), s.size_bytes()};
      |                                   ^
      |                                   (
../src/base/containers/span.h:403:36: error: expected primary-expression before '>' token
  403 |   return {reinterpret_cast<uint8_t*>(s.data()), s.size_bytes()};
      |                                    ^
../src/base/containers/span.h:403:63: error: expected ')' before '}' token
  403 |   return {reinterpret_cast<uint8_t*>(s.data()), s.size_bytes()};
      |                                                               ^
      |                                                               )
../src/base/containers/span.h:403:63: error: cannot convert '<brace-enclosed initializer list>' to 'int' in return
[2/5] CXX src/gn/desc_builder.o
FAILED: src/gn/desc_builder.o
g++ -MMD -MF src/gn/desc_builder.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++17 -c ../src/gn/desc_builder.cc -o src/gn/desc_builder.o
../src/gn/desc_builder.cc: In member function 'base::Value {anonymous}::BaseDescBuilder::ToBaseValue(const Scope*)':
../src/gn/desc_builder.cc:179:21: error: redundant move in return statement [-Werror=redundant-move]
  179 |     return std::move(res);
      |            ~~~~~~~~~^~~~~
../src/gn/desc_builder.cc:179:21: note: remove 'std::move' call
../src/gn/desc_builder.cc: In instantiation of 'base::Value {anonymous}::BaseDescBuilder::ToBaseValue(const std::vector<T>&) [with T = Value]':
../src/gn/desc_builder.cc:193:27:   required from here
../src/gn/desc_builder.cc:170:25: error: redundant move in return statement [-Werror=redundant-move]
  170 |     return std::move(res);
      |                         ^
../src/gn/desc_builder.cc:170:25: note: remove 'std::move' call
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.
make[3]: *** [Makefile:61: /home/user/1/lede/build_dir/hostpkg/gn-2023-04-05-28b7b6c5/.built] Error 1
make[3]: Leaving directory '/home/user/1/lede/feeds/helloworld/gn'
time: package/feeds/helloworld/gn/host-compile#2.88#0.24#2.44
    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/user/1/lede'
make[1]: *** [package/Makefile:110: /home/user/1/lede/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/user/1/lede'
make: *** [/home/user/1/lede/include/toplevel.mk:231: world] Error 2

from helloworld.

dph5199278 avatar dph5199278 commented on August 27, 2024

@liwenjie119
如果你不纠结于gn-2023-04-05版本,可以尝试gn-2024-01-24版本来编译,2024-01-24版,我是编译通过的

如果不想或不能升级,尝试在Makefile中加入:

TARGET_CXXFLAGS += -Wno-error=redundant-move

image
试试,没编译过2023-04-05版,不保证一定行

from helloworld.

liwenjie119 avatar liwenjie119 commented on August 27, 2024

现在又恢复master仓库了?更新都在master仓库,我说怎么看gn更新版本了但怎么拉取都不对,一直拉的main仓库,main分支gn没更新

from helloworld.

qqsir-dev avatar qqsir-dev commented on August 27, 2024

@coolsnowwolf 还得请大佬帮忙解决一下吧,云编译一直这个问题出错。

from helloworld.

zxlhhyccc avatar zxlhhyccc commented on August 27, 2024

Author

本人在官方main和master分支下均正常通过。。。。,提示一下,编译环境的gcc版本必须是最低9.x及以上,因此请先升级gcc版本。。。

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.