LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   -current Blender build problem: boost::locale missing. (https://www.linuxquestions.org/questions/slackware-14/current-blender-build-problem-boost-locale-missing-4175652463/)

Lockywolf 04-19-2019 11:42 PM

-current Blender build problem: boost::locale missing.
 
Hello, everyone

I don't seem to be able to link blender from SBo on the current Slackware.
The problem seems to be boost-related:

Code:

100%] Linking CXX executable ../../bin/blender
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_pgettext: error: undefined reference to 'boost::locale::base_message_format<char>::id'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_init: error: undefined reference to 'boost::locale::localization_backend_manager::global()'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_init: error: undefined reference to 'boost::locale::localization_backend_manager::select(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_init: error: undefined reference to 'boost::locale::localization_backend_manager::global(boost::locale::localization_backend_manager const&)'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_init: error: undefined reference to 'boost::locale::localization_backend_manager::~localization_backend_manager()'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_init: error: undefined reference to 'boost::locale::localization_backend_manager::~localization_backend_manager()'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_set: error: undefined reference to 'boost::locale::generator::generator()'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_set: error: undefined reference to 'boost::locale::generator::add_messages_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_set: error: undefined reference to 'boost::locale::generator::add_messages_domain(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_set: error: undefined reference to 'boost::locale::generator::generate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_set: error: undefined reference to 'boost::locale::generator::~generator()'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_set: error: undefined reference to 'boost::locale::generator::generate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_init.cold.25: error: undefined reference to 'boost::locale::localization_backend_manager::~localization_backend_manager()'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_set.cold.26: error: undefined reference to 'boost::locale::generator::~generator()'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function boost::locale::info const& std::use_facet<boost::locale::info>(std::locale const&): error: undefined reference to 'boost::locale::info::id'
collect2: error: ld returned 1 exit status
make[2]: *** [source/creator/CMakeFiles/blender.dir/build.make:338: bin/blender] Error 1
make[1]: *** [CMakeFiles/Makefile2:8042: source/creator/CMakeFiles/blender.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

I heard something like that boost 1.70 has changed the API a bit.

Has anyone already sorted out what to do?

stormtracknole 04-20-2019 06:14 AM

Quote:

Originally Posted by Lockywolf (Post 5986851)
Hello, everyone

I don't seem to be able to link blender from SBo on the current Slackware.
The problem seems to be boost-related:

Code:

100%] Linking CXX executable ../../bin/blender
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_pgettext: error: undefined reference to 'boost::locale::base_message_format<char>::id'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_init: error: undefined reference to 'boost::locale::localization_backend_manager::global()'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_init: error: undefined reference to 'boost::locale::localization_backend_manager::select(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_init: error: undefined reference to 'boost::locale::localization_backend_manager::global(boost::locale::localization_backend_manager const&)'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_init: error: undefined reference to 'boost::locale::localization_backend_manager::~localization_backend_manager()'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_init: error: undefined reference to 'boost::locale::localization_backend_manager::~localization_backend_manager()'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_set: error: undefined reference to 'boost::locale::generator::generator()'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_set: error: undefined reference to 'boost::locale::generator::add_messages_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_set: error: undefined reference to 'boost::locale::generator::add_messages_domain(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_set: error: undefined reference to 'boost::locale::generator::generate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_set: error: undefined reference to 'boost::locale::generator::~generator()'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_set: error: undefined reference to 'boost::locale::generator::generate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_init.cold.25: error: undefined reference to 'boost::locale::localization_backend_manager::~localization_backend_manager()'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function bl_locale_set.cold.26: error: undefined reference to 'boost::locale::generator::~generator()'
../../lib/libbf_intern_locale.a(boost_locale_wrapper.cpp.o):boost_locale_wrapper.cpp:function boost::locale::info const& std::use_facet<boost::locale::info>(std::locale const&): error: undefined reference to 'boost::locale::info::id'
collect2: error: ld returned 1 exit status
make[2]: *** [source/creator/CMakeFiles/blender.dir/build.make:338: bin/blender] Error 1
make[1]: *** [CMakeFiles/Makefile2:8042: source/creator/CMakeFiles/blender.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

I heard something like that boost 1.70 has changed the API a bit.

Has anyone already sorted out what to do?

Seeing this problem too. One of the dependencies (opencolorio) is not building either. For the time being, I'm using the Blender flatpak.

BW-userx 04-20-2019 07:41 AM

yes boost is becoming a problem with 3rd party / after factory installed apps, my qbittorrent went to crap via libtorrent-rasterbar because boost changed its API. My fix was I just (just now as I am writing this , now finished re-installing) reinstalled slack current dvd from a alien bob iso I have saved. That means it is not as current as currect now is, and No more updates for me until libtorrent-rasterbar catches up with boost.

Because I do not know network programming, and don't really want to try and put myself through a crash corse to (try and) fix libtorrent-rasterbar source code.

Lockywolf 04-20-2019 10:53 AM

Yeah, opencolorio is not getting built for me either.

Didn't have time to investigate this issue.

RadicalDreamer 04-21-2019 02:43 AM

Did you remove openimageio before installing opencolorio? Opencolorio picks openimageio up as a dependency. I use the Slackbuild for the Binary version of Blender and Blender 2.79b from blender.org. I got tired of dealing with the dependencies and the binary supplied by Blender has CUDA support so I don't have to deal with NVIDIA's CUDA shenanigans.

Lockywolf 04-21-2019 07:55 AM

Well, I successfully managed to compile blender before.

Why would I remove it? Still there.

Lockywolf 04-21-2019 08:28 AM

Well, I successfully managed to compile blender before.

Why would I remove it? Still there.

Do I have to build blender with gcc5?

chris.willing 04-21-2019 08:33 AM

To fix the boost::locale linking error in -current, add the line:
Code:

-DCMAKE_EXE_LINKER_FLAGS:STRING="-lboost_locale" \
into the cmake configuration options of Blender.SlackBuild. I don't think the position in the list is important but I made it the line immediately before "-DCMAKE_INSTALL_PREFIX=/usr ".

I had no problem building opencolorio. The optional openimageio dependency is not specified as required in the default opencolorio.info file and I never build it with that dependency myself. If you're having openimageio related problems when building opencolorio, I suggest you remove the openimageio dependency - unless you know you have a specific use for it.

chris

ponce 04-21-2019 11:27 AM

Quote:

Originally Posted by chris.willing (Post 5987182)
To fix the boost::locale linking error in -current, add the line:
Code:

-DCMAKE_EXE_LINKER_FLAGS:STRING="-lboost_locale" \
into the cmake configuration options of Blender.SlackBuild

Thanks Chris, pushed!

Lockywolf 04-22-2019 11:03 PM

I did compile blender with this patch, but it doesn't run due to misconfigured python.

I'm not complaining about it too much, because I probably should have recompiled all the dependencies, which I was too v lazy to do.

What I am concerned about, however, is that...

Is it really the best to add a cmake flag rather than patch blender's own build files themselves?

Although I guess this issue has been fixed in the blender upstream.

Lockywolf 04-22-2019 11:55 PM

Deleted

chris.willing 04-23-2019 04:01 AM

Quote:

Originally Posted by Lockywolf (Post 5987638)
What I am concerned about, however, is that...
Is it really the best to add a cmake flag rather than patch blender's own build files themselves?

Sorry, I don't agree with that logic. A cmake flag is the least intrusive way to configure the build to suit your environment (in this case, -current with boost & gcc versions that were probably not available when the existing Blender version was released). The whole point of cmake flags is to use them (via default settings or builder interaction) to build the software (Blender here) the way you want it. They are just configuration options - like "./configure --prefix=/usr" (which becomes "cmake -DCMAKE_INSTALL_PREFIX=/usr").

In fact, the next update to the SlackBuild targets CUDA support and uses a cmake flag to enable it. Is that really the best way? An alternative is to patch the source code to enable it by default. I don't think it makes sense to do that when the software already provides the option (using cmake flags) to enable it if you want it.

Quote:

Originally Posted by Lockywolf (Post 5987638)
Although I guess this issue has been fixed in the blender upstream.

I'm sure it will be fixed for the next Blender version but highly unlikely they'll do anything for the existing version.

chris

Lockywolf 04-23-2019 04:35 AM

Quote:

Originally Posted by chris.willing (Post 5987679)
Sorry, I don't agree with that logic.

I am not trying to be critical, I genuinely asking :).

I understand the difference between 'configuring for my system' and 'patching the base source'.
Therefore I don't see anything wrong with saying "--prefix=/usr". It's only that on the first glance it seemed to me that this is more of a build system bug than a configuration issue.

The only benefit of a patch over a cmake option is the ability to send this patch to the Blender developers.
Frankly, I just thought that they could introduce some sort of a build-time variable like Blender_BOOST_FLAGS, and infer it somehow automatically during the configuration process. But in terms of Slackware, obviously, a configure option is more manageable.

Anyway, I still don't manage to run blender (althought it compiles now):

Code:

lockywolf@delllaptop:~$ blender
found bundled python: /usr/share/blender/2.79/python
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007fce2003cb40 (most recent call first):
Aborted
lockywolf@delllaptop:~$

I tried setting PYTHONHOME to bothe /usr/lib64/python3.7 and /usr/lib64/python2.7, but it seems that I have screwed my system more than I expected.

Code:

$cat /usr/bin/blender
#!/bin/sh
#export PYTHONPATH=/usr/share/blender/2.79/python/lib64/python3.7
export LD_LIBRARY_PATH=/usr/lib64/opencollada
exec blender.bin "$@"

Code:

# ls /usr/share/blender/2.79/python/lib64/
python3.6/

Code:

# grep -l python3.6 /var/log/packages/* | cut --delimiter='/' -f 5 | cut --delimiter='-' -f 1,2,3,4,5
opencolorio-1.1.0-x86_64-1ponce
opencv-3.4.1-x86_64-4ponce
setuptools-scm-2.0.0-x86_64-1ponce


chris.willing 04-23-2019 05:30 AM

Quote:

Originally Posted by Lockywolf (Post 5987686)
Anyway, I still don't manage to run blender (althought it compiles now):

Code:

lockywolf@delllaptop:~$ blender
found bundled python: /usr/share/blender/2.79/python
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007fce2003cb40 (most recent call first):
Aborted
lockywolf@delllaptop:~$

I tried setting PYTHONHOME to bothe /usr/lib64/python3.7 and /usr/lib64/python2.7, but it seems that I have screwed my system more than I expected.

Code:

$cat /usr/bin/blender
#!/bin/sh
#export PYTHONPATH=/usr/share/blender/2.79/python/lib64/python3.7
export LD_LIBRARY_PATH=/usr/lib64/opencollada
exec blender.bin "$@"

Code:

# ls /usr/share/blender/2.79/python/lib64/
python3.6/

Code:

# grep -l python3.6 /var/log/packages/* | cut --delimiter='/' -f 5 | cut --delimiter='-' -f 1,2,3,4,5
opencolorio-1.1.0-x86_64-1ponce
opencv-3.4.1-x86_64-4ponce
setuptools-scm-2.0.0-x86_64-1ponce


I think you're using an old version of the SlackBuild. When it was updated for python3.7, the bundled python option was turned off (via a cmake flag ;)) but your error points to the bundled version. Also, all the mentions of python3.6 (which is also well out of date) are concerning. It looks like you have a mixture of python3.6 & python3.7 apps on your system which you'll have to resolve somehow.

chris

Lockywolf 04-23-2019 06:37 AM

Quote:

I think you're using an old version of the SlackBuild. When it was updated for python3.7, the bundled python option was turned off
This wasn't the point of my post :).

There is indeed, no python in the new package:

Code:

root@delllaptop:/var/lib/sbopkg/SBo-git/graphics/opencolorio# grep python /var/log/packages/Blender-2.79b-x86_64-2ponce
usr/share/blender/2.79/scripts/modules/console_python.py

The files, however, are there. I suspect that there may be some issue with either the slackbuild or sbopkg, which makes them keep the old files in the '/usr/share/blender/2.79/python/'

Also, I think that checking whether to use built-in python by the presence of the '/usr/share/blender/2.79/python/' directory is not the best choice. I'd prefer a parameter in a config file, but this plea probably should be addressed to the blender developers.


All times are GMT -5. The time now is 05:20 PM.