NotebookForums.com › Forums › General Notebook Discussions › Linux & Other OS's › Issues compiling Blender3d
New Posts  All Forums:Forum Nav:

Issues compiling Blender3d

post #1 of 11
Thread Starter 
Hoping someone familiar with Scons can help me get Blender 2.42 compiled in Dapper x64. I edited my user-config.py to resolve some minor issues, but I keep getting this error now:
Code:
Compiling ==> 'GHOST_Buttons.cpp'
intern/ghost/intern/GHOST_Buttons.h:48: warning: ‘struct GHOST_Buttons’ has virtual functions but non-virtual destructor
Compiling ==> 'GHOST_C-api.cpp'
Compiling ==> 'GHOST_CallbackEventConsumer.cpp'
Compiling ==> 'GHOST_DisplayManager.cpp'
intern/ghost/intern/GHOST_DisplayManager.cpp: In member function ‘virtual GHOST_TSuccess GHOST_DisplayManager::getDisplaySetting(GHOST_TUns8, GHOST_TInt32, GHOST_DisplaySetting&) const’:
intern/ghost/intern/GHOST_DisplayManager.cpp:119: warning: comparison between signed and unsigned integer expressions
Compiling ==> 'GHOST_DisplayManagerX11.cpp'
In file included from intern/ghost/intern/GHOST_DisplayManagerX11.cpp:37:
intern/ghost/intern/GHOST_SystemX11.h:40:20: error: GL/glx.h: No such file or directory
intern/ghost/intern/GHOST_Buttons.h:48: warning: ‘struct GHOST_Buttons’ has virtual functions but non-virtual destructor
intern/ghost/intern/GHOST_ModifierKeys.h:48: warning: ‘struct GHOST_ModifierKeys’ has virtual functions but non-virtual destructor
scons: *** [/home/bob/build/linux2/intern/ghost/intern/GHOST_DisplayManagerX11.o] Error 1

I have no idea how to resolve this one. I think my opengl paths need to be altered in my config, but nothing i've tried so far works.
post #2 of 11
Quote:
In file included from intern/ghost/intern/GHOST_DisplayManagerX11.cpp:37: intern/ghost/intern/GHOST_SystemX11.h:40:20: error: GL/glx.h: No such file or directory
Error 1 is your standard compiler error that halts make, and above is your reason for it, you are missing a header file somehow. I would see where this file comes from, wether it is supposed to be part of the blender realease, or is tied with your system somewhere/how. I dont recognize it right off hand, other than by the name obviously it has something to do with an OpenGL implementation. Seablade
post #3 of 11
Upon a quick search I think it is a part of the standard OpenGL package, maybe do an emerge search for glx or opengl? Wish I had my gentoo box with me to be able to help more.

Also check to see if it just isnt finding the file but it is on your system in either an oddball place, or possibly in the correct place but for some reason it isnt finding your include path.

Seablade
post #4 of 11
Thread Starter 
I've gotten much further (it was a path issue), I think most of Blender is compiled. I'm getting this error now:
Code:
Code:
Compiling ==> 'buildinfo.c' 
scons: *** Source `/usr/libGL.a' not found, needed by target `/home/bob/build/linux2/bin/blender'.  Stop.


libGL.a is not on my system and I cannot find what package provides it. Thanks seablade, don't worry if you don't have time, i'll figure this godforsaken thing out somehow.
post #5 of 11
Thread Starter 
I got it working, thank god. Finally have blender 2.42 running.
post #6 of 11
For others that may have similar problems, what did you have to do to get it to work?
post #7 of 11
Thats a good question as that path makes no sense. There shouldnt be any files in a properly set up /usr directory, they should be located in a subdirectoy, in this case I believe /usr/lib maybe?

Seablade

Who really needs to set up his powerbook to do Linux style program installs...
post #8 of 11
Thread Starter 
First off, there's a ton of dev libraries that need to be installed. Unfortunately, I didn't write down what they were as I installed them. A lot of them were installed trial by error. Also notice that I have openal and ffmpeg are disabled. Openal appears to be for some kind of 3d audio support and I'm not completely sure the purpose of ffmpeg (other than being mpg support). I'm sure i'll figure out what packages they require soon, but they're not critical for Blender to compile.

Here's my userconfig.py
Code:
LCGDIR = '../lib/linux2'
BF_PYTHON = '/usr'
BF_PYTHON_VERSION = '2.4'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']

WITH_BF_OPENAL = 'false'
BF_OPENAL = '/usr'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'openal'

WITH_BF_SDL = 'true'
BF_SDL = '/usr' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer

WITH_BF_FMOD = 'false'
BF_FMOD = LCGDIR + '/fmod'

WITH_BF_OPENEXR = 'true'
BF_OPENEXR = '/usr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '

WITH_BF_JPEG = 'true'
BF_JPEG = '/usr'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'

WITH_BF_PNG = 'true'
BF_PNG = '/usr'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'

BF_TIFF = '/usr'
BF_TIFF_INC = '${BF_TIFF}/include'

WITH_BF_ZLIB = 'true'
BF_ZLIB = '/usr'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'

WITH_BF_INTERNATIONAL = 'true'

BF_GETTEXT = '/usr'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'gettextlib'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'

WITH_BF_FTGL = 'true'
BF_FTGL = '#extern/bFTGL'
BF_FTGL_INC = '${BF_FTGL}/include'
BF_FTGL_LIB = 'extern_ftgl'

WITH_BF_GAMEENGINE='true'

WITH_BF_ODE = 'false'
BF_ODE = LCGDIR + '/ode'
BF_ODE_INC = BF_ODE + '/include'
BF_ODE_LIB = BF_ODE + '/lib/libode.a'

WITH_BF_BULLET = 'true'
BF_BULLET = '#extern/bullet'
BF_BULLET_INC = '${BF_BULLET}/LinearMath ${BF_BULLET}/BulletDynamics ${BF_BULLET}/Bullet'
BF_BULLET_LIB = 'extern_bullet'

BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'

#WITH_BF_NSPR = 'true'
#BF_NSPR = $(LCGDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB = 

# Uncomment the following line to use Mozilla inplace of netscape
#CPPFLAGS += -DMOZ_NOT_NET
# Location of MOZILLA/Netscape header files...
#BF_MOZILLA = $(LCGDIR)/mozilla
#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
#BF_MOZILLA_LIB =
# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = 'true'

# enable freetype2 support for text objects
BF_FREETYPE = '/usr'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'

WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'

# enable ffmpeg  support
WITH_BF_FFMPEG = 'false'  # -DWITH_FFMPEG
BF_FFMPEG = '/usr'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='$(BF_FFMPEG)/lib'
BF_FFMPEG_LIB = 'avformat avcodec avutil'

# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'true'
BF_OPENGL = '/usr'
BF_OPENGL_INC = '${BF_OPENGL}/share/doc/NVIDIA_GLX-1.0/include'
BF_OPENGL_LIB = 'GL GLU X11 Xi'
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
BF_OPENGL_LIB_STATIC = '${BF_OPENGL}/lib/libGL.a ${BF_OPENGL}/lib/libGLU.a ${BF_OPENGL}/lib/libXxf86vm.a ${BF_OPENGL}/lib/libX11.a ${BF_OPENGL}/lib/libXi.a ${BF_OPENGL}/lib/libXext.a ${BF_OPENGL}/lib/libXxf86vm.a'

##
CC = 'gcc'
CXX = 'g++'
##ifeq ($CPU),alpha)
##   CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -mieee

CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing', '-mmmx', '-msse', '-msse2', '-m3dnow','-march=k8']

CPPFLAGS = ['-DXP_UNIX']
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
#REL_CCFLAGS = ['-O2']
##BF_DEPEND = 'true'
##
##AR = ar
##ARFLAGS = ruv
##ARFLAGSQUIET = ru
##
C_WARN = '-Wall -Wno-char-subscripts'

CC_WARN = '-Wall'

##FIX_STUBS_WARNINGS = -Wno-unused

LLIBS = 'util c m dl pthread stdc++'
##LOPTS = --dynamic
##DYNLDFLAGS = -shared $(LDFLAGS)

BF_PROFILE_FLAGS = ['-pg','-g']
BF_PROFILE = 'false'

BF_DEBUG = 'false'BF_OPENGL_INC
BF_DEBUG_FLAGS = ''

BF_BUILDDIR = '../build/linux2'
BF_INSTALLDIR='../install/linux2'


#Link against pthread
PLATFORM_LINKFLAGS = ['-pthread']
The config is optimized for amd64 systems. I had to change a few of the opengl paths. I still have to do side by side testing with 2.41 to see that everything is working as it should.

EDIT: All of the libraries required were available in synaptic with the usual sources.
post #9 of 11
To see what ffmpeg is used for, see the changenotes for this version in fact

It was just put in and only for linux systems so far, but essentially it gets used for animations I believe upon export.

Seablade
post #10 of 11
Thread Starter 
Well, my config above should be disregarded. It turns out that, because of installing xgl/compiz, I had a really wacky mesa install that screwed a lot of opengl apps up. Some things worked and some didn't. Blender turned out to be one of the things that didn't work.

So my compiled version only works in software mode. I've had to reinstall ubuntu, but I now have my drivers working perfectly. At this point I'm going to recompile blender and hopefully hardware opengl will be used this time. I'll post the libraries I need. I'll also zip up my build for any x64 users that want to give 2.42 a shot.
post #11 of 11
Thread Starter 
Here's my blender amd64 2.42 Nvidia Build:
http://bob.bah.net/mullet/blender2.42-AMD64.tar.gz
(Not sure if an nvidia card is required)

Here's the libraries I needed to install:
Code:
sudo apt-get install build-essential
sudo apt-get install nvidia-glx-dev
sudo apt-get install libjpeg62-dev
sudo apt-get install libtiff4-dev
sudo apt-get install python-dev
sudo apt-get install libsdl1.2-dev
sudo apt-get install libopenexr-dev

You need to install scons too:
Code:
sudo apt-get install scons
Download the source here:http://mirror.cs.umn.edu/blender.org...er-2.42.tar.gz

Here's my latest user-config.py: (needs to reside in the root of your blender source directory)
Code:
LCGDIR = '../lib/linux2'
BF_PYTHON = '/usr'
BF_PYTHON_VERSION = '2.4'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']

WITH_BF_OPENAL = 'false'
BF_OPENAL = '/usr'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'openal'

WITH_BF_SDL = 'true'
BF_SDL = '/usr' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer

WITH_BF_FMOD = 'false'
BF_FMOD = LCGDIR + '/fmod'

WITH_BF_OPENEXR = 'true'
BF_OPENEXR = '/usr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '

WITH_BF_JPEG = 'true'
BF_JPEG = '/usr'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'

WITH_BF_PNG = 'true'
BF_PNG = '/usr'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'

BF_TIFF = '/usr'
BF_TIFF_INC = '${BF_TIFF}/include'

WITH_BF_ZLIB = 'true'
BF_ZLIB = '/usr'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'

WITH_BF_INTERNATIONAL = 'true'

BF_GETTEXT = '/usr'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'gettextlib'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'

WITH_BF_FTGL = 'true'
BF_FTGL = '#extern/bFTGL'
BF_FTGL_INC = '${BF_FTGL}/include'
BF_FTGL_LIB = 'extern_ftgl'

WITH_BF_GAMEENGINE='true'

WITH_BF_ODE = 'false'
BF_ODE = LCGDIR + '/ode'
BF_ODE_INC = BF_ODE + '/include'
BF_ODE_LIB = BF_ODE + '/lib/libode.a'

WITH_BF_BULLET = 'true'
BF_BULLET = '#extern/bullet'
BF_BULLET_INC = '${BF_BULLET}/LinearMath ${BF_BULLET}/BulletDynamics ${BF_BULLET}/Bullet'
BF_BULLET_LIB = 'extern_bullet'

BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'

#WITH_BF_NSPR = 'true'
#BF_NSPR = $(LCGDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB = 

# Uncomment the following line to use Mozilla inplace of netscape
#CPPFLAGS += -DMOZ_NOT_NET
# Location of MOZILLA/Netscape header files...
#BF_MOZILLA = $(LCGDIR)/mozilla
#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
#BF_MOZILLA_LIB =
# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = 'true'

# enable freetype2 support for text objects
BF_FREETYPE = '/usr'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'

WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'

# enable ffmpeg  support
WITH_BF_FFMPEG = 'false'  # -DWITH_FFMPEG
BF_FFMPEG = '/usr'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='$(BF_FFMPEG)/lib'
BF_FFMPEG_LIB = 'avformat avcodec avutil'

# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'false'
BF_OPENGL = '/usr'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIB = 'GL GLU X11 Xi'
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
BF_OPENGL_LIB_STATIC = '${BF_OPENGL}/libGL.a ${BF_OPENGL}/libGLU.a ${BF_OPENGL}/libXxf86vm.a ${BF_OPENGL}/libX11.a ${BF_OPENGL}/libXi.a ${BF_OPENGL}/libXext.a ${BF_OPENGL}/libXxf86vm.a'

##
CC = 'gcc'
CXX = 'g++'
##ifeq ($CPU),alpha)
##   CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -mieee

CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing', '-mmmx', '-msse', '-msse2', '-m3dnow','-march=k8']

CPPFLAGS = ['-DXP_UNIX']
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
##BF_DEPEND = 'true'
##
##AR = ar
##ARFLAGS = ruv
##ARFLAGSQUIET = ru
##
C_WARN = '-Wall -Wno-char-subscripts'

CC_WARN = '-Wall'

##FIX_STUBS_WARNINGS = -Wno-unused

LLIBS = 'util c m dl pthread stdc++'
##LOPTS = --dynamic
##DYNLDFLAGS = -shared $(LDFLAGS)

BF_PROFILE_FLAGS = ['-pg','-g']
BF_PROFILE = 'false'

BF_DEBUG = 'false'
BF_DEBUG_FLAGS = ''

BF_BUILDDIR = '../build/linux2'
BF_INSTALLDIR='../install/linux2'


#Link against pthread
PLATFORM_LINKFLAGS = ['-pthread']

To compile simply go to command line and type 'scons' in the root of the source directory. If you don't create a file called user-config.py and paste in my config it wil use the default linux config, which will not be optimized. If all goes well blender should compile. Also notice my config will create a build directory where blender will reside. I'd move it to opt when you know it works.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux & Other OS's
NotebookForums.com › Forums › General Notebook Discussions › Linux & Other OS's › Issues compiling Blender3d