Shared libraries problem (linux).

(Dan) #21

Well that’s the thing, is that I have Python 2.5 installed, also the python-devel package - the same one that’s listed when I do a search for python.h in the rpm search engine.

I’m using Fedora 7 64bit

Here’s the exact run of errors before the build stops:

Compiling ==> 'buildinfo.c'
Linking program ==> 'blender'
/usr/bin/ld: skipping incompatible /usr/lib/libpython2.5.so when searching for -lpython2.5
/usr/bin/ld: skipping incompatible /usr/lib/libpython2.5.so when searching for -lpython2.5
/usr/bin/ld: skipping incompatible /usr/lib/libpython2.5.so when searching for -lpython2.5
/usr/bin/ld: cannot find -lXi
collect2: ld returned 1 exit status
scons: *** [/storage/blenderfiles/svncheckout/build/linux2/bin/blender] Error 1
scons: building terminated because of errors.

(kidb) #22

Can you post the output of:

   file /usr/lib/libpython2.5.so

. If this is a symbolic link, do the same for the symbolic link, for example:

file /usr/lib/libpython2.5.so.1
(Dan) #23

Ok, here you go:

[[email protected] ~]$ file /usr/lib/libpython2.5.so
/usr/lib/libpython2.5.so: symbolic link to libpython2.5.so.1.0' [[email protected] ~]$ file /usr/lib/libpython2.5.so.1 /usr/lib/libpython2.5.so.1: ERROR: cannot open/usr/lib/libpython2.5.so.1’ (No such file or directory)
[[email protected] ~]$

(kidb) #24

Try file /usr/lib/libpython2.5.so.1.0 because

 /usr/lib/libpython2.5.so: symbolic link to `libpython2.5.so.1.0'
(Dan) #25

Woops, didn’t see that extra 0

Here’s the feedback:

/usr/lib/libpython2.5.so.1.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped

(kidb) #26

And you are running Fedora 64 bit? You should try to install the python2.5 binary package for the 64bit Fedora. They are named x86_64. Something like:

http://rpm.pbone.net/index.php3/stat/4/idpl/4794663/com/python-2.5-12.fc7.x86_64.rpm.html

(Dan) #27

Yep, that is the funny thing. I have Python installed, and also Python-devel. Even installed a couple other python-libs, but still no success.

(Mmph!) #28

the newest fedora has python bits of 2.3, 2.4, and all of 2.5.

You might get better help on the Fedora IRC channel.

(kidb) #29

You did not install python for x86_64 architecture. (Sorry)
You are running Fedora 7 64 Bit, which is a x86_64 architecure, build for processors with an 64bit extension.

 /usr/lib/libpython2.5.so.1.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped

says clearly that this library is compiled for a 32-bit system. Is there a /usr/lib64 directory?

Edit:
The libpython2.5.so is in the /usr/lib64 directory. Maybe you should set the path in the user-config.py for your python libs to /usr/lib64.


BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'

to


BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib64/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'

cp config/linux2-config.py ./user-config.py

If this doesn’t work follow Mmph advise.

(Dan) #30

Yep, I have a python2.5 directory in /usr/lib64. There’s 4331 files in it and it takes up 67.7 mb of space :wink:

python and python-devel 64 bit packages are installed.

Edit: Interesting, so it’s looking in the 32bit folder instead of the 64bit folder. That’s quite intriguing. Ok, so I assume I need to unhash that line in order to get it to be read by the compiler… When I do however, I get an invalid syntax error. Ah well, at least I’m getting somewhere now.

(kidb) #31

Yes, my fault, did you try changing the path to the python libs? If this should work, you need th[B]e libXi-devel and libXi packages.

[/B]From your post: /usr/bin/ld: cannot find -lXi

(Dan) #32

i did try changing the path, but it still looked in /lib instead of /lib64. The line with the new path has a # in front - does that mean its not being read? When I removed the hash I got a syntax error though… I’ll install those other libs now.

Edit. Now I get this after installing LibXi… I guess it’s looking for the 32bit libs as well… Is there a line in my user-config that I can set so that the compiler is definitely only building for 64bit?

Linking program ==> 'blender'
/usr/bin/ld: skipping incompatible /usr/lib/libpython2.5.so when searching for -lpython2.5
/usr/bin/ld: skipping incompatible /usr/lib/libpython2.5.so when searching for -lpython2.5
/usr/bin/ld: skipping incompatible /usr/lib/libpython2.5.so when searching for -lpython2.5
/usr/bin/ld: skipping incompatible /usr/lib/libXi.so when searching for -lXi
/usr/bin/ld: skipping incompatible /usr/lib/libXi.so when searching for -lXi
/usr/bin/ld: skipping incompatible /usr/lib/libXi.so when searching for -lXi
Install file: "/storage/blenderfiles/svncheckout/build/linux2/bin/blender" as "/storage/blenderfiles/svncheckout/install/linux2/blender"
scons: done building targets.

(kidb) #33

The solution is have the linker ld to search for the libraries in /usr/lib64, but I do not know how to do it. I am searching for a solution. Your compile finished and you have a blender binary but with no python. The Xinput library is for tablets. For the python problem you could try to use scons with BF_PYTHON_LIBPATH=’/usr/lib64’. If you do not need the Xinput libaries try:
BF_OPENGL_LIB=‘GL GLU X11’

scons BF_PYTHON_LIBPATH='/usr/lib64' BF_OPENGL_LIB='GL GLU X11'

scons --help shows the settings for libraries and paths and stuff. If you want to make optimized builds look for the CFLAGS, CCFLAGS, REL_CFLAGS and REL_CCFLAGS options.

(Dan) #34

I did that exact scons command and this is what I got:

Linking program ==> 'blender'
/usr/bin/ld: skipping incompatible /usr/lib/libpython2.5.so when searching for -lpython2.5
/storage/blenderfiles/svncheckout/build/linux2/lib/libbf_ghost.a(GHOST_WindowX11.o): In function `GHOST_WindowX11::initXInputDevices()':
GHOST_WindowX11.cpp:(.text+0x88b): undefined reference to `XGetExtensionVersion'
GHOST_WindowX11.cpp:(.text+0x8c0): undefined reference to `XListInputDevices'
GHOST_WindowX11.cpp:(.text+0x95b): undefined reference to `XOpenDevice'
GHOST_WindowX11.cpp:(.text+0x9ba): undefined reference to `XFreeDeviceList'
GHOST_WindowX11.cpp:(.text+0xc52): undefined reference to `XSelectExtensionEvent'
GHOST_WindowX11.cpp:(.text+0xc72): undefined reference to `XOpenDevice'
collect2: ld returned 1 exit status
scons: *** [/storage/blenderfiles/svncheckout/build/linux2/bin/blender] Error 1
scons: building terminated because of errors.

It still seems to have skipped Python, even though I defined the path for the libs.

(Skottish) #35

If your Python directory is /usr/lib64/python2.5, then try this in the same terminal window you are building from:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/python2.5

You just need to know the Python directory name if it’s different than python2.5.

(Dan) #36

Ok, I typed that in, entered it, and then rans scons again, but I still got the same error, skipping python.

(Skottish) #37

Here’s yet another shot. From Arch’s PKGBUILD file:

export NAN_PYTHON_VERSION=2.5
(kidb) #38

OK, next try. Forget about the BF_OPENGL_LIB.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/
because the libpython2.5.so is in /usr/lib64
scons

(Dan) #39

No on both counts I’m afraid, the output is still:

Linking program ==> 'blender'
/usr/bin/ld: skipping incompatible /usr/lib/libpython2.5.so when searching for -lpython2.5
/usr/bin/ld: skipping incompatible /usr/lib/libpython2.5.so when searching for -lpython2.5
/usr/bin/ld: skipping incompatible /usr/lib/libpython2.5.so when searching for -lpython2.5
/usr/bin/ld: skipping incompatible /usr/lib/libXi.so when searching for -lXi
/usr/bin/ld: skipping incompatible /usr/lib/libXi.so when searching for -lXi
/usr/bin/ld: skipping incompatible /usr/lib/libXi.so when searching for -lXi
Install file: "/storage/blenderfiles/svncheckout/build/linux2/bin/blender" as "/storage/blenderfiles/svncheckout/install/linux2/blender"
scons: done building targets.

So its still looking in /lib instead of /lib64.

(kidb) #40

Hmm, did you run blender? there is a blender binary in"/storage/blenderfiles/svncheckout/install/linux2/blender" Does this work? It builds with NO errors. [ORACLE]Maybe the output says: “skipping incompatible library because i already found the right one” ?[/ORACLE]