Need help compiling Blender Cycles Linux64

I came across this article on how to compile Blender with Cycles, but I keep getting a “Error 2” message, with no information as to what the error means. The place of the error seems somewhat random, and can appear almost at any point of the build, but there is one error that I get nearly every time.

Linking C static library …/…/…/lib/libbf_blenkernel.a
[ 29%] Built target bf_blenkernel
make: *** [all] Error 2

That is all it tells me. There really isn’t anything else I can show you. I’m copy pasting everything into the terminal, so there shouldn’t be any typos on my part. I’ve installed all the dependencies that are listed in the instructions, plus the ones listed here.

Open Image IO compiled fine, with no errors at all.

I am running Ubuntu 11.04 x64 on an intel i5 processor (if that makes any difference, but I think it might).

I don’t know what the error is since I haven’t compiled Cycles myself, but to get more info issue the command


cmake ../blender\
  -DCMAKE_BUILD_TYPE=Release \
  -DCYCLES_OIIO=../oiio/dist/linux64\
  -DCMAKE_VERBOSE_MAKEFILE=ON

and recompile (i.e. “make clean; make -j4 install”).

i got the same problem - ubuntu 11.04 / 32bit
and added the verbose flag -DCMAKE_VERBOSE_MAKEFILE=ON
, but don’t get any wiser :slight_smile:

Linking C static library …/…/…/lib/libbf_blenkernel.a
cd /home/sc3sc3/blender-cycles/build/source/blender/blenkernel && /usr/bin/cmake -P CMakeFiles/bf_blenkernel.dir/cmake_clean_target.cmake
cd /home/sc3sc3/blender-cycles/build/source/blender/blenkernel && /usr/bin/cmake -E cmake_link_script CMakeFiles/bf_blenkernel.dir/link.txt --verbose=1
/usr/bin/ar cr …/…/…/lib/libbf_blenkernel.a CMakeFiles/bf_blenkernel.dir/intern/BME_Customdata.c.o CMakeFiles/bf_blenkernel.dir/intern/BME_conversions.c.o CMakeFiles/bf_blenkernel.dir/intern/BME_eulers.c.o CMakeFiles/bf_blenkernel.dir/intern/BME_mesh.c.o CMakeFiles/bf_blenkernel.dir/intern/BME_structure.c.o CMakeFiles/bf_blenkernel.dir/intern/BME_tools.c.o CMakeFiles/bf_blenkernel.dir/intern/CCGSubSurf.c.o CMakeFiles/bf_blenkernel.dir/intern/DerivedMesh.c.o CMakeFiles/bf_blenkernel.dir/intern/action.c.o CMakeFiles/bf_blenkernel.dir/intern/anim.c.o CMakeFiles/bf_blenkernel.dir/intern/anim_sys.c.o CMakeFiles/bf_blenkernel.dir/intern/armature.c.o CMakeFiles/bf_blenkernel.dir/intern/blender.c.o CMakeFiles/bf_blenkernel.dir/intern/bmfont.c.o CMakeFiles/bf_blenkernel.dir/intern/boids.c.o CMakeFiles/bf_blenkernel.dir/intern/booleanops_mesh.c.o CMakeFiles/bf_blenkernel.dir/intern/brush.c.o CMakeFiles/bf_blenkernel.dir/intern/bullet.c.o CMakeFiles/bf_blenkernel.dir/intern/bvhutils.c.o CMakeFiles/bf_blenkernel.dir/intern/cdderivedmesh.c.o CMakeFiles/bf_blenkernel.dir/intern/cloth.c.o CMakeFiles/bf_blenkernel.dir/intern/collision.c.o CMakeFiles/bf_blenkernel.dir/intern/colortools.c.o CMakeFiles/bf_blenkernel.dir/intern/constraint.c.o CMakeFiles/bf_blenkernel.dir/intern/context.c.o CMakeFiles/bf_blenkernel.dir/intern/curve.c.o CMakeFiles/bf_blenkernel.dir/intern/customdata.c.o CMakeFiles/bf_blenkernel.dir/intern/customdata_file.c.o CMakeFiles/bf_blenkernel.dir/intern/deform.c.o CMakeFiles/bf_blenkernel.dir/intern/depsgraph.c.o CMakeFiles/bf_blenkernel.dir/intern/displist.c.o CMakeFiles/bf_blenkernel.dir/intern/effect.c.o CMakeFiles/bf_blenkernel.dir/intern/fcurve.c.o CMakeFiles/bf_blenkernel.dir/intern/fluidsim.c.o CMakeFiles/bf_blenkernel.dir/intern/fmodifier.c.o CMakeFiles/bf_blenkernel.dir/intern/font.c.o CMakeFiles/bf_blenkernel.dir/intern/gpencil.c.o CMakeFiles/bf_blenkernel.dir/intern/group.c.o CMakeFiles/bf_blenkernel.dir/intern/icons.c.o CMakeFiles/bf_blenkernel.dir/intern/idcode.c.o CMakeFiles/bf_blenkernel.dir/intern/idprop.c.o CMakeFiles/bf_blenkernel.dir/intern/image.c.o CMakeFiles/bf_blenkernel.dir/intern/image_gen.c.o CMakeFiles/bf_blenkernel.dir/intern/implicit.c.o CMakeFiles/bf_blenkernel.dir/intern/ipo.c.o CMakeFiles/bf_blenkernel.dir/intern/key.c.o CMakeFiles/bf_blenkernel.dir/intern/lattice.c.o CMakeFiles/bf_blenkernel.dir/intern/library.c.o CMakeFiles/bf_blenkernel.dir/intern/material.c.o CMakeFiles/bf_blenkernel.dir/intern/mball.c.o CMakeFiles/bf_blenkernel.dir/intern/mesh.c.o CMakeFiles/bf_blenkernel.dir/intern/mesh_validate.c.o CMakeFiles/bf_blenkernel.dir/intern/modifier.c.o CMakeFiles/bf_blenkernel.dir/intern/multires.c.o CMakeFiles/bf_blenkernel.dir/intern/nla.c.o CMakeFiles/bf_blenkernel.dir/intern/node.c.o CMakeFiles/bf_blenkernel.dir/intern/object.c.o CMakeFiles/bf_blenkernel.dir/intern/packedFile.c.o CMakeFiles/bf_blenkernel.dir/intern/paint.c.o CMakeFiles/bf_blenkernel.dir/intern/particle.c.o CMakeFiles/bf_blenkernel.dir/intern/particle_system.c.o CMakeFiles/bf_blenkernel.dir/intern/pointcache.c.o CMakeFiles/bf_blenkernel.dir/intern/property.c.o CMakeFiles/bf_blenkernel.dir/intern/report.c.o CMakeFiles/bf_blenkernel.dir/intern/sca.c.o CMakeFiles/bf_blenkernel.dir/intern/scene.c.o CMakeFiles/bf_blenkernel.dir/intern/screen.c.o CMakeFiles/bf_blenkernel.dir/intern/script.c.o CMakeFiles/bf_blenkernel.dir/intern/seqcache.c.o CMakeFiles/bf_blenkernel.dir/intern/seqeffects.c.o CMakeFiles/bf_blenkernel.dir/intern/sequencer.c.o CMakeFiles/bf_blenkernel.dir/intern/shrinkwrap.c.o CMakeFiles/bf_blenkernel.dir/intern/sketch.c.o CMakeFiles/bf_blenkernel.dir/intern/smoke.c.o CMakeFiles/bf_blenkernel.dir/intern/softbody.c.o CMakeFiles/bf_blenkernel.dir/intern/sound.c.o CMakeFiles/bf_blenkernel.dir/intern/subsurf_ccg.c.o CMakeFiles/bf_blenkernel.dir/intern/suggestions.c.o CMakeFiles/bf_blenkernel.dir/intern/text.c.o CMakeFiles/bf_blenkernel.dir/intern/texture.c.o CMakeFiles/bf_blenkernel.dir/intern/unit.c.o CMakeFiles/bf_blenkernel.dir/intern/world.c.o CMakeFiles/bf_blenkernel.dir/intern/writeavi.c.o CMakeFiles/bf_blenkernel.dir/intern/writeffmpeg.c.o CMakeFiles/bf_blenkernel.dir/intern/writeframeserver.c.o
/usr/bin/ranlib …/…/…/lib/libbf_blenkernel.a
make[2]: Leaving directory /home/sc3sc3/blender-cycles/build' /usr/bin/cmake -E cmake_progress_report /home/sc3sc3/blender-cycles/build/CMakeFiles 1 2 3 4 5 6 [ 32%] Built target bf_blenkernel make[1]: Leaving directory/home/sc3sc3/blender-cycles/build’
make: *** [all] Error 2

I’m re-downloading the source code, so I’ll post my output as soon as I can.

It didn’t work. For some reason it says I can’t enable the verbose option.

[email protected]:~/blender-cycles/build$ cmake ../blender\
>   -DCMAKE_BUILD_TYPE=Release \
>   -DCYCLES_OIIO=../oiio/dist/linux64\
>   -DCMAKE_VERBOSE_MAKEFILE=ON
-- Unsupported CFLAG: -Wno-error=unused-but-set-variable
-- Blender Skipping: (bf_collada;extern_openjpeg;extern_redcode)
-- Boost found TRUE
-- Boost version 104200
-- Boost include dirs /usr/include
-- Boost library dirs /usr/lib
-- Boost libraries optimized;/usr/lib/libboost_filesystem-mt.so;debug;/usr/lib/libboost_filesystem-mt.so;optimized;/usr/lib/libboost_regex-mt.so;debug;/usr/lib/libboost_regex-mt.so;optimized;/usr/lib/libboost_system-mt.so;debug;/usr/lib/libboost_system-mt.so;optimized;/usr/lib/libboost_serialization-mt.so;debug;/usr/lib/libboost_serialization-mt.so;optimized;/usr/lib/libboost_thread-mt.so;debug;/usr/lib/libboost_thread-mt.so
-- OpenImageIO includes = /home/mike/blender-cycles/oiio/dist/linux64/include
-- OpenImageIO library = /home/mike/blender-cycles/oiio/dist/linux64/lib/libOpenImageIO.so
-- rpmbuild NOT found. RPM generation will not be available
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mike/blender-cycles/build

Where does it say that?
The line with “Unsupported CFLAG: -Wno-error=unused-but-set-variable” is just a spurious warning.

I don’t know what’s wrong, guys. I just built a week-old revision of Cycles without problem… And I don’t even have the CUDA stuff installed (I have an ATI card).

It could be that the recent revision of cycles that you have has developed some problems.

so be brave
do an svn update
, and tell us what the result is :slight_smile:

in the mean time i download a precompiled version from graphicall
and it is pretty amazing work !!!

Same old problem:

[ 30%] Built target bf_blenkernel
make[1]: Leaving directory `/home/mike/blender-cycles/build'
make: *** [all] Error 2

Is there any way to find out what the error means?

I am running this build from an update I just ran an hour ago, so I don’t think I need to update it again. I will try, though, and see if that fixes it.

I would normally just use a precompiled binary, but I can’t get them to run on my computer. It makes me wonder if I have some dependencies missing…

That’s the thing about cmake-generated makefiles, they go to great lengths to hide information. When an error occurs it is difficult to track down due to the lack of info.

I have to take off for the day so all I can say for now is that the next step in the build process with your sources should have been: “Scanning dependencies of target bf_blenlib” so something in that step is bombing.

I have not been able to build Cycles successfully myself on 64 bit (I get the same error), but the builds on Graphicall.org work fine. Is there any specific reason you want to compile your own?

Actually, yes there is a reason. I can’t get them to run. I can get the windows builds running on the same computer (I dual boot Win7 and Ubuntu), but I like working in Linux better. Anyway, I get this error, and can’t solve it:

./blender: error while loading shared libraries: libGLEW.so.1.5: wrong ELF class: ELFCLASS64

So I thought it would be easier to build it myself.

Can you locate your libGLEW.so library (“ldd ./blender” on the Graphicall version should give a list of all libs used by blender) and then investigate what’s up with that lib? I’ve never seen that error before but I have a hunch that the 32bit version is being used rather than the 64bit version.

EDIT: Ok, looking at the error again I see I have my logic backward. Are you sure the Graphicall version you DL-ed is 64 bit?

Oh… I can’t believe it was THAT SIMPLE! :o Thanks, though! It’s running perfectly now. I had tried to download the 64 bit originally, but at the time the download link wasn’t working, so I tried the 32 bit version.