Link against .so instead of .la when using ./configure

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
esuvs
Posts: 11
Joined: Mon Nov 11, 2002 2:03 am

Link against .so instead of .la when using ./configure

Post by esuvs » Thu Nov 27, 2003 10:10 pm

Hi,

I have now managed to build blender using the NAN scripts (which means I'll start looking at the sourcecode soon!), but am still having no luck with the autoconf system.

It falls over here:

Code: Select all

/bin/sh ./libtool --mode=link gcc  -funsigned-char   -o blender -L/usr/lib/python2.3/config -Xlinker -export-dynamic   source/libblender_source.la intern/bsp/libblender_BSP.la intern/decimation/libblender_LOD.la intern/ghost/libblender_GHOST.la intern/string/libblender_STR.la intern/guardedalloc/libblender_guardedalloc.la intern/bmfont/libblender_BMF.la intern/container/libblender_CTR.la intern/memutil/libblender_MEM.la intern/iksolver/libblender_IK.la intern/moto/libblender_MT.la intern/SoundSystem/libsoundsystem.la -lpython2.3 -lm    -lGLU -lGL -lX11 -lXext -lutil -ldl -lstdc++ -lSDL -ljpeg -lpng -lpthread -lz  -L/usr/lib -lSDL -lpthread
mkdir .libs
libtool: link: cannot find the library `/usr/X11R6/lib/libGL.la'
gmake[2]: *** [blender] Error 1
gmake[2]: Leaving directory `/home/david/configure-blender/blender-2.30'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/david/configure-blender/blender-2.30'
make: *** [all] Error 2
It's true that `/usr/X11R6/lib/libGL.la' doesn't exist, instead I would like it to link against '/usr/lib/libGL.so'. How do I tell it to use the dynamic library instead of the static one? Using './configure --libdir=/usr/' didn't seem to help.

Thanks,

David.

z3r0_d
Posts: 289
Joined: Wed Oct 16, 2002 2:38 am
Contact:

Post by z3r0_d » Sat Nov 29, 2003 2:16 am

things I have done:

try building with the original makefiles, if this means you need to download the source try it.

I had to change the .a to .so once, but I don't remember having to when I didn't use configure.

the makefiles are in blender/source iirc, a few of them have platform specfic areas in which lies likely that option.

(can't really explain it better, not my forte)

alien-xmp
Posts: 0
Joined: Sun Apr 06, 2003 2:22 pm
Location: Wellington, New Zealand
Contact:

Post by alien-xmp » Sat Nov 29, 2003 2:30 am

Since /usr/lib is a standard library dir, configure should be able to find libGL if it is there. (My libGL is in /usr/lib)

Check that: /usr/lib/libGL.so actually exists.
Check config.log to see what configure's GL test did. (Search for: "checking for glIsTexture in -lGL"

M-M
Posts: 8
Joined: Wed Oct 16, 2002 1:08 am

Post by M-M » Sat Nov 29, 2003 2:40 am

You need to install the devel packages for glib, glib2, glibc and for all the libraies which are needed by blender.

zaz
Posts: 0
Joined: Mon Dec 01, 2003 5:44 am

Post by zaz » Mon Dec 01, 2003 5:50 am

It looks like you're building under linux and probably with NVIDIA drivers installed. Under SuSE 8.2 with the last few official releases of the NVIDIA drivers, you'll find that the libGL.la files are removed by the NVIDIA driver and not replaced. Its probably the same with other linux releases as well.

Here's a copy of the libGL.la I cobbled together for my release, your mileage may vary depending on your linux distro and other factors, but something close to what I have below should help you out.

Code: Select all

# libGL.la - a libtool library file
# Generated by ltmain.sh - GNU libtool 1.4 (1.920 2001/04/24 23:26:18)
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
 
# The name that we can dlopen(3).
dlname='libGL.so.1'
 
# Names of this library.
library_names='libGL.so.4496 libGL.so.1 libGL.so'
 
# The name of the static archive.
old_library=''
 
# Libraries that this one depends upon.
dependency_libs=' -L/usr/X11R6/lib -lm -lX11 -lXext -ldl     '
 
# Version information for libGL.
current=1
age=0
revision=4496
 
# Is this an already installed library?
installed=yes
 
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
 
# Directory that this library needs to be installed in:
libdir='/usr/lib'

Michel
Posts: 180
Joined: Wed Oct 16, 2002 7:27 pm
Location: Somewhere below the rivers in Holland (but not Limburg)

Post by Michel » Mon Dec 01, 2003 8:21 am

M-M wrote:You need to install the devel packages for glib, glib2, glibc and for all the libraies which are needed by blender.
Hi,

glibc is default on everybody's system, otherwise you wouldn't be able to run anything at all - including the Linux Kernel :lol:
For a couple of distributions (redhat, mandrake, suse, ...) you need to install the development packages of glibc though.

The other two libraries: glib and glib2 are not needed by blender.
For OpenGL to work, you need the development packages of XFree (and maybe - but I'm not sure - the development packages of Mesa).

With regards,
Michel
You can have one of two things: Progress or Progress Reports.

Nightrider
Posts: 1
Joined: Wed Oct 16, 2002 12:38 am
Location: Sweden

Post by Nightrider » Fri Jan 02, 2004 12:10 am

I tried today to compile cvs and got same error as esuvs had.
Using RedHat 9 and had all the libs and devels you talking about and using Nvidia's drivers.
After a while I tried to remove libGL.la from /usr/lib and it compiled!
The libGL.so is there and had no errors in config.log about GL.

But I have really strange effects in my pics, but I think that's another story.

Post Reply