From owner-freebsd-questions@FreeBSD.ORG Thu Oct 27 06:55:37 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C42A116A41F for ; Thu, 27 Oct 2005 06:55:37 +0000 (GMT) (envelope-from spamrefuse@yahoo.com) Received: from web36211.mail.mud.yahoo.com (web36211.mail.mud.yahoo.com [209.191.68.237]) by mx1.FreeBSD.org (Postfix) with SMTP id 64B8343D46 for ; Thu, 27 Oct 2005 06:55:37 +0000 (GMT) (envelope-from spamrefuse@yahoo.com) Received: (qmail 78416 invoked by uid 60001); 27 Oct 2005 06:55:36 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=jl2zMsSy+ABtAM0WnDn/uikdXC5DgGAVG06a9ChmaOuautu//P/KxJr9Nhh4ScWIfSGd9VJqG+vRS//0h0TvGQhCa1GDQWpW4blZ5IRaIc//vWC96x+G4tuKwAF5JRCdQFdvM0O6KGwuvkRf76WKWDkNUxUFnew7wLjK9CMOsuo= ; Message-ID: <20051027065536.78414.qmail@web36211.mail.mud.yahoo.com> Received: from [147.46.44.181] by web36211.mail.mud.yahoo.com via HTTP; Wed, 26 Oct 2005 23:55:36 PDT Date: Wed, 26 Oct 2005 23:55:36 -0700 (PDT) From: Rob To: Igor Robul , freebsd-questions@freebsd.org In-Reply-To: <436064BE.9000805@speechpro.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: math/grace port: "libXcursor.so.1.0" not found ?? [SOLVED] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2005 06:55:37 -0000 --- Igor Robul 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