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

2005-10-28 Thread Rob


--- Igor Robul [EMAIL PROTECTED] wrote:

 Rob wrote:
 
 --- Igor Robul [EMAIL PROTECTED] wrote:
   
 
 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).
   
 
  From manual page:
 
 The dlsym() function returns a null pointer if the
 symbol cannot be 
 found, and sets an error condition
  which may be queried with dlerror().

This is a matter of symantic and logic.

I /can/ read this as follows:

If the symbol cannot be found, then dlsym() returns
a null pointer *AND* sets the error condition.

However, dlsym() can also return the null pointer,
*WITHOUT* setting the error condition. The latter
case seems to be better specified in the Linux
manpages of dlsym(). Hence the conflict between
FreeBSD and Linux/Grace, I guess.

Rob.





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


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

2005-10-28 Thread Rob


--- Igor Robul [EMAIL PROTECTED] wrote:

 Rob wrote:
 
 
 The dlsym() function returns a null pointer if the
 symbol cannot be 
 found, and sets an error condition
  which may be queried with dlerror().
 
 
 
 This is a matter of symantic and logic.
 
 I /can/ read this as follows:
 
 If the symbol cannot be found, then dlsym() returns
 a null pointer *AND* sets the error condition.
   
 
 Ok, English is not my native language, and I even
 had not learned it in 
 school :-).

Neither is it for me, though I had some English
language classes at high school.
However, I assume everybody to understand the
language of logic and symantics when it comes to
computer problems :).

 However, dlsym() can also return the null pointer,
 *WITHOUT* setting the error condition. The latter
 case seems to be better specified in the Linux
 manpages of dlsym(). Hence the conflict between
 FreeBSD and Linux/Grace, I guess.
   
 
 Maybe. But I see conflict in using
 previous/non-grace result from dlerror(), which
 I think grace should not do.

Indeed, so the proper way is to call dlerror()
prior to a dlsym() call, to reset any previous
error condition. Something like this:

  /* clear error condition */
  dlerror();

  /* use dlsym and check for error */
  data = dlsym();
  if ( (error = dlerror()) != NULL ) {
  errmsg(error);
  return FAILURE;
  }


Rob.




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


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

2005-10-27 Thread Rob
--- Igor Robul [EMAIL PROTECTED] wrote:

 %mkdir 
 %cd /
 %cat ~/.grace/gracerc.user
 USE pow TYPE f_of_dd FROM /usr/lib/libm.so
 %ls
 %xmgrace
 %

OK, great.

Meanwhile, I came closer to the real problem.
You don't need to create the link in /usr/X11R6/lib.

The problem is dlerror(). Whenever one of the
dl-functions is called, it will set the error
indicator in dlerror() in case of problems.

For some unclear reason, the error indicator in
dlerror is set when grace starts-up. I don't
know why yet (I'll discuss that with the grace
mailing list).

When grace uses the dl-functions in src/dlmodule.c,
which is caused by the USE... lines in
gracerc.user, something like this happens:

   dlopen(library name, MODE);
   if (dlerror() != NULL) {
  report_error();
  exit(1);
   }

Now, dlerror() is set, but not by dlopen(), but
by some other part at start-up. A workaround is
following:

   /* reset any possible earlier error */
   dlerror();

   dlopen(library name, MODE);
   if (dlerror() != NULL) {
  report_error();
  exit(1);
   }

When I patch grace with this dummy dlerror(),
prior to the dl-function calls, all works like
a charm (and you don't need the link in
/usr/X11R6/lib anymore).

As I said before, I now have to find out why
grace activates the dlerror() at start-up.

Regards,
Rob.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


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

2005-10-27 Thread Rob

--- Igor Robul [EMAIL PROTECTED] wrote:

 Rob wrote:
 
 
 When I patch grace with this dummy dlerror(),
 prior to the dl-function calls, all works like
 a charm (and you don't need the link in
 /usr/X11R6/lib anymore).
 
 As I said before, I now have to find out why
 grace activates the dlerror() at start-up.
   
 
 So, problem is on grace side, not on FreeBSD side.
 I think there are some differences in execution
 environment for grace on Linux and FreeBSD.

Then we have to tell the grace developper, who
is a devote Linux user, about the oddities on
FreeBSD, or we have to come up with a reasonable
patch to make it work properly on FreeBSD.

Meanwhile I digged a little deeper in the grace
source code, to find out at what place exactly
the dlerror() error-indicator is set. When
grace initializes its GUI, there is this kind
of code:

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

Is this where Linux and FreeBSD are out-of-sync?
Or does Grace something wrong here, or is this
a problem cause by FreeBSD or Xorg?

I feel I'm getting closer and closer, but still
I have not really a good idea of what's going on
here!

Thanks,
Rob.





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


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

2005-10-27 Thread Igor Robul

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.

Is this where Linux and FreeBSD are out-of-sync?
Or does Grace something wrong here, or is this
a problem cause by FreeBSD or Xorg?

 

I think, that when XOpenDisplay called, ld.so tries load some libraries 
from preconfigured paths, and

last unsuccessful attempt is recorded for dlerror().

dlopen() _does not_ reset dlerror() state on sucess, it just returns non 
NULL. So you must not check dlerror() for error condition, you need 
check return result of dlopen(), and if it is NULL, then you need use 
dlerror().


So, code in grace:

  dlopen(library name, MODE);
  if (dlerror() != NULL) {
 report_error();
 exit(1);


  }


need to be:

handle = dlopen(library name, MODE);
if (handle == NULL) {  
   report_error(dlerror());


 exit(1);

}

just because dlerror() != NULL is not indicator of error.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


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

2005-10-27 Thread Igor Robul

Igor Robul wrote:

dlopen() _does not_ reset dlerror() state on sucess, it just returns 
non NULL. So you must not check dlerror() for error condition, you 
need check return result of dlopen(), and if it is NULL, then you need 
use dlerror().


So, code in grace:

  dlopen(library name, MODE);
  if (dlerror() != NULL) {
 report_error();
 exit(1);


Actual code in grace is:

newkey.data = dlsym(handle, dl_function);
   if ((error = (char *) dlerror()) != NULL) {
   errmsg(error);
   dlclose(handle);
   return RETURN_FAILURE;
   }

But I think it is needed to be something like (I dont know if they need 
error variable later):


newkey.data = dlsym(handle, dl_function);
   if (  newkey.data == NULL) {
   errmsg(error=dlerror());
   dlclose(handle);
   return RETURN_FAILURE;
   }


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


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

2005-10-27 Thread Igor Robul

Sorry,
I have reread manual page for dlerror() and found that it need clear 
error state after call, but

dlerror() in src/libc/gen/dlfcn.c does not do this:

#pragma weak dlerror
const char *
dlerror(void)
{
   return sorry;
}

So error is in FreeBSD libc, if I understand this correctly. I'll do PR.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


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

2005-10-27 Thread Igor Robul

Igor Robul wrote:


Sorry,
I have reread manual page for dlerror() and found that it need clear 
error state after call, but

dlerror() in src/libc/gen/dlfcn.c does not do this:

#pragma weak dlerror
const char *
dlerror(void)
{
   return sorry;
}

So error is in FreeBSD libc, if I understand this correctly. I'll do PR.


Bad day for me :-(.

Above code is from src/libc/gen/dlfcn.c, but real dlerror for dynamicaly 
linked executables is in rtdl.c, and it works as described in  manual 
page (clears error status).


So problem is somewhere else. Sorry for false info.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ?? [FBSD/Xorg error?]

2005-10-27 Thread Rob


--- Igor Robul [EMAIL PROTECTED] 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.
 
 Is this where Linux and FreeBSD are out-of-sync?
 Or does Grace something wrong here, or is this
 a problem cause by FreeBSD or Xorg?

 I think, that when XOpenDisplay called, ld.so tries
 load some libraries 
 from preconfigured paths, and
 last unsuccessful attempt is recorded for dlerror().

Here is the two points response from the grace
mailinglist:


1. Because XOpenDisplay() causes dlerror() to be
   set:
   One of the FreeBSD X libraries is broken,
   calling an inexisting libXcursor.so.1.0.

2. The FreeBSD dynamic loader is broken, ignoring
   unresolved references in DLLs both at
   initialization and run time.


So is the libX11.so.6 on FreeBSD (or another) to be
blamed?

Or is something more fundamentally wrong with
FreeBSD?

Rob.




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ?? [FBSD/Xorg error?]

2005-10-27 Thread Kris Kennaway
On Thu, Oct 27, 2005 at 04:00:55AM -0700, Rob wrote:

 Here is the two points response from the grace
 mailinglist:
 
 
 1. Because XOpenDisplay() causes dlerror() to be
set:
One of the FreeBSD X libraries is broken,
calling an inexisting libXcursor.so.1.0.
 
 2. The FreeBSD dynamic loader is broken, ignoring
unresolved references in DLLs both at
initialization and run time.
 
 
 So is the libX11.so.6 on FreeBSD (or another) to be
 blamed?

Talk to the xorg maintainers ([EMAIL PROTECTED]).  I suspect there are
two problems: the libXcursor.so.1.0.2 reference in the x library,
which should not be there, and a bug in xmgrace for not correctly
handling dlerror(), as Igor has been explaining.  xmgrace should be
robust enough to handle the case of some other application having
failed to dlopen() something, instead of assuming it has perfect
knowledge of the program state.

Kris


pgpGUjiJQWuO3.pgp
Description: PGP signature


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

2005-10-27 Thread Rob


--- Igor Robul [EMAIL PROTECTED] 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().

Hmmmyesterday 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 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Kris Kennaway
On Tue, Oct 25, 2005 at 08:41:33PM -0700, Rob wrote:
 
 Hi,
 
 I'm running FreeBSD 5-Stable.
 
 I only seem to encounter this problem with the
 math/graphical port 'grace', and the dlopen()
 call inthere.

I answered this question the last time you posted it.

Kris

pgpWpj2IXipZT.pgp
Description: PGP signature


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Rob


--- Kris Kennaway [EMAIL PROTECTED] wrote:

 On Tue, Oct 25, 2005 at 08:41:33PM -0700, Rob wrote:
  
  I'm running FreeBSD 5-Stable.
  
  I only seem to encounter this problem with the
  math/graphical port 'grace', and the dlopen()
  call inthere.
 
 I answered this question the last time you posted
 it.

Yes, indeed. Thank you. You said:
  Sounds like the application is broken for
   requesting it, since as you found there is
   no such library on FreeBSD.

Here the application refers to what?
Grace? Or dlopen()?

If you mean grace, then I have a problem:
the grace mailinglist blames FreeBSD, and
here grace is blamed. Argh!

I am the only FreeBSD user on the Grace mailinglist.
Apparently the dlopen() call in grace works fine
on Linux and others. But not with FreeBSD.

Is there something fishy or tricky about the
dlopen() call on FreeBSD, when compared to,
for example, Linux?

Grace runs fine on FreeBSD, until I use it such
that it does the 'dlopen()' call.

I am at a total loss here

How can I further analyse this problem?

Thanks,
Rob.




__ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Kris Kennaway
On Wed, Oct 26, 2005 at 01:16:46AM -0700, Rob wrote:
 
 
 --- Kris Kennaway [EMAIL PROTECTED] wrote:
 
  On Tue, Oct 25, 2005 at 08:41:33PM -0700, Rob wrote:
   
   I'm running FreeBSD 5-Stable.
   
   I only seem to encounter this problem with the
   math/graphical port 'grace', and the dlopen()
   call inthere.
  
  I answered this question the last time you posted
  it.
 
 Yes, indeed. Thank you. You said:
   Sounds like the application is broken for
requesting it, since as you found there is
no such library on FreeBSD.
 
 Here the application refers to what?
 Grace? Or dlopen()?

The former.

 If you mean grace, then I have a problem:
 the grace mailinglist blames FreeBSD, and
 here grace is blamed. Argh!

It's quite obvious that FreeBSD doesn't include the library that grace
is asking for, because *NO* FreeBSD libraries use the form
libfoo.so.x.y (they're all libfoo.so.x).

kKris

pgp4h1HLg8B8O.pgp
Description: PGP signature


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Igor Robul

Hi,

Rob wrote:

 


Yes, indeed. Thank you. You said:
 Sounds like the application is broken for
  requesting it, since as you found there is
  no such library on FreeBSD.

Here the application refers to what?
Grace? Or dlopen()?

If you mean grace, then I have a problem:
the grace mailinglist blames FreeBSD, and
here grace is blamed. Argh!
 

What are you trying to do with xmgrace? I' asking because I have just 
installed math/grace and it

at least can be launched on my system without trouble.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Pete French
 I am the only FreeBSD user on the Grace mailinglist.
 Apparently the dlopen() call in grace works fine
 on Linux and others. But not with FreeBSD.

This is not a problem with the dlopen call *or* freebsd - the
problem is that it is asking for a library 'libXcursor.so.1.0'
which does not exist on FreeBSD. There is a 'libXcursor.so.1'
though. You need to get the grace people to change the
application so it requests the correct library when running on
FreeBSD.

-pcf.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Peter Jeremy
On Tue, 2005-Oct-25 20:41:33 -0700, Rob wrote:
2. Create $HOME/.grace/gracerc.user and put
   one line in this file:
 USE pow TYPE f_of_dd FROM /usr/lib/libm.so
   (this is the example from the Grace UsersGuide)

Does grace work correctly if you don't include this line?

3. Start grace like this:
   $ xmgrace
   Shared object libXcursor.so.1.0 not found,
  required by xmgrace

libXcursor.so.1.0 is not a valid FreeBSD shared library name.
The closest is /usr/X11R6/lib/libXcursor.so.1

  handle =
(void *)dlopen(/usr/lib/libm.so, RTLD_LAZY)

It doesn't make sense for an attempt to dlopen libm to complain about
an X library.

You might like to try asking the port maintainer (see the Makefile).
-- 
Peter Jeremy
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Igor Robul

Peter Jeremy wrote:


It doesn't make sense for an attempt to dlopen libm to complain about
an X library.
 


fresh port works for me. By works I mean I can launch it and use menu :-)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Rob


--- Igor Robul [EMAIL PROTECTED] wrote:

 Hi,
 
 Rob wrote:
 
   
 
 Yes, indeed. Thank you. You said:
   Sounds like the application is broken for
requesting it, since as you found there is
no such library on FreeBSD.
 
 Here the application refers to what?
 Grace? Or dlopen()?
 
 If you mean grace, then I have a problem:
 the grace mailinglist blames FreeBSD, and
 here grace is blamed. Argh!
   
 
 What are you trying to do with xmgrace? I' asking
 because I have just installed math/grace and it
 at least can be launched on my system without
 trouble.

As I explained at the very beginning of this thread
(note part 2, this is important!):

1. Install Grace from ports (math/grace)

2. Create $HOME/.grace/gracerc.user and put
   one line in this file:
 USE pow TYPE f_of_dd FROM /usr/lib/libm.so
   (this is the example from the Grace UsersGuide,
but a similar construct allows me to load my
own function from my own library file).
   
3. Start grace like this:
   $ xmgrace
   Shared object libXcursor.so.1.0 not found,
  required by xmgrace
   DL module load failed: USE pow TYPE F_OF_DD
  FROM /usr/lib/libm.so
   Error at line 1


Indeed, grace will start normally, but it will
not parse the USE... line from the gracerc.user,
because the dlopen() call has the error:
Shared object libXcursor.so.1.0 not found,
required by xmgrace

Do you see this too?

Thanks,
Rob.





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Rob


--- Pete French [EMAIL PROTECTED] wrote:

  I am the only FreeBSD user on the Grace
 mailinglist.
  Apparently the dlopen() call in grace works fine
  on Linux and others. But not with FreeBSD.
 
 This is not a problem with the dlopen call *or*
 freebsd - the problem is that it is asking for
 a library 'libXcursor.so.1.0' which does not
 exist on FreeBSD. There is a 'libXcursor.so.1'
 though. You need to get the grace people to change
 the application so it requests the correct
 library when running on FreeBSD.

The reason why the grace developper blames FreeBSD
is because of this:

The executable 'xmgrace' is linked to
/usr/X11R6/lib/libX11.so.6
and
'strings /usr/X11R6/lib/libX11.so.6 | grep libXcursor'
gives:
  libXcursor.so.1.0.2

So according to the grace developper, the reason
for my problem is a problem with libX11.so.6.

But I know nothing about this stuff

By the way: can someone also explain to me why
libX11.so.6 has the string libXcursor.so.1.0.2.
I will then forward this to the grace mailinglist,
and tell them that there's something wrong with Grace.

Thank so much!
Rob.





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Rob

--- Peter Jeremy [EMAIL PROTECTED] wrote:

 On Tue, 2005-Oct-25 20:41:33 -0700, Rob wrote:
 2. Create $HOME/.grace/gracerc.user and put
one line in this file:
  USE pow TYPE f_of_dd FROM /usr/lib/libm.so
(this is the example from the Grace UsersGuide)
 
 Does grace work correctly if you don't include this
 line?

Without that line, grace starts without any problem.
With that line, grace cannot perform the action
described in that line (USE pow FROM libm.so),
because the responsible dlopen() call has the
error:
  Shared object libXcursor.so.1.0 not found,
  required by xmgrace

However, despite this error, grace continues
to start up fine (but, as I said, without loading
the function from the library).


Rob.



__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Igor Robul

Rob wrote:

 



Indeed, grace will start normally, but it will
not parse the USE... line from the gracerc.user,
because the dlopen() call has the error:
   Shared object libXcursor.so.1.0 not found,
   required by xmgrace

Do you see this too?
 


yes.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Igor Robul

Rob wrote:


The reason why the grace developper blames FreeBSD
is because of this:

The executable 'xmgrace' is linked to
/usr/X11R6/lib/libX11.so.6
and
'strings /usr/X11R6/lib/libX11.so.6 | grep libXcursor'
gives:
 libXcursor.so.1.0.2

So according to the grace developper, the reason
for my problem is a problem with libX11.so.6.
 

I have rebuilt xmgrace/grace from sources without port Makefile, and all 
works fine.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Igor Robul

Rob wrote:


The executable 'xmgrace' is linked to
/usr/X11R6/lib/libX11.so.6
and
'strings /usr/X11R6/lib/libX11.so.6 | grep libXcursor'
gives:
 libXcursor.so.1.0.2
 


I have made symbolic link libXcursor.so.1 - libXcursor.so.1.0.2
in /usr/X11R6/lib
and now xmgrace starts withour errors.
So really, there is some minor problem with x11/xorg-libraries port 
triggered by xmgrace

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Rob


--- Igor Robul [EMAIL PROTECTED] wrote:

 Rob wrote:
 
 The reason why the grace developper blames FreeBSD
 is because of this:
 
 The executable 'xmgrace' is linked to
 /usr/X11R6/lib/libX11.so.6
 and
 'strings /usr/X11R6/lib/libX11.so.6 | grep
 libXcursor'
 gives:
   libXcursor.so.1.0.2
 
 So according to the grace developper, the reason
 for my problem is a problem with libX11.so.6.
   
 
 I have rebuilt xmgrace/grace from sources without
 port Makefile, and all works fine.

Be sure that you do NOT start xmgrace, while
there is a gracerc.user in the 'pwd' (current
directory); because that prevents the loading
of ~/.grace/gracerc.user , which then may give
you the impression that all is OK.

For me, I still get the same error, even without
the port's Makefile.

Rob.






__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Rob


--- Igor Robul [EMAIL PROTECTED] wrote:

 Rob wrote:
 
 The executable 'xmgrace' is linked to
 /usr/X11R6/lib/libX11.so.6
 and
 'strings /usr/X11R6/lib/libX11.so.6 | grep
 libXcursor'
 gives:
   libXcursor.so.1.0.2
   
 
 I have made symbolic link libXcursor.so.1 -
 libXcursor.so.1.0.2 in /usr/X11R6/lib
 and now xmgrace starts withour errors.
 So really, there is some minor problem with
 x11/xorg-libraries port triggered by xmgrace

Do you mean the other-way-around link:
libXcursor.so.1.0.2 - libXcursor.so.1 ??

Because I don't have
/usr/X11R6/lib/libXcursor.so.1.0.2

but I do have there
libXcursor.a
libXcursor.so - libXcursor.so.1
libXcursor.so.1

Rob.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Igor Robul

Rob wrote:

--- Igor 


Do you mean the other-way-around link:
libXcursor.so.1.0.2 - libXcursor.so.1 ??

 


of course.
I mean
ln -sf libXcursor.so.1 libXcursor.so.1.0.2
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Rob
--- Igor Robul [EMAIL PROTECTED] wrote:

 Rob wrote:
 
 --- Igor 
 
 Do you mean the other-way-around link:
 libXcursor.so.1.0.2 - libXcursor.so.1 ??
 
   
 
 of course.
 I mean
 ln -sf libXcursor.so.1 libXcursor.so.1.0.2

Indeed, but with this link, I get:

$ xmgrace
Shared object nss_dns.so.1 not found,
 required by xmgrace
DL module load failed: USE pow TYPE F_OF_DD
 FROM /usr/lib/libm.so  
Error at line 1


Hmmm, what is this?
Though I do have /usr/compat/linux/lib/nss_dns.so.1

So the problem now persists with yet another
library.

Is it a coincidence that the problem-libraries
under scrutiny here are all in /usr/compat/linux :

/usr/compat/linux/usr/X11R6/lib/libXcursor.so.1.0.2
/usr/compat/linux/lib/libnss_dns.so.1

Could there be some wrong connection by grace
and/or FreeBSD to these Linux compat libraries
(and that confuses the dlopen() call) ?

Or any more ideas?

Thanks for helping me with this!

Rob.





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Igor Robul

Rob wrote:


Indeed, but with this link, I get:

$ xmgrace
Shared object nss_dns.so.1 not found,
required by xmgrace
DL module load failed: USE pow TYPE F_OF_DD
FROM /usr/lib/libm.so  
Error at line 1


 

All works fine for me. I think this is your local problem. Check 
/etc/nsswitch.conf

Mine is bellow:
group: compat
group_compat: nis
hosts: files dns
networks: files
passwd: compat
passwd_compat: nis
shells: files

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Rob


--- Igor Robul [EMAIL PROTECTED] wrote:

 Rob wrote:
 
 Indeed, but with this link, I get:
 
 $ xmgrace
 Shared object nss_dns.so.1 not found,
  required by xmgrace
 DL module load failed: USE pow TYPE F_OF_DD
  FROM /usr/lib/libm.so  
 Error at line 1
 
   
 
 All works fine for me. I think this is your local
 problem.

Aargh, seems I'm back where I was a few hours ago...
...me having a problem that nobody understands.

 Check 
 /etc/nsswitch.conf
 Mine is bellow:
 group: compat
 group_compat: nis
 hosts: files dns
 networks: files
 passwd: compat
 passwd_compat: nis
 shells: files

I have exactly same; I have never touched that
file! But, eh, what does this have to do with
the library stuff?

Anyway, are you sure there's no gracerc.user file
in the directory from where you start xmgrace,
since that would prevent reading the other one
in $HOME/.grace/ , and hence you wouldn't see
the library problem !!

Rob.




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: math/grace port: libXcursor.so.1.0 not found ??

2005-10-26 Thread Igor Robul

Rob wrote:

 


Aargh, seems I'm back where I was a few hours ago...
...me having a problem that nobody understands.

 

Check 
/etc/nsswitch.conf

Mine is bellow:
group: compat
group_compat: nis
hosts: files dns
networks: files
passwd: compat
passwd_compat: nis
shells: files
   



I have exactly same; I have never touched that
file! But, eh, what does this have to do with
the library stuff?

Anyway, are you sure there's no gracerc.user file
in the directory from where you start xmgrace,
since that would prevent reading the other one
in $HOME/.grace/ , and hence you wouldn't see
the library problem !!
 


%mkdir 
%cd /
%cat ~/.grace/gracerc.user
USE pow TYPE f_of_dd FROM /usr/lib/libm.so
%ls
%xmgrace
%



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


math/grace port: libXcursor.so.1.0 not found ??

2005-10-25 Thread Rob

Hi,

I'm running FreeBSD 5-Stable.

I only seem to encounter this problem with the
math/graphical port 'grace', and the dlopen()
call inthere.

It seems to be a FreeBSD specific problem and
I wonder if other people on this list encounter
the same problem.


This is the problem:

1. Install Grace from ports (math/grace)

2. Create $HOME/.grace/gracerc.user and put
   one line in this file:
 USE pow TYPE f_of_dd FROM /usr/lib/libm.so
   (this is the example from the Grace UsersGuide)

3. Start grace like this:
   $ xmgrace
   Shared object libXcursor.so.1.0 not found,
  required by xmgrace
   DL module load failed: USE pow TYPE F_OF_DD
  FROM /usr/lib/libm.so
   Error at line 1

Because if this library problem, Grace cannot
load pow from /usr/lib/libm.so. However,
apart from that, grace starts normally.

The syntax in file gracerc.user is correct; I
have verified this with the Grace mailinglist.
The line Shared object...not found is the error
message-string set by the dlopen() call in Grace:

  handle =
(void *)dlopen(/usr/lib/libm.so, RTLD_LAZY)

When I do a 'locate libXcursor.so.1.0', I get:
/usr/compat/linux/usr/X11R6/lib/libXcursor.so.1.0.2


Why is dlopen() failing on libXcursor.so.1.0 ?

A possible hint could be that libXcursor.so.1.0.2
appears when 'strings /usr/X11R6/lib/libX11.so.6'.
Why is it in libX11.so.6 ??


Thanks for help or clues!

Rob.





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]