Thu, Nov 28, 3:32 PM CST

Renderosity Forums / Blender



Welcome to the Blender Forum

Forum Moderators: Lobo3433 Forum Coordinators: LuxXeon

Blender F.A.Q (Last Updated: 2024 Nov 24 8:44 pm)

Welcome to the Blender Forum!


   Your place to learn about Blender, ask questions,
   exchange ideas, and interact with the other Blender users!


   Gallery | Freestuff | Tutorials

 

Visit the Renderosity MarketPlace. Your source for digital art content!

 





Subject: Building Blender for Linux Mint 13 - Discussion


RobynsVeil ( ) posted Fri, 02 November 2012 at 8:00 PM · edited Thu, 28 November 2024 at 12:50 PM

Much to my chagrin, I'll admit to having posted parts of this elsewhere on the 'net. The lukewarm response (on BA, for example) indicates something: not sure if it's too-hard basket, most people are essentially consumers, most are content with the already-fairly-frequent releases of Blender by Blender.org... or some other reason I haven't devined as yet.

The desire to build my own copy of Blender initially grew out of a misconception, really: I thought that in order to solve my CUDA-activation problem in Blender, I had to build it myself, setting specific flags... or something (grey area). Come to find out that for NVidia and Linux Mint 13 (and Ubuntu 12.04 as well, I suspect, as Mint is based on Ubuntu) to play happily together, you actually had to install something called a CUDA Toolkit. Installed this (after I did the exercise of actually building my own Blender from svn) and all builds suddenly saw and used CUDA, which was critical if you wanted to take advantage of GPU-rendering in Cycles.

The steps were reasonably straight-forward, and I'd be happy to outline IF there is an interest and/or need, defined by someone actually having a read of this thread and responding with a request.


So, I managed to build my own. YAY. Still, saying that, I'm finding myself being sucked deeper and deeper into the arcane Linux "build-yer-own" world only because I want more! So, here's the deal:

I actually have my main version of Blender build refreshing almost every week via ppa from irie (shinsuke)... one of the advantages of Linux over Windows is this concept of software updates via Update Manager and ppa, where software versions are updated along with the operating system. This is currently on revision 51462. To Windows users, having the latest-greatest bleeding-edge version may seem a bit over-the-top, but there is a rationale for having that extremely-recent build: bug fixes. There were at 211 reported bugs when 2.64 was released, which count is now down to 107! So, the builds are cleaner, thus worthwhile getting.

But, whilst this latest-greatest from ppa included support of jpgs and tiffs, the libraries I was using to build my own from source (the svn) did not. So, my flavours could only see pngs in Cycles preview and render. The easy solution would be to simply convert the jpgs to pngs and wait for the Boost and OiiO libraries on svn to be updated, but one would miss an opportunity to learn something, wouldn't one?

I mentioned Boost and OiiO: Blender uses these external (open-source) libraries to manage colour and rendering and textures and all that: so I downloaded the source files for Boost and OpenImageIO from their respective sites and very briefly examined the instructions (when i should have been reading them carefully).

Compiling Boost was no dramas at all, simply following these instructions, downloading the most recent version of Boost - currently at 1.51) and copying and pasting (and running) this in Terminal:

sudo apt-get install git-core
mkdir blender-cycles
cd blender-cycles
mkdir boost
cd boost

... then moving your Boost file into the /blender-cycles/boost/ folder and:

tar xzf boost_1_51_0.tar.gz
cd boost_1_51_0/
./bootstrap.sh
./bjam -j4 variant=release link=static threading=multi --with-filesystem --with-thread --with-regex --with-system --with-date_time stage install --prefix=../
cd ../..

All this happened without a hitch. The came OiiO:

git clone git://github.com/OpenImageIO/oiio.git
cd oiio
git checkout RB-0.10
mkdir -p build/linux
cd build/linux
cmake ../../src/ -DBUILDSTATIC=1 -DBOOST_CUSTOM=1 -DBoost_INCLUDE_DIRS=pwd/../../../boost/include/ -DBoost_LIBRARY_DIRS=pwd/../../../boost/lib -DBoost_LIBRARIES="boost_date_time;boost_filesystem;boost_thread;boost_regex;boost_system" -DCMAKE_INSTALL_PREFIX=pwd/../../dist/linux

...all THIS ran fine without errors, but then:

make -j4 install

...generated HEAPS of errors:

<pre class="de1">
<em>Scanning dependencies of target OpenImageIO</em><br></br><em>[ 1%] [ 2%] [ 2%] [ 3%] </em><br></br><em>Building CXX object libOpenImageIO/CMakeFiles/OpenImageIO.dir/imagebuf.cpp.o</em><br></br><em>Building CXX object libOpenImageIO/CMakeFiles/OpenImageIO.dir/imagebufalgo_orient.cpp.o</em><br></br><em>Building CXX object libOpenImageIO/CMakeFiles/OpenImageIO.dir/formatspec.cpp.o</em><br></br><em>Building CXX object libOpenImageIO/CMakeFiles/OpenImageIO.dir/imagebufalgo.cpp.o</em><br></br><em>/home/robyn/oiio/src/libOpenImageIO/imagebuf.cpp:40:32: fatal error: boost/scoped_ptr.hpp: </em><br></br><em>No such file or directory compilation terminated.</em><br></br><em>/home/robyn/oiio/src/libOpenImageIO/formatspec.cpp:37:31: fatal error: boost/tokenizer.hpp: </em><br></br><em>No such file or directory compilation terminated.</em><br></br><em>make[2]: *** [libOpenImageIO/CMakeFiles/OpenImageIO.dir/imagebuf.cpp.o] Error 1</em><br></br><em>make[2]: *** Waiting for unfinished jobs....</em><br></br><em>make[2]: *** [libOpenImageIO/CMakeFiles/OpenImageIO.dir/formatspec.cpp.o] Error 1</em><br></br><em>make[1]: *** [libOpenImageIO/CMakeFiles/OpenImageIO.dir/all] Error 2</em><br></br><em>make: *** [all] Error 2</em>

... which snag I finally figured out was caused by this:

Remember that you need to set the environment variable
IMAGEIO_LIBRARY_PATH to point to the 'lib' directory where OpenImageIO
is installed, or else it will not be able to find the plugins.

This was in the README. And in the INSTALL:

After you build OpenImageIO, if you compiled with the EMBEDPLUGINS=0 flag
you will need to set the environment variable OIIO_LIBRARY_PATH to point
to the 'lib' directory where OpenImageIO is installed, or else it will
not be able to find the plugins.

...but on the OiiO wiki:

You will need to set the environment variable THIRD_PARTY_TOOLS_HOME to the dist area of the external tools, in order for the OIIO build to recognize it.

All well and good, but:

-- which env var is it?
-- which folder is it actually after?
-- how does one set an environment variable in Linux, anyway?

For the last question, I'm suspecting that this is done in Terminal just prior to running that final make -j4 install and that the syntax is along the lines of:

export THIRD_PARTY_TOOLS_HOME=/path/to/external/dist/ARCH

...but questions remain. On my system this would boil down to:

export THIRD_PARTY_TOOLS_HOME=~/oiio/build/linux

but what about the OIIO_LIBRARY_PATH environment variable?

Any clues?

Anyone still awake? :lol:

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


RobynsVeil ( ) posted Sat, 03 November 2012 at 1:02 AM

Perhaps I should have asked first if anyone builds their own Blender?

:blink:

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


keppel ( ) posted Sat, 03 November 2012 at 10:47 PM

RobynsVeil,

I have dual booted my computer with Ubuntu 12.04 (Dreamstudio Distro) and Windows 7 64.  I've never considered building my own version of Blender under Linux as I still run Blender under Windows primarily.  Every couple of days I download the latest Windows build from http://builder.blender.org/download/

I have compared the speeds of rendering a scene with Cycles in Blender on my system under various Windows and Linux builds and have found that the Windows mingw compiled version runs the fastest by about 45% compared to the normal stable releases from Blender.org.  

I do want to thank you though because after reading through this post I downloaded the cuda toolkit and drivers you mentioned above and now have Blender using the cuda cores on my graphics card whereas before they were never identified.

My Renderosity Store
Virtual Furnishing
My Portfolio



RobynsVeil ( ) posted Sat, 03 November 2012 at 11:18 PM

Be interested to hear if there's going to be any performance improvement rendering in Cycles using the GPU in Ubuntu.

😄

And you're welcome - always happy to help (re: CUDA). Sometimes all it takes is just one tidbit of info that can make the difference!

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


keppel ( ) posted Sun, 04 November 2012 at 12:25 AM

Just been testing render speeds out and now have cycles rendering 38% faster now after installing the cuda toolkit and drivers.

My Renderosity Store
Virtual Furnishing
My Portfolio



RobynsVeil ( ) posted Sun, 04 November 2012 at 4:36 AM

I think I might have made some headway... anyway, I'll post my discoveries here in hopes of providing some other poor soul who might be in my place with some clues on how to proceed.

First of all: that environment variable question in Linux: basically, you do:

export [ENVIRONMENT_VARIABLE]=~/path/to/what/you/want/cmake/to/see

In my case, there were two env vars:

IMAGEIO_LIBRARY_PATH
and
THIRD_PARTY_TOOLS_HOME

So I did this:

export IMAGEIO_LIBRARY_PATH=~/oiio/build/linux

and

export THIRD_PARTY_TOOLS_HOME=~/blender-cycles/boost

I did this because it was suggested in the README, the INSTALL and here:
https://sites.google.com/site/openimageio/checking-out-and-building-openimageio
that this be done.

The error count only changed slightly when I tried to:

make j4 install

What did fix it was going into cmake-gui, discovering where all the holes (missing file references) were, and navigating to those with the gui.
Then, it compiled: mind you, not without issues, but it compiled.

Proof is in the pudding... now, I need to sort out how to build Blender using not the files that came with the svn (would you believe we're still downloading Boost 1.34!!!... Boost is on version 1.51) but with oiio and boost stuff I just built.

:blink:

Wish me luck! I'll keep you posted.

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.