math/grace port: "libXcursor.so.1.0" not found ?? [SOLVED]

Rob spamrefuse at yahoo.com
Thu Oct 27 22:54:23 PDT 2005



--- Igor Robul <igorr at speechpro.com> wrote:

> Rob wrote:
> 
> >-----------------------------------
> >   XtAppContext app_con;
> >   Display *disp = NULL;
> >   char *display_name = NULL;
> >
> >   XtSetLanguageProc(NULL, NULL, NULL); 
> >   XtToolkitInitialize();
> >   app_con = XtCreateApplicationContext();
> >
> >   disp = XOpenDisplay(display_name);
> >-----------------------------------
> >
> >(I have simplified this code snippet a bit, for
> >this example; also, grace uses Motif for its GUI).
> >
> >Before the XOpenDisplay() call, dlerror() does
> >not have the error-indicator set, but after
> >that call, it has.
> >  
> >
> I  wrote simple program to test XOpenDisplay +
> dlopen:
> 
> #include <X11/Xlib.h>
> #include <dlfcn.h>
> #include <stdio.h>
> 
> main(int argc, char **argv)
> {
>         Display *d;
>         void *handle;
>         void *f;
>         char *err;
> 
>         if ((err=dlerror()) != NULL) {
>                 fprintf(stderr,"dlerror: %s\n",
> err);
>                 exit(1);
>         }
> 
>         d = XOpenDisplay(NULL);
>         if (d == NULL) {
>                 fprintf(stderr, "Error in
> XOpenDisplay\n");
>                 exit(1);
>         }
> 
>         if ((err=dlerror()) != NULL) {
>                 fprintf(stderr, "dlerror: %s\n",
err);
>                 exit(1);
>         }
> 
>         XCloseDisplay(d);
> 
>         handle = dlopen(argv[1], RTLD_NOW);
>         if (handle == NULL) {
>                 fprintf(stderr, "dlopen: %s\n",
dlerror());
>                 exit(1);
>         }
> 
>         f = dlsym(handle, argv[2]);
>         if (f == NULL) {
>                 fprintf(stderr, "dlsym: %s\n",
dlerror());
>                 exit(1);
>         }
> 
>         dlclose(handle);
> }
> 
> Compile it with
> gcc -o t t.c -I /usr/X11R6/include -L /usr/X11R6/lib
> -lX11
> 
> Then test with:
> ./t /usr/lib/libm.so pow
> 
> Then
> ./t /usr/lib/libm.so pow33
> dlsym: Undefined symbol "pow33"
> 
> So as you can see on my system all looks good. Try
> it on your system.
>

First:
NULL return from dlsym() does not always imply an
error. dlsym() can return NULL because it has an
empty list, but this does not set the error
indicator of dlerror(), because it is not an error.
However, if an error occurs, dlsym() has NULL as
a return (that's probably most sensible return).


Second:
I get different output than you, from this part
of the program:
 
 d = XOpenDisplay(NULL);
 if (d == NULL) {
  fprintf(stderr, "Error in XOpenDisplay\n");
  exit(1);
 }

 if ((err=(char *)dlerror()) != NULL) {
  fprintf(stderr, "dlerror: %s\n", err);
  exit(1);
 }

I get here:
dlerror: Shared object "nss_dns.so.1" not found,
 required by "t"

So apparently dlerror() is set by XOpenDisplay().

Hmmm....yesterday I updated my world and kernel
to most recent 5-Stable, and after that I
recompiled all my ports. Still get this problem!

This is my /etc/make.conf:
-----------------------
CFLAGS= -O -pipe
NOPROFILE=true
NO_PF=true

CUPS_OVERWRITE_BASE=yes
NO_LPR=yes

WITHOUT_NLS=yes
WITHOUT_XFT=yes
DOC_LANG=en_US.ISO8859-1
WITH_ASPELL=yes
WITH_GTK2=yes
WITH_GIMP=yes
A4=yes

WITH_X11=yes

# added by use.perl 2005-10-26 14:20:09
PERL_VER=5.8.7
PERL_VERSION=5.8.7
-----------------------

Does that cause any problems?

Rob.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the freebsd-questions mailing list