Page MenuHome

Static linking of Blender 2.77a with boost 1.60.0 fails due to boost_locale and boost_system
Closed, ArchivedPublic


System Information
CentOS Linux release 7.2.1511 (Core)

Blender Version
Broken: (example: 2.77a)
Worked: (optional)

Short description of error
When compiling a static version of Blender (from source) with a static version of boost 1.60.0 (from source) the order of the boost_locale and boost_system libraries are incorrect.

Exact steps for others to reproduce the error
I followed the steps of ./build_files/build_environment/

  1. Download boost 1.60.0 (from
  1. Build boost
./ --prefix=/mnt/lustre/software/boost/1.60 --with-python=python3 --with-python-root="/mnt/lustre/software/python/3.5.1 : /mnt/lustre/software/python/3.5.1/include/python3.5m /mnt/lustre/software/python/3.5.1/include/python3.5"
./b2 -j17 -a -q variant=release debug-symbols=off threading=multi link=static cxxflags=-fPIC cflags=-fPIC python=3.5 --with-system --with-filesystem --with-thread --with-python --with-mpi --with-regex --with-locale --with-date_time --with-wave --disable-icu install
  1. Download Blender 2.77a (from
  2. Build Blender
      -D CMAKE_PREFIX_PATH=/mnt/lustre/software/blender/2.77a \
      -D Boost_USE_STATIC_LIBS=ON -D Boost_USE_ICU=ON \
      -D PYTHON_NUMPY_PATH=/mnt/lustre/software/numpy/1.10.1/lib/python3.5/site-packages/ \
make -j17
  1. Compilation works; however, whilst linking I get these errors:
/mnt/lustre/software/boost/1.60/lib/libboost_locale.a(generator.o):generator.cpp:function boost::thread_exception::thread_exception(int, char const*): error: undefined reference to 'boost::system::system_category()'
/mnt/lustre/software/boost/1.60/lib/libboost_locale.a(generator.o):generator.cpp:function _GLOBAL__sub_I__ZN5boost6locale9generatorC2ERKNS0_28localization_backend_managerE: error: undefined reference to 'boost::system::generic_category()'
/mnt/lustre/software/boost/1.60/lib/libboost_locale.a(generator.o):generator.cpp:function _GLOBAL__sub_I__ZN5boost6locale9generatorC2ERKNS0_28localization_backend_managerE: error: undefined reference to 'boost::system::generic_category()'
/mnt/lustre/software/boost/1.60/lib/libboost_locale.a(generator.o):generator.cpp:function _GLOBAL__sub_I__ZN5boost6locale9generatorC2ERKNS0_28localization_backend_managerE: error: undefined reference to 'boost::system::system_category()'
  1. In order to resolve the issue I had to manually edit the file ./source/creator/CMakeFiles/blender.dir/link.txt and move -lboost_system after -lboost_locale; like this:
-lboost_locale -lboost_system

Could you please modify your cmake rules; so that the order of boost libraries is correct?




Event Timeline

Sergey Sharybin (sergey) closed this task as Archived.Sep 5 2016, 1:11 PM

This is weird because we use static linking against 1.60 for the release builds. Maybe boost itself is compiled with different options tho.

Another thing is that bug tracker explicitly says not to report compilation error issues and use IRC or mailing list for that ;) So will archive the report now, but will keep monitoring it.

In any case, i committed some tweaks to CMake now in rB1df4f79 so hopefully the issue is now solved for you.