Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Oct 2005 00:50:03 -0700
From:      Eric Anholt <eta@lclark.edu>
To:        Rob <spamrefuse@yahoo.com>
Cc:        freebsd-x11@freebsd.org
Subject:   Re: libXcursor.so.1.0.2 reference in libX11.so.6 ??
Message-ID:  <1130485803.1034.89.camel@leguin>
In-Reply-To: <20051028062553.73188.qmail@web36212.mail.mud.yahoo.com>
References:  <20051028062553.73188.qmail@web36212.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-HWYSL+X/Ewab77w0VMdu
Content-Type: multipart/mixed; boundary="=-VL+vv1xsgFU/N+/4df+o"


--=-VL+vv1xsgFU/N+/4df+o
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Thu, 2005-10-27 at 23:25 -0700, Rob wrote:
> Hi,
>=20
> I'm mailing to this list, after a long discussion
> on the FreeBSD-questions list:
> http://lists.freebsd.org/pipermail/freebsd-questions/2005-October/102547.=
html
>=20
>=20
> Eventually, Kris Kennaway suggested that this
> is partially a problem caused by the X11 library:
> http://lists.freebsd.org/pipermail/freebsd-questions/2005-October/102678.=
html
>=20
> The problem in a nutshell:
>=20
> Some X11 calls, e.g. XDisplayOpen(), set the error
> indicator in dlerror(); the error says that a
> shared object "libXcursor.so.1.0" is not found.
>=20
> >From 'strings /usr/X11R6/lib/libX11.so.6', there
> appears output "libXcursor.so.1.0.2".
> Probably there is something wrong with the X11
> libraries and the linked objects in there.
>=20
> Does anybody have clue on this isse?

This appears to be a bug in the app.  It is attempting to use dlerror to
check if the previous dlsym() call failed, rather than checking if the
dlsym returned NULL.  libX11 is doing just fine, but a side effect of
its eventually-successful dlopen()ing of libXcursor is that it will have
caused a dlopen error, so dlerror() will be returning non-NULL for the
next person that comes along.

Attached is an untested patch.

--=20
Eric Anholt                                     eta@lclark.edu
http://people.freebsd.org/~anholt/              anholt@FreeBSD.org

--=-VL+vv1xsgFU/N+/4df+o
Content-Disposition: attachment; filename=grace-dlerror.diff
Content-Type: text/x-patch; name=grace-dlerror.diff; charset=ISO-8859-1
Content-Transfer-Encoding: base64

SW5kZXg6IE1ha2VmaWxlDQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09DQpSQ1MgZmlsZTogL2hvbWUvbmN2cy9wb3J0cy9t
YXRoL2dyYWNlL01ha2VmaWxlLHYNCnJldHJpZXZpbmcgcmV2aXNpb24gMS40NA0KZGlmZiAtdSAt
cjEuNDQgTWFrZWZpbGUNCi0tLSBNYWtlZmlsZQkxIE1hciAyMDA1IDE0OjQxOjQyIC0wMDAwCTEu
NDQNCisrKyBNYWtlZmlsZQkyOCBPY3QgMjAwNSAwNzo0Njo1MyAtMDAwMA0KQEAgLTcsNyArNyw3
IEBADQogDQogUE9SVE5BTUU9CWdyYWNlDQogUE9SVFZFUlNJT049CTUuMS4xOA0KLVBPUlRSRVZJ
U0lPTj0JMA0KK1BPUlRSRVZJU0lPTj0JMQ0KIENBVEVHT1JJRVM9CW1hdGggcHJpbnQNCiAjDQog
TUFTVEVSX1NJVEVTPQlmdHA6Ly9wbGFzbWEtZ2F0ZS53ZWl6bWFubi5hYy5pbC9wdWIvZ3JhY2Uv
c3JjL3N0YWJsZS8gXA0KSW5kZXg6IGZpbGVzL3BhdGNoLWRsbW9kdWxlLmMNCj09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0N
ClJDUyBmaWxlOiBmaWxlcy9wYXRjaC1kbG1vZHVsZS5jDQpkaWZmIC1OIGZpbGVzL3BhdGNoLWRs
bW9kdWxlLmMNCi0tLSAvZGV2L251bGwJMSBKYW4gMTk3MCAwMDowMDowMCAtMDAwMA0KKysrIGZp
bGVzL3BhdGNoLWRsbW9kdWxlLmMJMjggT2N0IDIwMDUgMDc6NDg6MzYgLTAwMDANCkBAIC0wLDAg
KzEsMTMgQEANCistLS0gc3JjL2RsbW9kdWxlLmMub3JpZwlTYXQgSnVsICAzIDEzOjQ3OjQ1IDIw
MDQNCisrKysgc3JjL2RsbW9kdWxlLmMJRnJpIE9jdCAyOCAwMDo0NzozMyAyMDA1DQorQEAgLTkw
LDggKzkwLDggQEANCisgICAgIH0NCisgICAgIA0KKyAgICAgbmV3a2V5LmRhdGEgPSBkbHN5bSho
YW5kbGUsIGRsX2Z1bmN0aW9uKTsNCistICAgIGlmICgoZXJyb3IgPSAoY2hhciAqKSBkbGVycm9y
KCkpICE9IE5VTEwpIHsNCistICAgICAgICBlcnJtc2coZXJyb3IpOw0KKysgICAgaWYgKG5ld2tl
eS5kYXRhID09IE5VTEwpIHsNCisrICAgICAgICBlcnJtc2coKGNoYXIgKikgZGxlcnJvcigpKTsN
CisgICAgICAgICBkbGNsb3NlKGhhbmRsZSk7DQorICAgICAgICAgcmV0dXJuIFJFVFVSTl9GQUlM
VVJFOw0KKyAgICAgfQ0K


--=-VL+vv1xsgFU/N+/4df+o--

--=-HWYSL+X/Ewab77w0VMdu
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)

iD8DBQBDYdgrHUdvYGzw6vcRAnlNAJ97SKWIyan4Xd1hn4JTuuTeqkpvoACfTEQU
I4/77cEVj17KeOIyz8cdODU=
=rPL9
-----END PGP SIGNATURE-----

--=-HWYSL+X/Ewab77w0VMdu--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1130485803.1034.89.camel>