From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757492AbcAJUOC (ORCPT ); Sun, 10 Jan 2016 15:14:02 -0500 Received: from a.ns.miles-group.at ([95.130.255.143]:11949 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757185AbcAJUOA (ORCPT ); Sun, 10 Jan 2016 15:14:00 -0500 Subject: Re: [PATCH] um: link with -lpthread To: Vegard Nossum References: <1451577977-12990-1-git-send-email-vegard.nossum@oracle.com> Cc: Lorenzo Colitti , user-mode-linux-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org From: Richard Weinberger Message-ID: <5692BB84.5060106@nod.at> Date: Sun, 10 Jan 2016 21:13:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <1451577977-12990-1-git-send-email-vegard.nossum@oracle.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 31.12.2015 um 17:06 schrieb Vegard Nossum: > Similarly to commit fb1770aa78a43530940d0c2dd161e77bc705bdac, with gcc 5 > on Ubuntu and CONFIG_STATIC_LINK=y I was seeing these linker errors: > > /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/librt.a(timer_create.o): In function `__timer_create_new': > (.text+0xcd): undefined reference to `pthread_once' > /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/librt.a(timer_create.o): In function `__timer_create_new': > (.text+0x126): undefined reference to `pthread_attr_init' > /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/librt.a(timer_create.o): In function `__timer_create_new': > (.text+0x168): undefined reference to `pthread_attr_setdetachstate' > [...] > > Obviously we also need -lpthread for librt.a. > > Signed-off-by: Vegard Nossum Applied! Thanks, //richard