Date: Wed, 26 Oct 2005 23:55:36 -0700 (PDT) From: Rob <spamrefuse@yahoo.com> To: Igor Robul <igorr@speechpro.com>, freebsd-questions@freebsd.org Subject: Re: math/grace port: "libXcursor.so.1.0" not found ?? [SOLVED] Message-ID: <20051027065536.78414.qmail@web36211.mail.mud.yahoo.com> In-Reply-To: <436064BE.9000805@speechpro.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--- Igor Robul <igorr@speechpro.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051027065536.78414.qmail>
