Re: Building ab initio



On Tue, Jun 23, 1998 at 10:27:36AM -0600, Nathan Torkington wrote:
Nat> [[snip!]]
Nat> My current problem is in building gnome-libs:
Nat> 
Nat> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I./.. -I/usr/local/include -DNEED_GNOMESUPPORT_H -I../support -I../support -I/usr/local/lib/glib/include -I/usr/X11R6/include -I/usr/local/lib/glib/include -I/usr/local/include -DGNOMELIBDIR=\"/usr/local/lib\" -DGNOMEDATADIR=\"/usr/local/share\" -DGNOMEBINDIR=\"/usr/local/bin\" -DGNOMELOCALSTATEDIR=\"/usr/local/var\" -DGNOMELOCALEDIR=\"/usr/local/share/locale\" -I../intl -I../intl -I/usr/local/lib/glib/include -I/usr/X11R6/include -I/usr/local/lib/glib/include -I/usr/local/include -g -O2 -Wp,-MD,.deps/gnome-dl.p -c -fPIC -DPIC gnome-dl.c
Nat> gnome-dl.c:41: #error what is RTLD_NOW supposed to be?
Nat> gmake[2]: *** [gnome-dl.lo] Error 1
Nat> gmake[2]: Leaving directory `/u/frii/src/gnat/gnome/gnome-libs/libgnome'
Nat> gmake[1]: *** [all-recursive] Error 1
Nat> gmake[1]: Leaving directory `/u/frii/src/gnat/gnome/gnome-libs'
Nat> gmake: *** [all-recursive-am] Error 2
Nat> gnat@coprolith (gnome-libs) 
Nat> 
Nat> Any ideas?

$ man dlopen

DLOPEN(3)           Linux Programmer's Manual           DLOPEN(3)


NAME
       dlclose, dlerror, dlopen, dlsym - Programming interface to
       dynamic linking loader.
	      
SYNOPSIS
       #include <dlfcn.h>
		     
       void *dlopen (const char *filename, int flag);
[[snip!]]
       flag must be either RTLD_LAZY, meaning  resolve  undefined
       symbols  as  code from the dynamic library is executed, or
       RTLD_NOW, meaning resolve  all  undefined  symbols  before
       dlopen  returns, and fail if this cannot be done.  Option­
       ally, RTLD_GLOBAL may be or'ed with flag,  in  which  case
       the  external  symbols defined in the library will be made
       available to subsequently loaded libraries.
[[snip!]]

$ cat /usr/include/dlfcn.h
[[snip!]]
/* The MODE argument to dlopen' contains one of the following: */
#define RTLD_LAZY       0x001   /* Lazy function call binding.  */
#define RTLD_NOW        0x002   /* Immediate function call binding.  */
[[snip!]]

You need a modern dlopen implementation to get this functionality.  IIRC,
when I was using slackware a few years ago I had this problem, and persuaded
the compile to work by adding CPPFLAGS='-DRTLD_NOW=2' to the Makefile.  YMMV.

The real fix would be to update your ld.so and/or libc some to get support for
symbol binding time control in the dynamic loader.

Cheers,
	Gary V. Vaughan.

-- 
  ___              _   ___   __              _             
 / __|__ _ _ ___ _| | / / | / /_ _ _  _ __ _| |_  __ _ ___ 
| (_ / _` | '_|// / |/ /| |/ / _` | || / _` | ' \/ _` | _ \
 \___\__,_|_|\_, /|___(_)___/\__,_|\_,_\__, |_||_\__,_|//_/
PGP Key from/___/                      /___/               
http://www.cl.cam.ac.uk/PGP/pks-commands.html#extract      
http://pgp.ai.mit.edu/~bal/pks-commands.html#extract       

PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]