bug-libtool
[Top][All Lists]
Advanced

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

Re: Error reporting should be improved


From: Bob Friesenhahn
Subject: Re: Error reporting should be improved
Date: Tue, 29 Dec 2009 18:49:22 -0600 (CST)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

I instrumented vm_sym (and friends) like this:

static void *
vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
{
  void *address = dlsym (module, name);

  if (!address)
    {
      DL__SETERROR (SYMBOL_NOT_FOUND);
      fprintf(stderr,"dlsym: %s\n",lt__get_last_error());
    }

  return address;
}

and tested with GraphicsMagick.  The output on "success" looks like:

dlsym: ld.so.1: gm: fatal: tiff_LTX_RegisterTIFFImage: can't find symbol
dlsym: ld.so.1: gm: fatal: tiff_LTX_UnregisterTIFFImage: can't find symbol
dlsym: ld.so.1: gm: fatal: logo_LTX_RegisterLOGOImage: can't find symbol
dlsym: ld.so.1: gm: fatal: logo_LTX_UnregisterLOGOImage: can't find symbol
dlsym: ld.so.1: gm: fatal: gif_LTX_RegisterGIFImage: can't find symbol
dlsym: ld.so.1: gm: fatal: gif_LTX_UnregisterGIFImage: can't find symbol

and on failure (by moving libjpeg, which libtiff depends on to cause an error while loading the tiff module) it looks like:

dlopen: ld.so.1: gm: fatal: libjpeg.so.7: open failed: No such file or directory
dlopen: ld.so.1: gm: fatal: 
/home/bfriesen/build/GraphicsMagick-16-modules/coders/tiff.so: open failed: No 
such file or directory
dlopen: ld.so.1: gm: fatal: libjpeg.so.7: open failed: No such file or directory
dlopen: ld.so.1: gm: fatal: 
/home/bfriesen/build/GraphicsMagick-16-modules/coders/tiff.so: open failed: No 
such file or directory
dlsym: ld.so.1: gm: fatal: logo_LTX_RegisterLOGOImage: can't find symbol
dlsym: ld.so.1: gm: fatal: logo_LTX_UnregisterLOGOImage: can't find symbol
dlsym: ld.so.1: gm: fatal: gif_LTX_RegisterGIFImage: can't find symbol
dlsym: ld.so.1: gm: fatal: gif_LTX_UnregisterGIFImage: can't find symbol
/home/bfriesen/build/GraphicsMagick-16-modules/utilities/.libs/gm convert: Unable to load 
module ("/home/bfriesen/build/GraphicsMagick-16-modules/coders/tiff.la: file not 
found") [No such file or directory].

The approach of passing preloader symbols to all of the loaders seems oddly familiar.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]