From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 960485381A for ; Fri, 28 Jun 2024 20:44:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719607449; cv=none; b=ZaEymWiCPorFeuP8kuT+hCrbgd0enMKWydwo0zC4ALS9P2vQK0hle6cMDgvxmYD+d6t8RN9ONRnB7NZFkRAKd4L5TJyIBDBrWAsAxhWMl8qDaqFIBszfhfFrfMb6GYu+qHPlgr3Boxqo2mIWC7APouaPkwlMBttxTmtzFU4rT78= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719607449; c=relaxed/simple; bh=8dGdkVxWgN9JzcpOHdS5PlD3VTcxy/ssHnXcSzuLaoI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KBJEeY2ruD+SCyokqYNXNti2f9C1YcTa/iDQWg8vBUX8MJcENQJTMvEOyIqDD2o5RQQ7NfrMqTIQ441Xs3TKJk0VB5QG1eOYwir6p330/U6gDSq9loYBXdUnSuuRDqOnigR/ttG4cblCN4QgUrbSJH+45J7i3kjPBYnq1TVtunA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZvYAOjBD; arc=none smtp.client-ip=209.85.166.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ZvYAOjBD" Received: by mail-il1-f174.google.com with SMTP id e9e14a558f8ab-3745eeedc76so501895ab.0 for ; Fri, 28 Jun 2024 13:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1719607446; x=1720212246; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=VV0l09SoWGJ1SnpCeKyT1K1d8xCV8UNByaKVaVGNTYE=; b=ZvYAOjBDPphjCXH1463daJzlPV5xiadtceEvLrBBPzmodsnmqf0vBiBoiRPS0jNQOc 5ESJjckOJ5/ZPpR20mHoO7ks1WaerkZuPJeHOo0aBirallwi0TuExZEwORnKzfKwGvea udNqqKhzFToHW5qQ8UwoCsiTa4xk/3/q5SFaI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719607446; x=1720212246; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VV0l09SoWGJ1SnpCeKyT1K1d8xCV8UNByaKVaVGNTYE=; b=sQVtlyA8ks1iK6LAjQcwQj2ET5xadJ0yrk4oVnO4wmnSn3/KK4w3bi6+iTmpAVwmhB aEsujAUYG2+lsPG+lhN1iaC3wm/dW4cmDDenPs0lep/ceXCokSF6JRv05QUthS7fwJjR kscw1ifF46k4yvW5PAuPQwMdohCjGulQ7P3n4o6ZJ8yk2uhGkPR1wosZy3dkIxxvdHhN sERguUY6awGLyrC4lxlC6BuIdMgKahvcILApz3mLH3LGQazONaS8o1Yes18K67nvecca LxbuSNV3ZvALlI0L7iG2ViYLTQ8rR3xXuXtX9pPwWhd2G/IMlmAK7qTd9Je5SoDiL9Zg AsiA== X-Forwarded-Encrypted: i=1; AJvYcCVurYExpgtWqKgxvCoXu6RAUBOde7/h4Nb0dhv39SrUbcgUoF0Ob5lqtRamKBPYcIo39otOfbblYO1006asrHlVccg8hS8oGWnefIQD X-Gm-Message-State: AOJu0Yz0LuIT5tgv5GegR0m2xilZNSJyAybPL0zlHeGmxEKwXzG3WAib /IS5i5+rPUYFU/jps1fbTXSnYAPJMhTNqwMePW4TLTkSVcKyrjoRT+qJ/1Pg4mhzrQLcOMU4NjP f X-Google-Smtp-Source: AGHT+IG+om/imzFgy8LRRQHUqfx2XPHiL05dYxs+tlDZTUfjHA5g2wsrx/jwjMi5O5hKd/5yau5siw== X-Received: by 2002:a92:c981:0:b0:375:bdfe:287a with SMTP id e9e14a558f8ab-3763807c15emr188331605ab.0.1719607445733; Fri, 28 Jun 2024 13:44:05 -0700 (PDT) Received: from [192.168.1.128] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-37ad2e4bfabsm5782135ab.38.2024.06.28.13.44.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Jun 2024 13:44:05 -0700 (PDT) Message-ID: Date: Fri, 28 Jun 2024 14:44:04 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] cpupower: fix lib default installation path To: Roman Storozhenko , Thomas Renninger , Shuah Khan Cc: Javier Carrasco , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: <20240623-fix-lib-install-v1-1-bcbd03b78d87@gmail.com> Content-Language: en-US From: Shuah Khan In-Reply-To: <20240623-fix-lib-install-v1-1-bcbd03b78d87@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/23/24 07:10, Roman Storozhenko wrote: > Invocation the tool built with the default settings fails: > $ cpupower > cpupower: error while loading shared libraries: libcpupower.so.1: cannot > open shared object file: No such file or directory> The issue is that Makefile puts the library to "/usr/lib64" dir for a 64 > bit machine. This is wrong. According to the "File hierarchy standard > specification: > https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard > https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.pdf > > "/usr/lib" dirs are intended for alternative-format libraries > (e.g., "/usr/lib32" for 32-bit libraries on a 64-bit machine (optional)). > > The utility is built for the current machine and doesn't change bit > depth. > Fix the issue by changing library destination dir to "/usr/lib". > > Signed-off-by: Roman Storozhenko > --- > tools/power/cpupower/Makefile | 10 +--------- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile > index cd0225a312b4..6c02f401069e 100644 > --- a/tools/power/cpupower/Makefile > +++ b/tools/power/cpupower/Makefile > @@ -67,6 +67,7 @@ LANGUAGES = de fr it cs pt ka > bindir ?= /usr/bin > sbindir ?= /usr/sbin > mandir ?= /usr/man > +libdir ?= /usr/lib > includedir ?= /usr/include > localedir ?= /usr/share/locale > docdir ?= /usr/share/doc/packages/cpupower > @@ -94,15 +95,6 @@ RANLIB = $(CROSS)ranlib > HOSTCC = gcc > MKDIR = mkdir These are set when make invoked from the kernel main Makefile - see "make tools" option in main Makefile > > -# 64bit library detection > -include ../../scripts/Makefile.arch This does the 64-librray detection based on arch. > - > -ifeq ($(IS_64_BIT), 1) > -libdir ?= /usr/lib64 > -else > -libdir ?= /usr/lib > -endif > - > # Now we set up the build system > # > > > --- > base-commit: f76698bd9a8ca01d3581236082d786e9a6b72bb7 > change-id: 20240623-fix-lib-install-3b7dccdbdf45 > > Best regards, What happens if you cross-compile with this patch? Take a look at this commit that fixed cross-compile: a73f6e2fbe8077811ea9546e0d44a7533111f0ba This makefile has to be in sync with the rest of the tools - see "make tools" in the kernel main Makefile. thanks, -- Shuah