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

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
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


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/ intern/bsp/ intern/decimation/ intern/ghost/ intern/string/ intern/guardedalloc/ intern/bmfont/ intern/container/ intern/memutil/ intern/iksolver/ intern/moto/ intern/SoundSystem/ -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/'
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/' doesn't exist, instead I would like it to link against '/usr/lib/'. How do I tell it to use the dynamic library instead of the static one? Using './configure --libdir=/usr/' didn't seem to help.



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

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)

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

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/ actually exists.
Check config.log to see what configure's GL test did. (Search for: "checking for glIsTexture in -lGL"

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.

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 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 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

# - a libtool library file
# Generated by - 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).
# Names of this library.
# The name of the static archive.
# Libraries that this one depends upon.
dependency_libs=' -L/usr/X11R6/lib -lm -lX11 -lXext -ldl     '
# Version information for libGL.
# Is this an already installed library?
# Files to dlopen/dlpreopen
# Directory that this library needs to be installed in:

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.

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,
You can have one of two things: Progress or Progress Reports.

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 from /usr/lib and it compiled!
The 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