LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Blogs > Lumak's Guide to Random Things
User Name
Password

Notices

OK I don't really have a good title yet but I figure I can post works in progress and other tips I've come across or other interesting things.
Rate this Entry

blender x86_64 compile guide for slackware64-pre-13.0-current

Posted 05-24-2009 at 12:01 AM by lumak
Updated 06-07-2009 at 03:16 AM by lumak

Just use the latest blender 2.49. They now support python 2.6.2 AND ffmpeg. Only follow the below if you require verse-server (I don't know if their pre-compiled binaries support verse client functions though). Also, you have to export PYTHONPATH=/usr/lib64/python2.6 to run the pre-compiled binaries.

--------------------------------------------------
Original Post:
--------------------------------------------------

Anyway... you don't have to modify too much. OpenAL and freealut are optional for the build. I suggest modifying the SlackBuilds.org scripts to get them to install into /usr/lib64

You can do this by the following modifications as well as passing ARCH=x86_64 to the script:

OpenAL
Code:
cmake \
  -DCMAKE_C_FLAGS="$SLKCFLAGS" \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DLIB_INSTALL_DIR=/usr/lib64
freealut
Code:
CFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --localstatedir=/var/lib \
  --libdir=/usr/lib64 \
  || exit 1

Blender has several compile choices: make, scons, and cmake

Nan - make
The make files littered about are just regular make compatible files that get configured through environment variables or through a user-def.mk. To compile on slackware64, you have to patch the make files to use /usr/lib64 for a few system libraries. Once you got that, you can do the following:
Code:
REL_CFLAGS="$SLKCFLAGS" \
REL_CCFLAGS="$SLKCFLAGS" \
NAN_PYTHON_VERSION=$PYTHON_VERSION \
NAN_PYTHON_LIB="/usr/lib$LIBSUFFIX/python$PYTHON_VERSION/config/libpython$PYTHON_VERSION.a" \
NAN_NO_OPENAL=0 \
make

Blender - scons
Code:
scons WITH_BF_VERSE="1" \
      BF_PYTHON_VERSION="2.6" \
      WITH_BF_OPENAL="1" \
      BF_OPENAL_LIB="openal alut" \
      REL_CFLAGS="$SLKCFLAGS" \
      REL_CCFLAGS="$SLKCFLAGS" \
      blender blenderplayer

Blender - cmake
Code:
  mkdir cmake-build-dir
  cd cmake-build-dir
  cmake -G "Unix Makefiles" path/to/source/blender-2.48a \
    -DWITH_PLAYER=1 \
    -DCMAKE_C_FLAGS="-O2 -fPIC" \
    -DCMAKE_CXX_FLAGS="-O2 -fPIC"

  make
Other features you can enable are WITH_VERSE to edit shared assets online with others and WITH_OPENPM which I think makes blender run more efficiently.

After a few compiles, it appears the following features require extra dependencies.

WITH_QUICKTIME=0
Quick time in blender is not supported for *nix.
Everywhere in the source code when WITH_QUICKTIME is enabled, it includes <Movies.h> for win32 and <QuickTime/Movies.h> for apple. There is no such compatible header in libquicktime for linux. It's not a big loss anyway, just convert the files before or after import.

WITH_FFMPEG
If you install the ffmpeg package 0.5 from slackbuilds, the headers go into include folders for each seperate lib compiled for ffmpeg. Blender expects the headers to all be in /usr/include/ffmpeg/. The source needs to be patched for a few files. I thought I had a working patch but it errors out when attempting to use ffmpeg.
You are better off on trying to use the ffmpeg distributed with blender. You may be able to statically link it in. I'll be working on it a bit more.

WITH_OPENAL
2 dependencies, might as well use them.

WITH_WEBPLUGIN
Requires a build time dependency http://releases.mozilla.org/pub/mozi....8.0.4.tar.bz2. It builds on x86_64 even though the sdk is i686. objdump says it is an x86_64 binary. The README for the plug-in is hidden under source/gameengine/GamePlayer/netscape/src/README.

I'll probably edit this blog everytime I find a mistake...

OK the uploaded files should be good to stay as is for now. the nan_make does not allow for building the web plug-in. It seems like the Makefiles just don't point to working source for it. If you really must build it, use the cmake method. If you need ffmpeg support, use the nan_make as this will compile a static version of ffmpeg into blender. I did get a buffer overflow with some random settings but other settings worked and rendered a video.
Attached Files
File Type: txt blender.nan_make.SlackBuild.txt (17.5 KB, 336 views)
File Type: txt blender-2.48a-nan_make_x86_64.patch.txt (1.4 KB, 299 views)
File Type: txt blender.cmake.SlackBuild.txt (15.4 KB, 422 views)
Views 1744 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 12:50 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration