/home/istmadmin/blender-git/blender/source/blender/blenlib/intern/index_mask.cc: In function ‘void blender::index_mask::inverted_indices_to_segments(blender::index_mask::IndexMaskSegment, blender::LinearAllocator<>&, blender::Vector<blender::OffsetSpan<long int, short int>, 16>&)’:
/home/istmadmin/blender-git/blender/source/blender/blenlib/intern/index_mask.cc:384:60: error: conversion from ‘int’ to ‘int16_t’ {aka ‘short int’} may change value [-Werror=conversion]
384 | const int16_t gap_first = indices[size_before_gap - 1] + 1;
/home/istmadmin/blender-git/blender/source/blender/blenlib/intern/index_mask.cc:386:35: error: conversion from ‘int’ to ‘int16_t’ {aka ‘short int’} may change value [-Werror=conversion]
386 | const int16_t gap_size = next - gap_first;
| ~~^~~~
[ 49%] Building CXX object extern/ceres/CMakeFiles/extern_ceres.dir/internal/ceres/generated/schur_eliminator_2_3_4.cc.o
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-stringop-overread’
cc1plus: some warnings being treated as errors
make[3]: * [source/blender/blenlib/CMakeFiles/bf_blenlib.dir/build.make:817: source/blender/blenlib/CMakeFiles/bf_blenlib.dir/intern/index_mask.cc.o] Error 1
make[2]: * [CMakeFiles/Makefile2:6442: source/blender/blenlib/CMakeFiles/bf_blenlib.dir/all] Error 2
make[2]: * Waiting for unfinished jobs....
[ 49%] Building CXX object extern/ceres/CMakeFiles/extern_ceres.dir/internal/ceres/generated/schur_eliminator_2_3_6.cc.o
[ 49%] Building CXX object extern/ceres/CMakeFiles/extern_ceres.dir/internal/ceres/generated/schur_eliminator_2_3_9.cc.o
[ 49%] Building CXX object extern/ceres/CMakeFiles/extern_ceres.dir/internal/ceres/generated/schur_eliminator_2_3_d.cc.o
[ 49%] Building CXX object extern/ceres/CMakeFiles/extern_ceres.dir/internal/ceres/generated/schur_eliminator_2_4_3.cc.o
[ 49%] Building CXX object extern/ceres/CMakeFiles/extern_ceres.dir/internal/ceres/generated/schur_eliminator_2_4_4.cc.o
[ 49%] Building CXX object extern/ceres/CMakeFiles/extern_ceres.dir/internal/ceres/generated/schur_eliminator_2_4_6.cc.o
[ 49%] Building CXX object extern/ceres/CMakeFiles/extern_ceres.dir/internal/ceres/generated/schur_eliminator_2_4_8.cc.o
[ 49%] Building CXX object extern/ceres/CMakeFiles/extern_ceres.dir/internal/ceres/generated/schur_eliminator_2_4_9.cc.o
[ 49%] Building CXX object extern/ceres/CMakeFiles/extern_ceres.dir/internal/ceres/generated/schur_eliminator_2_4_d.cc.o
[ 49%] Building CXX object extern/ceres/CMakeFiles/extern_ceres.dir/internal/ceres/generated/schur_eliminator_2_d_d.cc.o
[ 49%] Building CXX object extern/ceres/CMakeFiles/extern_ceres.dir/internal/ceres/generated/schur_eliminator_3_3_3.cc.o
[ 49%] Building CXX object extern/ceres/CMakeFiles/extern_ceres.dir/internal/ceres/generated/schur_eliminator_4_4_2.cc.o
[ 49%] Building CXX object extern/ceres/CMakeFiles/extern_ceres.dir/internal/ceres/generated/schur_eliminator_4_4_3.cc.o
[ 49%] Building CXX object extern/ceres/CMakeFiles/extern_ceres.dir/internal/ceres/generated/schur_eliminator_4_4_4.cc.o
[ 49%] Building CXX object extern/ceres/CMakeFiles/extern_ceres.dir/internal/ceres/generated/schur_eliminator_4_4_d.cc.o
[ 49%] Linking CXX static library ../../lib/libextern_ceres.a
[ 49%] Built target extern_ceres
make[1]: * [Makefile:163: all] Error 2
make: * [GNUmakefile:368: all] Error 2
我尝试按照 https://wiki.blender.org/wiki/Building_Blender/Linux/Ubuntu 上的描述构建 Blender,但我无法解决此错误消息。 我的 python 和 gcc 都是最新的,而且我对 Ubuntu 还很陌生,所以有人可以帮我解决这个问题吗?
编译器正在诊断的转换是正在编译的代码的一个真正问题,尽管可能在实践中没有影响。此类诊断通常是非致命的(警告),但在本汇编中,它们被视为致命的。
我认为这个问题通常不会阻止构建 Blender,因此最可能的诊断是您正在使用非默认编译选项进行构建。其中一些可能性包括
-Werror
或可能 -Werror=conversion
,或者-Wall
或可能的 -Wconversion
,从而覆盖构建系统默认设置的 -Wno-conversion
。Blender 似乎是一个 CMake 构建系统,因此使用
make VERBOSE=1
而不仅仅是 make
进行构建应该会为您提供许多有关正在执行的命令的详细消息。我预计导致构建失败的标志的特定组合将以这种方式揭示。
我尝试按照 https://wiki.blender.org/wiki/Building_Blender/Linux/Ubuntu 上的描述构建 Blender
不幸的是,这还不够具体,无法让我自信地诊断问题。但是,如果您遵循“快速设置”说明而不进行任何修饰,那么额外标志进入您的构建的最有可能的方式是来自
CFLAGS
、CXXFLAGS
或 CPPFLAGS
环境变量(等等)。确保这些未设置。
您的 GCC 本身也可能被赋予了非默认配置,但这对于现有的 Ubuntu 环境来说似乎不太可能。