Received: by 10.213.65.68 with SMTP id h4csp1127740imn; Thu, 22 Mar 2018 16:14:53 -0700 (PDT) X-Google-Smtp-Source: AG47ELs8Tmtnz9Jp12lvsVqy1wm/SjCrkGEvjmWnhasijPg6rCPb3FqQmF0OzCihG+wDHwdD0lGM X-Received: by 2002:a17:902:b10f:: with SMTP id q15-v6mr24642513plr.263.1521760493830; Thu, 22 Mar 2018 16:14:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521760493; cv=none; d=google.com; s=arc-20160816; b=at1uciWW92hL7rjJ/NkLS3t9TPnNbR4iTtCSeEOz3PxCGvoRuYiMC9H7rQzxkwIIMa qLmptYPIsS/GhCIQNVaXW6zFulQwVH+k9BDAsngECKSBBC7P5qh2dSkCg4ppr/4kpoCM WVJYAQI7GvK8eiM3pB2ghSZ0xZFdiij3gkYaWqhoqkMIjhyMp1pHCsFN985bUr5ypG33 Wv9kITSoO/TXbcac+k1WUpW2QWlHeByrh4CPxiTLXFI9OVjGV0zbEPNdpswDbH2AJh6W bN4PBJbYzu9PAaDcLy522WSAmLiS2D0yRMCRasaW5zMWZv3KQKm0xKg2n6NX+WvL4KNU DZCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=OT34xNbuJwDhKAEnqq4rCD+vM9fgJCUIHL/+Tof//yk=; b=N5ve2vhrEynbLZ7qvx83rf22wI4DZY80YtVUObi6AodaV0fCyJe9XmHgJtuUqGoDi6 mjefcK+OVMQW+wI79fBsK737xaDymUMH80Cal3zZKXgJi6TK+5j/jiq0iO7OzXtSXIWp 9lLYpSqMbG5Jr47NAPLgTaegNgSQ+d540mY2wW6FrQyGZijuvsW/X1A5RLZ1P1XEUqzJ ut+ziPDPmW/D37WcNJv+PwySe6UHwkZzEbyI0WKK3UX5xtCuRSL0inJM5SMh7SM3AO55 oXscPhweQUqvG2ttIkquDyOQVosXskrIv1H6XE2w0Yxh+lvFYX+cc+zE7w1aQfP+N8yf 7D9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t26si814482pfg.414.2018.03.22.16.14.38; Thu, 22 Mar 2018 16:14:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751913AbeCVXNe convert rfc822-to-8bit (ORCPT + 99 others); Thu, 22 Mar 2018 19:13:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:40512 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751599AbeCVXNd (ORCPT ); Thu, 22 Mar 2018 19:13:33 -0400 Received: from gandalf.local.home (cpe-172-100-180-131.stny.res.rr.com [172.100.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ACC452177A; Thu, 22 Mar 2018 23:13:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACC452177A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Thu, 22 Mar 2018 19:13:31 -0400 From: Steven Rostedt To: sztsian@gmail.com Cc: johannes.berg@intel.com, johannes@sipsolutions.net, linux-kernel@vger.kernel.org, zsun@redhat.com Subject: Re: [PATCH 2/2] trace-cmd: Change the way of getting python ldflags. Message-ID: <20180322191331.48b3d9dd@gandalf.local.home> In-Reply-To: <20180204032014.6962-3-sztsian@gmail.com> References: <20180204032014.6962-1-sztsian@gmail.com> <20180204032014.6962-3-sztsian@gmail.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 4 Feb 2018 11:20:14 +0800 sztsian@gmail.com wrote: > From: Zamir SUN > > Prior than this patch, Makefile detects python ldflags using a hardcoded > python command. It will cause problems if we are building against > python3 in the future when ldflags for python2 and python3 are > different. With this patch, python ldflags are detected by > corresponding python{,3}-config which will detect the right config for > python plugins. > > Signed-off-by: Zamir SUN (Red Hat) > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 7c0d1a6..f41e399 100644 > --- a/Makefile > +++ b/Makefile > @@ -636,7 +636,7 @@ report_noswig: force > > PYTHON_INCLUDES = `pkg-config --cflags $(PYTHON_VERS)` > PYTHON_LDFLAGS = `pkg-config --libs $(PYTHON_VERS)` \ > - $(shell python2 -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LINKFORSHARED')") > + $(shell $(PYTHON_VERS)-config --ldflags) > PYGTK_CFLAGS = `pkg-config --cflags pygtk-2.0` > > ctracecmd.so: $(TCMD_LIB_OBJS) ctracecmd.i BTW, I did have this applied, but when testing it caused warnings. I had to apply this patch to fix it: -- Steve From d5579b729114135da20bcee6896a0683ff54f33a Mon Sep 17 00:00:00 2001 From: "Steven Rostedt (VMware)" Date: Thu, 22 Mar 2018 18:38:22 -0400 Subject: [PATCH] trace-cmd build: Do not execute python scripts if there is no python I was triggering the following build messages when not having swig installed: make: -config: Command not found NO_PYTHON forced: swig not installed, not compiling python plugins make: -config: Command not found UPDATE trace_python_dir make: -config: Command not found This is due to the executing of $(PYTHON_VERS)-config, which would just turn into "-config". Do not assign the PYTHON_* variables if NO_PYTHON is defined. Signed-off-by: Steven Rostedt (VMware) --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 2c82301..26fd42b 100644 --- a/Makefile +++ b/Makefile @@ -373,10 +373,16 @@ report_nopythondev: force $(Q)echo " python-dev is not installed, not compiling python plugins" $(Q)echo +ifndef NO_PYTHON PYTHON_INCLUDES = `pkg-config --cflags $(PYTHON_VERS)` PYTHON_LDFLAGS = `pkg-config --libs $(PYTHON_VERS)` \ $(shell $(PYTHON_VERS)-config --ldflags) PYGTK_CFLAGS = `pkg-config --cflags pygtk-2.0` +else +PYTHON_INCLUDES = +PYTHON_LDFLAGS = +PYGTK_CFLAGS = +endif export PYTHON_INCLUDES export PYTHON_LDFLAGS -- 2.13.6