From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36893 invoked by alias); 31 Jan 2020 17:23:52 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 36427 invoked by uid 89); 31 Jan 2020 17:23:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=H*i:sk:83r1zfk, H*MI:sk:83r1zfk, H*f:sk:83r1zfk X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 31 Jan 2020 17:23:50 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ixa1F-0002gG-5k; Fri, 31 Jan 2020 12:23:49 -0500 Received: from [65.112.16.22] (port=38018 helo=pdslaptop) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ixa1E-0000x0-Is; Fri, 31 Jan 2020 12:23:48 -0500 Message-ID: Subject: Re: GDB 8.3.1 gdbserver linker error: needs -lrt From: Paul Smith Reply-To: psmith@gnu.org To: Eli Zaretskii Cc: simark@simark.ca, gdb@sourceware.org Date: Fri, 31 Jan 2020 17:23:00 -0000 In-Reply-To: <83r1zfk0kf.fsf@gnu.org> References: <06b764efa74573c9422da526f9d92aa2d9440e73.camel@gnu.org> <49c1cc4a-fe1b-8e35-b16b-76d9faec2173@simark.ca> <831rrgm5o8.fsf@gnu.org> <2820a9d3d0c191d64f24565d583508db9c1b067f.camel@gnu.org> <83r1zfk0kf.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00088.txt.bz2 On Fri, 2020-01-31 at 19:17 +0200, Eli Zaretskii wrote: > > In this case, we need a new library to link gdbserver directly, not > > because of some other package that gdbserver depends on, so we > > don't have a package that might contain a pkg-config we could use. > > Sorry, I thought liblzma needed -lrt. Apologies if I was confused. Oh I see the confusion. No, you're absolutely right, liblzma DOES need -lrt. And indeed, we DO use pkg-config to get info about liblzma. And that's why linking of gdb itself succeeds: it links lzma with its pkg-config options and that causes -lrt to be linked, as a side-effect. However, I'm whinging about gdbserver (and libinproctrace.so), and liblzma is not not linked into those, and so neither is -lrt.