From owner-freebsd-stable@freebsd.org Tue Feb 12 19:01:40 2019 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A95F314F18A8 for ; Tue, 12 Feb 2019 19:01:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E4907596B for ; Tue, 12 Feb 2019 19:01:39 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x1CJ1VfS035474 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 12 Feb 2019 21:01:34 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x1CJ1VfS035474 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x1CJ1Vjq035473; Tue, 12 Feb 2019 21:01:31 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 12 Feb 2019 21:01:31 +0200 From: Konstantin Belousov To: Eugene Grosbein Cc: FreeBSD stable Subject: Re: amd64, run-time linker and 32bit Message-ID: <20190212190131.GC24863@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.2 (2019-01-07) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2019 19:01:40 -0000 On Mon, Feb 11, 2019 at 12:31:19AM +0700, Eugene Grosbein wrote: > Hi! > > Why our 32-bit run-time linker looks for shared libraries in the /usr/local/lib despite of its absence in /var/run/ld-elf32.so.hints > while 32-bit binary is started under FreeBSD 11.2-STABLE/amd64 ? Most likely because you configured your system this way, or because your binary sets rpath this way. Without the data, we can only use a physhic service. > > If it finds 64-bit version of library in /usr/local/lib, it fails immediately > and does not even re-try to look at other directories noted in /var/run/ld-elf32.so.hints > such as /usr/lib32:/usr/local/lib/compat/lib32:/usr/local/lib/compat/lib32/compat/pkg:/usr/local/lib32/compat > where right 32-bit version is located. > > As workaround, I can use /etc/libmap32.conf and then the binary starts just fine > but there are so many libraries. It should not even try to look to /usr/local/lib > if it is not in the /var/run/ld-elf32.so.hints, should it? Compat32 linker default search path is /lib32:/usr/lib32 unless overritten or reconfigured (not the same as for native linker for 32bit).