From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f65.google.com (mail-pl0-f65.google.com [209.85.160.65]) by dpdk.org (Postfix) with ESMTP id 8D6761B026 for ; Thu, 15 Feb 2018 02:08:09 +0100 (CET) Received: by mail-pl0-f65.google.com with SMTP id 31so4029416ple.9 for ; Wed, 14 Feb 2018 17:08:09 -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-transfer-encoding; bh=IGQ9vmtQi2fl/39ORx9HMjjz8jG5twdnnxkoC6d9DRk=; b=xslGpGsoN37454UWBQ93nqgJUednqAq+q7CZ5hne4hn/1Wa8MmAsxP80M0TkI2IcIX fHVPQuf28k1irbQJ6cHJLIiDuMjrzCCNWF/UhT6NkYuuH8xV6zx2Z8YznfV2tUmmBSd/ TMS+Vbgmm0NNf+6DgjwrGKw24Y2BTjqwlPPADrTnC8Kg6TSEDwOb0co0bV63xrl02MMF AVRmmTp1OgYIWUgt/BzVW8RitSgYoHR/zFwMaAd5aZ1aRUTmwJMxk9y5SFL8eNL9EIgd 3dPtSBM74WrJa6iWDzwASgGbrD63K1wQrKljyfrv1D6It3hoCBqvak54f3iB43fxcmv5 0zvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IGQ9vmtQi2fl/39ORx9HMjjz8jG5twdnnxkoC6d9DRk=; b=mlc3Kla3qR7s1na5sEJtvHY88ULMfxHcE+hoC3XCiCOmgrX9WtddQLGKywLkvoRuCl oEYvo4B/zBisNMugcBG2ybuDtwQ4QdLvO958aZGxZhVhVMDukBP+IOgVezmhLew6PPux xq4wmDRkFTf4kSWkNHps4V4uuSD+SEDhmszJQeM86OVclTDrlx/r0jRpca6wghcPmCRA wB49WFKbscTY/HWfqoNvV2P82f7g299YVNCaVb2ZerBngu0zhXA2pBoXiczDzHgcUNNs NtYZ1EJCR5Q2K0930shyS35oMwgKBFYvnP7uSxFs/A92nGLUAr0aYeYNyVqkP8a7R6Jg Kvag== X-Gm-Message-State: APf1xPCEwXZmV7euR5lKNPJwgGEpUOF/r1EgB/KqB0uXLzB52NEIB0v5 PI7gQiVrcwuxUU14CQQoAsHYxw== X-Google-Smtp-Source: AH8x226+hk8zycdA/7gLbC44KMT61I5VuE7yUBeOXixymcY00GrUKvorccrZoGiJ5x6MWzjdk1DHXQ== X-Received: by 2002:a17:902:2904:: with SMTP id g4-v6mr832277plb.170.1518656888663; Wed, 14 Feb 2018 17:08:08 -0800 (PST) Received: from xeon-e3 (204-195-71-95.wavecable.com. [204.195.71.95]) by smtp.gmail.com with ESMTPSA id t1sm33159609pgu.77.2018.02.14.17.08.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Feb 2018 17:08:08 -0800 (PST) Date: Wed, 14 Feb 2018 17:08:06 -0800 From: Stephen Hemminger To: Jeffrey Helt Cc: users@dpdk.org Message-ID: <20180214170806.3e670b57@xeon-e3> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-users] Building a shared library that uses DPDK X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Feb 2018 01:08:09 -0000 On Wed, 14 Feb 2018 19:06:03 -0500 Jeffrey Helt wrote: > Hi, >=20 > I am attempting to build a shared library that uses DPDK, specifically th= at wraps the Linux socket API and backs it by shared memory DPDK shared mem= ory regions. I built DPDK 17.11 with =E2=80=9CCONFIG_RTE_BUILD_SHARED_LIB= =3Dy=E2=80=9D. In my shared library directory, I am using the following Mak= efile: >=20 > ifeq ($(RTE_SDK),) > $(error "Please define RTE_SDK environment variable") > endif >=20 > # Default target, can be overridden by command line or environment > RTE_TARGET ?=3D x86_64-native-linuxapp-gcc >=20 > include $(RTE_SDK)/mk/rte.vars.mk >=20 > # binary name > SHARED =3D libshim.so >=20 > # all source are stored in SRCS-y > SRCS-y :=3D wrap_socket.c >=20 > CFLAGS +=3D -O3 >=20 > include $(RTE_SDK)/mk/rte.extshared.mk >=20 > However, whenever I try to use my library, such as with "LD_PRELOAD=3D./b= uild/lib/libshim.so ./test=E2=80=9D, I receive "symbol lookup error: ./buil= d/lib/libshim.so: undefined symbol: rte_eal_init=E2=80=9D. What am I missin= g? >=20 > Thank you in advance for help! >=20 > Jeff The DPDK builds lots of little shared libraries. You need to have all of them in your LD_LIBRARY_PATH and then add your sock= et wrapper.