From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by dpdk.org (Postfix) with ESMTP id 1CD0D688E for ; Mon, 30 Nov 2015 17:40:53 +0100 (CET) Received: by pacdm15 with SMTP id dm15so189712224pac.3 for ; Mon, 30 Nov 2015 08:40:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=Iej/ywNLOipk2jRQDy75sUVsuL8gKUaf5igKBqcwZho=; b=ZpU9Y1SpuIKI7ReyUCVnVWbom5LywXabM7/zJrPju46Qed+vQ3DhTMb0c9LqKuXJbB 3BQDmfEqk9F4gkJ5NvtQtZdAfEe1cWMs86sQnTjK8oPEv3tMfQ88laMGUDnGJl4Ut8fr 5En4V7Tk9RioZD97lki5wj39iriccVvkj34ZP5zjVvEgf6GKgzccUSRtU3POySpEtqNj n5a86W99YGx/xrtMFHS9z+oLIlB1ci9NC7GKLGoueOZwmHwmygsycTWck2AIASVJNU5d Z8Md9EJ7BrOTcTt6yrkkdtwlKkKGqbOlpYK6Eo36BGKi7MddO+qfP2mt8DFBkh1Ko8By mIAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Iej/ywNLOipk2jRQDy75sUVsuL8gKUaf5igKBqcwZho=; b=UrYClUmV97ArOWl6HjvAIUQ4GLkjbFBH/B80Ip5ugqJBQEwq2MDQn5g+sGOgCcDhd3 9T/LIu5o3GlbU1ORGMJs7cyroXSOhOsqHZjPugxgwEXzCrWkEQ417uFHQoBJ9MIN05sW Ff8GQdTGBOJwORxlWPsLBEesyTFswXidu4KQK59QcIQxLe1YSdCZ7fiXGXOQBV2Hi1CM SIGWWA9qIYHVmPSvAdTV1vhCGWxSwRXkp1MiNCBqgoUn5DwRKmL5xC81vdKJl8O8WwWB nCQpSDONDLaApDFRBALBvCWgGWtYcILK/NTIXl37Dh5BIQwnqJz0uZ/S9I6jPLap9GmT Ts8A== X-Gm-Message-State: ALoCoQmWY3aMdcXLQQvFXNSe6Au/q2TNIsrclWQPlpbOyR8d+EwnGExDbOaLOpJRpPmHsTJHG9qq X-Received: by 10.67.5.69 with SMTP id ck5mr50692259pad.125.1448901652497; Mon, 30 Nov 2015 08:40:52 -0800 (PST) Received: from xeon-e3 (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id h28sm52273991pfd.70.2015.11.30.08.40.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Nov 2015 08:40:52 -0800 (PST) Date: Mon, 30 Nov 2015 08:41:02 -0800 From: Stephen Hemminger To: Neil Horman Message-ID: <20151130084102.3f386b50@xeon-e3> In-Reply-To: <20151130150343.GA9434@hmsreliant.think-freely.org> References: <079fa1cfc3550c8147ea8b137fa1bc0f34d051dc.1448375477.git.pmatilai@redhat.com> <20151124144638.0b659e7d@xeon-e3> <56557398.3020600@redhat.com> <20151125080837.68e24a2d@xeon-e3> <20151130150343.GA9434@hmsreliant.think-freely.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] mk: fix the combined library problems by replacing it with a linker script X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 16:40:53 -0000 On Mon, 30 Nov 2015 10:03:43 -0500 Neil Horman wrote: > On Wed, Nov 25, 2015 at 08:08:37AM -0800, Stephen Hemminger wrote: > > On Wed, 25 Nov 2015 10:38:48 +0200 > > Panu Matilainen wrote: > > > > > On 11/25/2015 12:46 AM, Stephen Hemminger wrote: > > > > On Tue, 24 Nov 2015 16:31:17 +0200 > > > > Panu Matilainen wrote: > > > > > > > >> The physically linked-together combined library has been an increasing > > > >> source of problems, as was predicted when library and symbol versioning > > > >> was introduced. Replace the complex and fragile construction with a > > > >> simple linker script which achieves the same without all the problems, > > > >> remove the related kludges from eg mlx drivers. > > > >> > > > >> Since creating the linker script is practically zero cost, remove the > > > >> config option and just create it always. > > > >> > > > >> Based on a patch by Sergio Gonzales Monroy, linker script approach > > > >> initially suggested by Neil Horman. > > > >> > > > >> Suggested-by: Sergio Gonzalez Monroy > > > >> Suggested-by: Neil Horman > > > >> Signed-off-by: Panu Matilainen > > > > > > > > But it now means distros have to ship 20 libraries which seems like > > > > a step back. > > > > > > That's how Fedora and RHEL are shipping it already and nobody has so > > > much as noticed anything strange, much less complained about it. 20 > > > libraries is but a drop in the ocean on a average distro. But more to > > > the point, distros will prefer 50 working libraries over one that doesn't. > > > > > > The combined library as it is simply is no longer a viable option. > > > Besides just being broken (witness the strange hacks people are coming > > > up with to work around issues in it) its ugly because it basically gives > > > the middle finger to all the effort going into version compatibility, > > > and its also big. Few projects will use every library in DPDK, but with > > > the combined library they're forced to lug the 800 pound gorilla along > > > needlessly. > > > > > > - Panu - > > > > > > > Fixing the combined library took less than an hour for us. > How did you fix the versioning issue? > > Neil This is what I did. Also decided to keep shared library version == major DPDK version to avoid confusion. mk: fix when building combined shared library The DPDK mk file does not set shared object name or version information as required by Debian. Signed-off-by: Stephen Hemminger --- a/mk/rte.sharelib.mk +++ b/mk/rte.sharelib.mk @@ -51,10 +51,10 @@ ifeq ($(LINK_USING_CC),1) # Override the definition of LD here, since we're linking with CC LD := $(CC) $(CPU_CFLAGS) O_TO_S = $(LD) $(call linkerprefix,$(CPU_LDFLAGS)) \ - -shared $(OBJS) -o $(RTE_OUTPUT)/lib/$(LIB_ONE) + -shared $(OBJS) -Wl,-soname,$(LIB_ONE).$(RTE_LIBVERS) -o $(RTE_OUTPUT)/lib/$(LIB_ONE) else O_TO_S = $(LD) $(CPU_LDFLAGS) \ - -shared $(OBJS) -o $(RTE_OUTPUT)/lib/$(LIB_ONE) + -shared $(OBJS) -soname $(LIB_ONE).$(RTE_LIBVERS) -o $(RTE_OUTPUT)/lib/$(LIB_ONE) endif O_TO_S_STR = $(subst ','\'',$(O_TO_S)) #'# fix syntax highlight --- a/mk/rte.vars.mk +++ b/mk/rte.vars.mk @@ -74,8 +74,10 @@ ifneq ($(BUILDING_RTE_SDK),) endif RTE_LIBNAME := $(CONFIG_RTE_LIBNAME:"%"=%) +RTE_LIBVERS := $(CONFIG_RTE_LIBVERS:"%"=%) ifeq ($(RTE_LIBNAME),) RTE_LIBNAME := intel_dpdk +RTE_LIBVERS := 2 endif # RTE_TARGET is deducted from config when we are building the SDK.