--- Igor Robul <[EMAIL PROTECTED]> wrote:

> %mkdir tttt
> %cd tttt/
> %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 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to