Samet Kocbay
Samet Kocbay

Reputation: 1

Make bpy fails at 49% [-Werror=conversion] and then fails with make[1]: *** [Makefile:163: all] Error 2 make: *** [GNUMakefile:368: all] Error 2

/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

I tried building Blender as it is descripted on https://wiki.blender.org/wiki/Building_Blender/Linux/Ubuntu and I cant get around this error message. My python and gcc are up to date and Im rather new to Ubuntu so could some please help me out with this ?

Upvotes: 0

Views: 78

Answers (1)

John Bollinger
John Bollinger

Reputation: 181008

The conversion that your compiler is diagnosing is a genuine issue with the code being compiled, though perhaps one that has no impact in practice. Diagnostics of that kind are ordinarily non-fatal (warnings), but in this compilation, they are being treated as fatal.

I presume that this issue does not ordinarily prevent building Blender, so the most likely diagnosis is that you are building with non-default compilation options. Some of the possibilities there include

  • you have enabled -Werror or possibly -Werror=conversion, OR
  • you have enabled -Wall or possibly -Wconversion, thereby overriding a -Wno-conversion that the build system sets up by default.

Blender's appears to be a CMake build system, so building with make VERBOSE=1 instead of just make should give you a lot of detail messages about the commands being executed. I anticipate that the specific combination of flags that is responsible for the build failure would be revealed that way.

I tried building Blender as it is descripted on https://wiki.blender.org/wiki/Building_Blender/Linux/Ubuntu

Unfortunately, that's not specific enough for me to diagnose the issue with confidence. But if you are following the "Quick Setup" instructions without any embellishment, then the most likely way for extra flags to be entering your build would be from the CFLAGS, CXXFLAGS, or CPPFLAGS environment variable. Make sure these are unset in the shell environment in which you perform the build. You can get a complete list of the environment variables in effect via the env command with no arguments.

It's also possible that your GCC itself has been endowed with a non-default configuration, but that seems unlikely for a stock Ubuntu environment.

Upvotes: 0

Related Questions