Blender compile issues

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

stiv
Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv »

The compiler always searches in some standard places like /usr and /usr/include. The messages about skipping incompatible libs sound like warnings rather than errors. Are they stopping the compile?

winfried
Posts: 0
Joined: Mon Dec 06, 2004 2:56 pm

Post by winfried »

Yes, after a reboot blender now links ok (still some of does warnings but they seem indeed harmless).

Very strange, I have no idea why linking stopped before the recompile.

Anyway, I'm happy now :-)

artless
Posts: 0
Joined: Thu May 25, 2006 6:38 pm
Location: france

OPENAL FREEALUT OPENGL step by step

Post by artless »

It's difficult to give a correct explanation. In another language it's worse. It was fine to disable OPENAL and OPENEXR (WITH_BF_OPENAL = 'false' WITH_BF_OPENEXR = 'false'). But there is no benefit on understanding the building process by this shortcut. If it can help someone. I cleaned my cvs-blender tree and start again with a new user-config.py file.
  • # cp blender/config/linux2-config.py user-config.py
Because of "32 bit vs 64 bit problem" I have re-installed an OPENEXR(X86_64). I un-installed (lib64-openal + lib64-openal-devel) libraries. I recompiled them. Then I force to /usr the destination in the command line of ./configure (./configure --prefix=/usr --exec-prefix=/usr ) because /usr/local/lib was empty.
OPENAL ==>
  • user # cd /Where/openal/has/been/downloaded
    user # tar -zxvf openal-0.0.8.tar.gz
    user # cd openal-0.0.8
    user # ./autogen.sh
    user # autoreconf -f
    user # ./configure --prefix=/usr --exec-prefix=/usr
    user # make
    user # su
    ==> root Password
    root $ make install
    ==> Libraries have been installed in: /usr/lib (instead of /usr/local/lib )
    root $ exit
FREEALUT
  • user # cd /Where/freealut/has/been/downloaded
    user # tar -zxvf freealut-1.1.0.tar.gz
    user # cd freealut-1.1.0
    user # ./autogen.sh
    user # autoreconf -f
    user # ./configure --prefix=/usr --exec-prefix=/usr
    user # make
    user # su
    ==> root Password
    root $ make install
    ==> Libraries have been installed in: /usr/lib
    root $ exit
The resulting files were :
  • /usr/include/AL/al*.*
    /usr/lib/pkgconfig/freealut.pc
    /usr/lib/pkgconfig/openal.pc
Then I Try to build blender with scons:
  • user # cd /location/of/cvs-blender/blender
    user # scons
or ( to compile only "buildinfo.c" )
  • user # scons BF_QUICK=buildinfo.c
    ERROR==> /usr/bin/ld: cannot find -l/usr/include/AL
iI's means that the library "AL" was not found on /usr/include by the linker (/usr/bin/ld). Modification of ==> user-config.py
  • BF_OPENAL = '/usr/lib'
    BF_OPENAL_INC = '/usr'
    BF_OPENAL_LIB = '/usr/AL'
Re-Try
  • user # scons BF_QUICK=buildinfo.c
    ERROR==> /usr/bin/ld: cannot find -lGL
it's means that the library "GL" was not found by the linker (/usr/bin/ld). To find the library there are two Choice : first choice
  • search for file : libGL.so.1 ( for instance)
    result :path: /usr/X11R6/lib, /usr/X11R6/lib64
    add the missing path at LD_LIBRARY_PATH ( which is in /etc/profile)
    user# export LD_LIBRARY_PATH=/usr/X11R6/lib64:LD_LIBRARY_PATH
    I haven't tried this case because LD_LIBRARY_PATH seem not to be used by mandriva2006
second choice
  • modifying => user-config.py ( in my case I had to add the lib64 pattern)
    # Mesa Libs should go here if your using them as well....
    WITH_BF_STATICOPENGL = 'false'
    BF_OPENGL = '/usr/X11R6'
    BF_OPENGL_INC = '${BF_OPENGL}/include'
    BF_OPENGL_LIB = 'GL GLU X11 Xi'
    BF_OPENGL_LIBPATH = '/usr/X11R6/lib64'
    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'
Let's try:
  • user # scons BF_QUICK=buildinfo.c
    ==>scons: done building targets.
No problemo !! 8)
  • user # scons
Super ! Let's run ! :D
  • user # /home/artless/cvs-blender/install/linux2/blender
    /home/artless/cvs-blender/install/linux2/blender: error while loading shared libraries: libopenal.so.0: cannot open shared object file: No such file or directory
!!!!! is this library really not in the path for library ?
  • user # /sbin/ldconfig -p
    ==> libopenal is not in the list => /usr/lib/libopenal*.* are the needed files.
    ==> How adding the path to the /usr/lib/libopenal*.* files?
    ==> Add "/usr/lib" to "/etc/ld.so.conf" and run ldconfig.
    user # su
    ===> password
    root # gedit /etc/ld.so.conf
    ===> Add /usr/lib at the end
    root # ldconfig
    root # exit
Let's retry to run !
  • user # /home/artless/cvs-blender/install/linux2/blender
    Looking for installed Python version 2.4
    Loading required GL library /usr/X11R6/lib64/libGL.so.1.2
    Segmentation Fault
:!: What ? Is it a joke ? What am I supposed to do now ? :evil:
Sorry for my bad English : (Mother tongue= French ) Twilight Time Zone

artless
Posts: 0
Joined: Thu May 25, 2006 6:38 pm
Location: france

Loading required GL library /usr/X11R6/lib64/libGL.so.1.2

Post by artless »

It's strange because I have 2 libGL.so.1.2 files :
usr/X11R6/lib/libGL.so.1.2
usr/X11R6/lib64/libGL.so.1.2
Then what is the problem ? Again a 32/64 bit mistake?

What about $ CFLAGS in the user-config.py ? "x86_64-pc-linux-gnu" may a possible value for me.
My PC:( CPU=AMD Sempron(tm) Processor 2800+ 64bits) + (Mandriva2006 x86_64)
Sorry for my bad English : (Mother tongue= French ) Twilight Time Zone

epat
Posts: 0
Joined: Mon Feb 20, 2006 11:43 pm

Post by epat »

A segmentation fault is usually related to a memory access problem(I think). You could try running blender in debug mode but this probably won't give any useful hints as to what's wrong - I'd suggest you post it on the bug tracker if it's not directly related to the compile problems(i.e. you have problems with other 64bit builds too) -epat
'Regret for wasted time is more wasted time.'
- Mason Cooley

stiv
Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv »

A segmentation fault comes from accessing memory that does not belong to you.

Better than posting bugs with a home-brew version of blender is to run it thru the debugger yourself and see where it is crashing.

Lazareus
Posts: 0
Joined: Sun Jul 23, 2006 5:24 am

Post by Lazareus »

I recently had the same problem as you with compiling OpenEXR, with the "can't find ImathVec.h"
What I did to fix it, in the file that includes ImathVec.h, it's listed like this:
#include <ImathVec.h>
Change it to this:
#include "ImathVec.h".

once you get past that, a couple of similar messages occur for other OpenEXR header files, you just do the same thing, change the angle brackets to quotes.

Worked for me. Best of luck.

Post Reply