From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 133457F00 for ; Wed, 17 Dec 2014 11:43:20 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 17 Dec 2014 02:43:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,593,1413270000"; d="scan'208";a="649055849" Received: from bricha3-mobl3.ger.corp.intel.com ([10.243.20.28]) by fmsmga002.fm.intel.com with SMTP; 17 Dec 2014 02:43:17 -0800 Received: by (sSMTP sendmail emulation); Wed, 17 Dec 2014 10:43:17 +0025 Date: Wed, 17 Dec 2014 10:43:17 +0000 From: Bruce Richardson To: Thomas Monjalon Message-ID: <20141217104317.GB9184@bricha3-MOBL3> References: <7F861DC0615E0C47A872E6F3C5FCDDBD05DD6DFE@BPXM14GP.gisp.nec.co.jp> <4299912.gJckj7WjkF@xps13> <20141217103815.GA9184@bricha3-MOBL3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20141217103815.GA9184@bricha3-MOBL3> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org, Hayato Momma Subject: Re: [dpdk-dev] [PATCH] mk: fix link to combined library 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: Wed, 17 Dec 2014 10:43:23 -0000 On Wed, Dec 17, 2014 at 10:38:16AM +0000, Bruce Richardson wrote: > On Wed, Dec 17, 2014 at 12:45:32AM +0100, Thomas Monjalon wrote: > > 2014-12-11 02:54, Hiroshi Shimamoto: > > > From: Hiroshi Shimamoto > > >=20 > > > The application should be linked to the single combined library in the > > > condition that both of CONFIG_RTE_BUILD_COMBINE_LIB and > > > CONFIG_RTE_BUILD_SHARED_LIB are enabled. > > >=20 > > > The current makefile generates an application that links to each libr= ary. > > > This patch fixes to link the single library. > > >=20 > > > Before > > > $ ldd x86_64-ivshmem-linuxapp-gcc/app/test > > > linux-vdso.so.1 =3D> (0x00007fff232a1000) > > > librte_distributor.so =3D> not found > > > librte_kni.so =3D> not found > > > librte_ivshmem.so =3D> not found > > > librte_pipeline.so =3D> not found > > > librte_table.so =3D> not found > > > librte_port.so =3D> not found > > > librte_timer.so =3D> not found > > > librte_hash.so =3D> not found > > > librte_lpm.so =3D> not found > > > librte_power.so =3D> not found > > > librte_acl.so =3D> not found > > > librte_meter.so =3D> not found > > > librte_sched.so =3D> not found > > > libm.so.6 =3D> /lib64/libm.so.6 (0x00007fc638020000) > > > librt.so.1 =3D> /lib64/librt.so.1 (0x00007fc637e18000) > > > librte_kvargs.so =3D> not found > > > librte_mbuf.so =3D> not found > > > librte_ip_frag.so =3D> not found > > > libethdev.so =3D> not found > > > librte_malloc.so =3D> not found > > > librte_mempool.so =3D> not found > > > librte_ring.so =3D> not found > > > librte_eal.so =3D> not found > > > librte_cmdline.so =3D> not found > > > librte_cfgfile.so =3D> not found > > > librte_pmd_bond.so =3D> not found > > > libgcc_s.so.1 =3D> /lib64/libgcc_s.so.1 (0x00007fc637bfe000) > > > libdl.so.2 =3D> /lib64/libdl.so.2 (0x00007fc6379fa000) > > > libintel_dpdk.so =3D> not found > > > libpthread.so.0 =3D> /lib64/libpthread.so.0 (0x00007fc6377dd000) > > > libc.so.6 =3D> /lib64/libc.so.6 (0x00007fc63741c000) > > > /lib64/ld-linux-x86-64.so.2 (0x00007fc638330000) > > >=20 > > > After > > > $ ldd x86_64-ivshmem-linuxapp-gcc/app/test > > > linux-vdso.so.1 =3D> (0x00007fffb79fe000) > > > librt.so.1 =3D> /lib64/librt.so.1 (0x00007f0d8a971000) > > > libm.so.6 =3D> /lib64/libm.so.6 (0x00007f0d8a66f000) > > > libgcc_s.so.1 =3D> /lib64/libgcc_s.so.1 (0x00007f0d8a458000) > > > libdl.so.2 =3D> /lib64/libdl.so.2 (0x00007f0d8a254000) > > > libintel_dpdk.so =3D> not found > > > libpthread.so.0 =3D> /lib64/libpthread.so.0 (0x00007f0d8a037000) > > > libc.so.6 =3D> /lib64/libc.so.6 (0x00007f0d89c76000) > > > /lib64/ld-linux-x86-64.so.2 (0x00007f0d8ab82000) > > >=20 > > > Signed-off-by: Hiroshi Shimamoto > > > Reviewed-by: Hayato Momma > >=20 > > It is what I suggested to Sergio: > > http://dpdk.org/ml/archives/dev/2014-December/009116.html > >=20 > > Acked-by: Thomas Monjalon > >=20 > > Applied > >=20 > > Thanks > > --=20 > > Thomas >=20 > None of the example apps are compiling for me today, and git bisect indic= ates that > this patch is the culprit. I'm investigating, but if flagging it here in = case=20 > someone else finds a fix faster than I do. >=20 > The error is due to the libraries being missing on the link command, with= the > out-of-the-box configuration i.e. individual static libs. >=20 > /Bruce >=20 > make: Entering directory `/home/bruce/dpdk.org/examples/helloworld' > mkdir -p /home/bruce/dpdk.org/examples/helloworld/build > make -C /home/bruce/dpdk.org/examples/helloworld/build -f /home/bruce/dpd= k.org/examples/helloworld/Makefile \ > S=3D/home/bruce/dpdk.org/examples/helloworld O=3D/home/bruce/dpdk= =2Eorg/examples/helloworld/build SRCDIR=3D/home/bruce/dpdk.org/examples/hel= loworld > gcc -m64 -pthread -march=3Dnative -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHIN= E_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3 -DRTE_MACHINE_CPUFLAG_SSSE3 -DRTE= _MACHINE_CPUFLAG_SSE4_1 -DRTE_MACHINE_CPUFLAG_SSE4_2 -DRTE_MACHINE_CPUFLAG_= AES -DRTE_MACHINE_CPUFLAG_PCLMULQDQ -DRTE_MACHINE_CPUFLAG_AVX -DRTE_COMPILE= _TIME_CPUFLAGS=3DRTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUF= LAG_SSSE3,RTE_CPUFLAG_SSE4_1,RTE_CPUFLAG_SSE4_2,RTE_CPUFLAG_AES,RTE_CPUFLAG= _PCLMULQDQ,RTE_CPUFLAG_AVX -I/home/bruce/dpdk.org/examples/helloworld/buil= d/include -I/home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/include -includ= e /home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/include/rte_config.h -O3 = -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declara= tions -Wold-style-definition -Wpointer-arith -Wcast-align -Wnested-externs = -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings = -Wl,-Map=3Dhelloworld.map,--cref -o helloworld main.o -Wl,--no-as-needed -W= l,-export-dynamic -L/home/bruce/dpdk.org/examples/helloworld/build/lib -L/h= ome/bruce/dpdk.org/x86_64-native-linuxapp-gcc/lib -L/home/bruce/dpdk.org/x= 86_64-native-linuxapp-gcc/lib -Wl,--whole-archive -Wl,--start-group -Wl,-lr= t -Wl,-lm -Wl,-ldl -Wl,--end-group -Wl,--no-whole-archive > main.o: In function `rte_lcore_id': > /home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/include/rte_lcore.h:85: u= ndefined reference to `per_lcore__lcore_id' > main.o: In function `main': > /home/bruce/dpdk.org/examples/helloworld/main.c:64: undefined reference t= o `rte_eal_init' > main.o: In function `rte_lcore_is_enabled': > /home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/include/rte_lcore.h:170: = undefined reference to `rte_eal_get_configuration' > main.o: In function `rte_get_master_lcore': > /home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/include/rte_lcore.h:97: u= ndefined reference to `rte_eal_get_configuration' > main.o: In function `rte_lcore_is_enabled': > /home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/include/rte_lcore.h:170: = undefined reference to `rte_eal_get_configuration' > main.o: In function `rte_get_master_lcore': > /home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/include/rte_lcore.h:97: u= ndefined reference to `rte_eal_get_configuration' > main.o: In function `main': > /home/bruce/dpdk.org/examples/helloworld/main.c:70: undefined reference t= o `rte_eal_remote_launch' > main.o: In function `rte_lcore_id': > /home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/include/rte_lcore.h:85: u= ndefined reference to `per_lcore__lcore_id' > main.o: In function `main': > /home/bruce/dpdk.org/examples/helloworld/main.c:76: undefined reference t= o `rte_eal_mp_wait_lcore' > /home/bruce/dpdk.org/examples/helloworld/main.c:66: undefined reference t= o `__rte_panic' > collect2: error: ld returned 1 exit status > make[1]: *** [helloworld] Error 1 > make: *** [all] Error 2 > make: Leaving directory `/home/bruce/dpdk.org/examples/helloworld' >=20 Root cause appears to be use of "RTE_BUILD_COMBINE_LIBS" instead of "CONFIG= _RTE_BUILD_COMBINE_LIBS" Patch to follow. Regards, /Bruce