From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id A4887385802A for ; Sat, 2 Jan 2021 10:02:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A4887385802A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fw@deneb.enyo.de Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1kvdkD-00005w-WA; Sat, 02 Jan 2021 10:02:46 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1kvdkA-00016L-QC; Sat, 02 Jan 2021 11:02:42 +0100 From: Florian Weimer To: sotrdg sotrdg via Libc-help Cc: sotrdg sotrdg Subject: Re: how to find dlopen be able to find shared library in /lib/xxx/yyyy? References: Date: Sat, 02 Jan 2021 11:02:42 +0100 In-Reply-To: (sotrdg sotrdg via Libc-help's message of "Sat, 2 Jan 2021 04:37:48 +0000") Message-ID: <871rf3bqrh.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 10:02:49 -0000 * sotrdg sotrdg via Libc-help: > I have an C.UTF-8.so at /usr/local/lib/fast_io_i18n_data/locale/C.UTF-8.s= o. > > I tried to do > dlopen(=E2=80=9Cfast_io_i18n_data/locale/C.UTF-8.so=E2=80=9D,RTLD_GLOBAL = | RTLD_NOW); > > However, the dlls cannot get found. You need to provide the full (absolute) path to the shared object. Searching only happens if the dlopen argument doesn ot contain a slash. You can still use $LIB to paper over 32-bit/64-bit differences.