Message ID | 7F861DC0615E0C47A872E6F3C5FCDDBD05DD6DFE@BPXM14GP.gisp.nec.co.jp (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 77CFF6A95; Thu, 11 Dec 2014 03:54:54 +0100 (CET) Received: from tyo202.gate.nec.co.jp (TYO202.gate.nec.co.jp [210.143.35.52]) by dpdk.org (Postfix) with ESMTP id B7A8D2A9 for <dev@dpdk.org>; Thu, 11 Dec 2014 03:54:50 +0100 (CET) Received: from mailgate3.nec.co.jp ([10.7.69.195]) by tyo202.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id sBB2slIX002807 for <dev@dpdk.org>; Thu, 11 Dec 2014 11:54:47 +0900 (JST) Received: from mailsv.nec.co.jp (imss62.nec.co.jp [10.7.69.157]) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) with ESMTP id sBB2slm25583 for <dev@dpdk.org>; Thu, 11 Dec 2014 11:54:47 +0900 (JST) Received: from mail02.kamome.nec.co.jp (mail02.kamome.nec.co.jp [10.25.43.5]) by mailsv.nec.co.jp (8.13.8/8.13.4) with ESMTP id sBB2sliC001281 for <dev@dpdk.org>; Thu, 11 Dec 2014 11:54:47 +0900 (JST) Received: from bpxc99gp.gisp.nec.co.jp ([10.38.151.143] [10.38.151.143]) by mail02.kamome.nec.co.jp with ESMTP id BT-MMP-541364; Thu, 11 Dec 2014 11:54:34 +0900 Received: from BPXM14GP.gisp.nec.co.jp ([169.254.1.73]) by BPXC15GP.gisp.nec.co.jp ([10.38.151.143]) with mapi id 14.03.0174.002; Thu, 11 Dec 2014 11:54:33 +0900 From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> To: "dev@dpdk.org" <dev@dpdk.org> Thread-Topic: [PATCH] mk: fix link to combined library Thread-Index: AdAU7awz0aO0d2uXSBCd3bpjXAOtlg== Date: Thu, 11 Dec 2014 02:54:32 +0000 Message-ID: <7F861DC0615E0C47A872E6F3C5FCDDBD05DD6DFE@BPXM14GP.gisp.nec.co.jp> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.205.5.123] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: Hayato Momma <h-momma@ce.jp.nec.com> Subject: [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 <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Hiroshi Shimamoto
Dec. 11, 2014, 2:54 a.m. UTC
From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> 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. The current makefile generates an application that links to each library. This patch fixes to link the single library. Before $ ldd x86_64-ivshmem-linuxapp-gcc/app/test linux-vdso.so.1 => (0x00007fff232a1000) librte_distributor.so => not found librte_kni.so => not found librte_ivshmem.so => not found librte_pipeline.so => not found librte_table.so => not found librte_port.so => not found librte_timer.so => not found librte_hash.so => not found librte_lpm.so => not found librte_power.so => not found librte_acl.so => not found librte_meter.so => not found librte_sched.so => not found libm.so.6 => /lib64/libm.so.6 (0x00007fc638020000) librt.so.1 => /lib64/librt.so.1 (0x00007fc637e18000) librte_kvargs.so => not found librte_mbuf.so => not found librte_ip_frag.so => not found libethdev.so => not found librte_malloc.so => not found librte_mempool.so => not found librte_ring.so => not found librte_eal.so => not found librte_cmdline.so => not found librte_cfgfile.so => not found librte_pmd_bond.so => not found libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc637bfe000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fc6379fa000) libintel_dpdk.so => not found libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc6377dd000) libc.so.6 => /lib64/libc.so.6 (0x00007fc63741c000) /lib64/ld-linux-x86-64.so.2 (0x00007fc638330000) After $ ldd x86_64-ivshmem-linuxapp-gcc/app/test linux-vdso.so.1 => (0x00007fffb79fe000) librt.so.1 => /lib64/librt.so.1 (0x00007f0d8a971000) libm.so.6 => /lib64/libm.so.6 (0x00007f0d8a66f000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f0d8a458000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f0d8a254000) libintel_dpdk.so => not found libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0d8a037000) libc.so.6 => /lib64/libc.so.6 (0x00007f0d89c76000) /lib64/ld-linux-x86-64.so.2 (0x00007f0d8ab82000) Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com> --- mk/rte.app.mk | 8 ++++++++ 1 file changed, 8 insertions(+)
Comments
2014-12-11 02:54, Hiroshi Shimamoto: > From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> > > 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. > > The current makefile generates an application that links to each library. > This patch fixes to link the single library. > > Before > $ ldd x86_64-ivshmem-linuxapp-gcc/app/test > linux-vdso.so.1 => (0x00007fff232a1000) > librte_distributor.so => not found > librte_kni.so => not found > librte_ivshmem.so => not found > librte_pipeline.so => not found > librte_table.so => not found > librte_port.so => not found > librte_timer.so => not found > librte_hash.so => not found > librte_lpm.so => not found > librte_power.so => not found > librte_acl.so => not found > librte_meter.so => not found > librte_sched.so => not found > libm.so.6 => /lib64/libm.so.6 (0x00007fc638020000) > librt.so.1 => /lib64/librt.so.1 (0x00007fc637e18000) > librte_kvargs.so => not found > librte_mbuf.so => not found > librte_ip_frag.so => not found > libethdev.so => not found > librte_malloc.so => not found > librte_mempool.so => not found > librte_ring.so => not found > librte_eal.so => not found > librte_cmdline.so => not found > librte_cfgfile.so => not found > librte_pmd_bond.so => not found > libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc637bfe000) > libdl.so.2 => /lib64/libdl.so.2 (0x00007fc6379fa000) > libintel_dpdk.so => not found > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc6377dd000) > libc.so.6 => /lib64/libc.so.6 (0x00007fc63741c000) > /lib64/ld-linux-x86-64.so.2 (0x00007fc638330000) > > After > $ ldd x86_64-ivshmem-linuxapp-gcc/app/test > linux-vdso.so.1 => (0x00007fffb79fe000) > librt.so.1 => /lib64/librt.so.1 (0x00007f0d8a971000) > libm.so.6 => /lib64/libm.so.6 (0x00007f0d8a66f000) > libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f0d8a458000) > libdl.so.2 => /lib64/libdl.so.2 (0x00007f0d8a254000) > libintel_dpdk.so => not found > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0d8a037000) > libc.so.6 => /lib64/libc.so.6 (0x00007f0d89c76000) > /lib64/ld-linux-x86-64.so.2 (0x00007f0d8ab82000) > > Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> > Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com> It is what I suggested to Sergio: http://dpdk.org/ml/archives/dev/2014-December/009116.html Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com> Applied Thanks
On Wed, Dec 17, 2014 at 12:45:32AM +0100, Thomas Monjalon wrote: > 2014-12-11 02:54, Hiroshi Shimamoto: > > From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> > > > > 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. > > > > The current makefile generates an application that links to each library. > > This patch fixes to link the single library. > > > > Before > > $ ldd x86_64-ivshmem-linuxapp-gcc/app/test > > linux-vdso.so.1 => (0x00007fff232a1000) > > librte_distributor.so => not found > > librte_kni.so => not found > > librte_ivshmem.so => not found > > librte_pipeline.so => not found > > librte_table.so => not found > > librte_port.so => not found > > librte_timer.so => not found > > librte_hash.so => not found > > librte_lpm.so => not found > > librte_power.so => not found > > librte_acl.so => not found > > librte_meter.so => not found > > librte_sched.so => not found > > libm.so.6 => /lib64/libm.so.6 (0x00007fc638020000) > > librt.so.1 => /lib64/librt.so.1 (0x00007fc637e18000) > > librte_kvargs.so => not found > > librte_mbuf.so => not found > > librte_ip_frag.so => not found > > libethdev.so => not found > > librte_malloc.so => not found > > librte_mempool.so => not found > > librte_ring.so => not found > > librte_eal.so => not found > > librte_cmdline.so => not found > > librte_cfgfile.so => not found > > librte_pmd_bond.so => not found > > libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc637bfe000) > > libdl.so.2 => /lib64/libdl.so.2 (0x00007fc6379fa000) > > libintel_dpdk.so => not found > > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc6377dd000) > > libc.so.6 => /lib64/libc.so.6 (0x00007fc63741c000) > > /lib64/ld-linux-x86-64.so.2 (0x00007fc638330000) > > > > After > > $ ldd x86_64-ivshmem-linuxapp-gcc/app/test > > linux-vdso.so.1 => (0x00007fffb79fe000) > > librt.so.1 => /lib64/librt.so.1 (0x00007f0d8a971000) > > libm.so.6 => /lib64/libm.so.6 (0x00007f0d8a66f000) > > libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f0d8a458000) > > libdl.so.2 => /lib64/libdl.so.2 (0x00007f0d8a254000) > > libintel_dpdk.so => not found > > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0d8a037000) > > libc.so.6 => /lib64/libc.so.6 (0x00007f0d89c76000) > > /lib64/ld-linux-x86-64.so.2 (0x00007f0d8ab82000) > > > > Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> > > Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com> > > It is what I suggested to Sergio: > http://dpdk.org/ml/archives/dev/2014-December/009116.html > > Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com> > > Applied > > Thanks > -- > Thomas None of the example apps are compiling for me today, and git bisect indicates that this patch is the culprit. I'm investigating, but if flagging it here in case someone else finds a fix faster than I do. 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. /Bruce 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/dpdk.org/examples/helloworld/Makefile \ S=/home/bruce/dpdk.org/examples/helloworld O=/home/bruce/dpdk.org/examples/helloworld/build SRCDIR=/home/bruce/dpdk.org/examples/helloworld gcc -m64 -pthread -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_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=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_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/build/include -I/home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/include -include /home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/include/rte_config.h -O3 -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wpointer-arith -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -Wl,-Map=helloworld.map,--cref -o helloworld main.o -Wl,--no-as-needed -Wl,-export-dynamic -L/home/bruce/dpdk.org/examples/helloworld/build/lib -L/home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/lib -L/home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/lib -Wl,--whole-archive -Wl,--start-group -Wl,-lrt -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: undefined reference to `per_lcore__lcore_id' main.o: In function `main': /home/bruce/dpdk.org/examples/helloworld/main.c:64: undefined reference to `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: undefined 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: undefined reference to `rte_eal_get_configuration' main.o: In function `main': /home/bruce/dpdk.org/examples/helloworld/main.c:70: undefined reference to `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: undefined reference to `per_lcore__lcore_id' main.o: In function `main': /home/bruce/dpdk.org/examples/helloworld/main.c:76: undefined reference to `rte_eal_mp_wait_lcore' /home/bruce/dpdk.org/examples/helloworld/main.c:66: undefined reference to `__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'
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 <h-shimamoto@ct.jp.nec.com> > > > > > > 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. > > > > > > The current makefile generates an application that links to each library. > > > This patch fixes to link the single library. > > > > > > Before > > > $ ldd x86_64-ivshmem-linuxapp-gcc/app/test > > > linux-vdso.so.1 => (0x00007fff232a1000) > > > librte_distributor.so => not found > > > librte_kni.so => not found > > > librte_ivshmem.so => not found > > > librte_pipeline.so => not found > > > librte_table.so => not found > > > librte_port.so => not found > > > librte_timer.so => not found > > > librte_hash.so => not found > > > librte_lpm.so => not found > > > librte_power.so => not found > > > librte_acl.so => not found > > > librte_meter.so => not found > > > librte_sched.so => not found > > > libm.so.6 => /lib64/libm.so.6 (0x00007fc638020000) > > > librt.so.1 => /lib64/librt.so.1 (0x00007fc637e18000) > > > librte_kvargs.so => not found > > > librte_mbuf.so => not found > > > librte_ip_frag.so => not found > > > libethdev.so => not found > > > librte_malloc.so => not found > > > librte_mempool.so => not found > > > librte_ring.so => not found > > > librte_eal.so => not found > > > librte_cmdline.so => not found > > > librte_cfgfile.so => not found > > > librte_pmd_bond.so => not found > > > libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc637bfe000) > > > libdl.so.2 => /lib64/libdl.so.2 (0x00007fc6379fa000) > > > libintel_dpdk.so => not found > > > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc6377dd000) > > > libc.so.6 => /lib64/libc.so.6 (0x00007fc63741c000) > > > /lib64/ld-linux-x86-64.so.2 (0x00007fc638330000) > > > > > > After > > > $ ldd x86_64-ivshmem-linuxapp-gcc/app/test > > > linux-vdso.so.1 => (0x00007fffb79fe000) > > > librt.so.1 => /lib64/librt.so.1 (0x00007f0d8a971000) > > > libm.so.6 => /lib64/libm.so.6 (0x00007f0d8a66f000) > > > libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f0d8a458000) > > > libdl.so.2 => /lib64/libdl.so.2 (0x00007f0d8a254000) > > > libintel_dpdk.so => not found > > > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0d8a037000) > > > libc.so.6 => /lib64/libc.so.6 (0x00007f0d89c76000) > > > /lib64/ld-linux-x86-64.so.2 (0x00007f0d8ab82000) > > > > > > Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> > > > Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com> > > > > It is what I suggested to Sergio: > > http://dpdk.org/ml/archives/dev/2014-December/009116.html > > > > Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com> > > > > Applied > > > > Thanks > > -- > > Thomas > > None of the example apps are compiling for me today, and git bisect indicates that > this patch is the culprit. I'm investigating, but if flagging it here in case > someone else finds a fix faster than I do. > > 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. > > /Bruce > > 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/dpdk.org/examples/helloworld/Makefile \ > S=/home/bruce/dpdk.org/examples/helloworld O=/home/bruce/dpdk.org/examples/helloworld/build SRCDIR=/home/bruce/dpdk.org/examples/helloworld > gcc -m64 -pthread -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_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=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_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/build/include -I/home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/include -include /home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/include/rte_config.h -O3 -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wpointer-arith -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -Wl,-Map=helloworld.map,--cref -o helloworld main.o -Wl,--no-as-needed -Wl,-export-dynamic -L/home/bruce/dpdk.org/examples/helloworld/build/lib -L/home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/lib -L/home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/lib -Wl,--whole-archive -Wl,--start-group -Wl,-lrt -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: undefined reference to `per_lcore__lcore_id' > main.o: In function `main': > /home/bruce/dpdk.org/examples/helloworld/main.c:64: undefined reference to `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: undefined 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: undefined reference to `rte_eal_get_configuration' > main.o: In function `main': > /home/bruce/dpdk.org/examples/helloworld/main.c:70: undefined reference to `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: undefined reference to `per_lcore__lcore_id' > main.o: In function `main': > /home/bruce/dpdk.org/examples/helloworld/main.c:76: undefined reference to `rte_eal_mp_wait_lcore' > /home/bruce/dpdk.org/examples/helloworld/main.c:66: undefined reference to `__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' > Root cause appears to be use of "RTE_BUILD_COMBINE_LIBS" instead of "CONFIG_RTE_BUILD_COMBINE_LIBS" Patch to follow. Regards, /Bruce
2014-12-17 10:38, Bruce Richardson: > On Wed, Dec 17, 2014 at 12:45:32AM +0100, Thomas Monjalon wrote: > > 2014-12-11 02:54, Hiroshi Shimamoto: > > > From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> > > > > > > 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. > > > > > > The current makefile generates an application that links to each library. > > > This patch fixes to link the single library. > > > > > > Before > > > $ ldd x86_64-ivshmem-linuxapp-gcc/app/test > > > linux-vdso.so.1 => (0x00007fff232a1000) > > > librte_distributor.so => not found > > > librte_kni.so => not found > > > librte_ivshmem.so => not found > > > librte_pipeline.so => not found > > > librte_table.so => not found > > > librte_port.so => not found > > > librte_timer.so => not found > > > librte_hash.so => not found > > > librte_lpm.so => not found > > > librte_power.so => not found > > > librte_acl.so => not found > > > librte_meter.so => not found > > > librte_sched.so => not found > > > libm.so.6 => /lib64/libm.so.6 (0x00007fc638020000) > > > librt.so.1 => /lib64/librt.so.1 (0x00007fc637e18000) > > > librte_kvargs.so => not found > > > librte_mbuf.so => not found > > > librte_ip_frag.so => not found > > > libethdev.so => not found > > > librte_malloc.so => not found > > > librte_mempool.so => not found > > > librte_ring.so => not found > > > librte_eal.so => not found > > > librte_cmdline.so => not found > > > librte_cfgfile.so => not found > > > librte_pmd_bond.so => not found > > > libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc637bfe000) > > > libdl.so.2 => /lib64/libdl.so.2 (0x00007fc6379fa000) > > > libintel_dpdk.so => not found > > > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc6377dd000) > > > libc.so.6 => /lib64/libc.so.6 (0x00007fc63741c000) > > > /lib64/ld-linux-x86-64.so.2 (0x00007fc638330000) > > > > > > After > > > $ ldd x86_64-ivshmem-linuxapp-gcc/app/test > > > linux-vdso.so.1 => (0x00007fffb79fe000) > > > librt.so.1 => /lib64/librt.so.1 (0x00007f0d8a971000) > > > libm.so.6 => /lib64/libm.so.6 (0x00007f0d8a66f000) > > > libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f0d8a458000) > > > libdl.so.2 => /lib64/libdl.so.2 (0x00007f0d8a254000) > > > libintel_dpdk.so => not found > > > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0d8a037000) > > > libc.so.6 => /lib64/libc.so.6 (0x00007f0d89c76000) > > > /lib64/ld-linux-x86-64.so.2 (0x00007f0d8ab82000) > > > > > > Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> > > > Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com> > > > > It is what I suggested to Sergio: > > http://dpdk.org/ml/archives/dev/2014-December/009116.html > > > > Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com> > > > > Applied > > > > Thanks > > None of the example apps are compiling for me today, and git bisect indicates that > this patch is the culprit. I'm investigating, but if flagging it here in case > someone else finds a fix faster than I do. Yes, Marvin already sent a patch: http://dpdk.org/dev/patchwork/patch/2049/ > 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. Sorry, I forgot to test this basic case after applying the patch.
On Wed, Dec 17, 2014 at 11:43:51AM +0100, Thomas Monjalon wrote: > 2014-12-17 10:38, Bruce Richardson: > > On Wed, Dec 17, 2014 at 12:45:32AM +0100, Thomas Monjalon wrote: > > > 2014-12-11 02:54, Hiroshi Shimamoto: > > > > From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> > > > > > > > > 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. > > > > > > > > The current makefile generates an application that links to each library. > > > > This patch fixes to link the single library. > > > > > > > > Before > > > > $ ldd x86_64-ivshmem-linuxapp-gcc/app/test > > > > linux-vdso.so.1 => (0x00007fff232a1000) > > > > librte_distributor.so => not found > > > > librte_kni.so => not found > > > > librte_ivshmem.so => not found > > > > librte_pipeline.so => not found > > > > librte_table.so => not found > > > > librte_port.so => not found > > > > librte_timer.so => not found > > > > librte_hash.so => not found > > > > librte_lpm.so => not found > > > > librte_power.so => not found > > > > librte_acl.so => not found > > > > librte_meter.so => not found > > > > librte_sched.so => not found > > > > libm.so.6 => /lib64/libm.so.6 (0x00007fc638020000) > > > > librt.so.1 => /lib64/librt.so.1 (0x00007fc637e18000) > > > > librte_kvargs.so => not found > > > > librte_mbuf.so => not found > > > > librte_ip_frag.so => not found > > > > libethdev.so => not found > > > > librte_malloc.so => not found > > > > librte_mempool.so => not found > > > > librte_ring.so => not found > > > > librte_eal.so => not found > > > > librte_cmdline.so => not found > > > > librte_cfgfile.so => not found > > > > librte_pmd_bond.so => not found > > > > libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc637bfe000) > > > > libdl.so.2 => /lib64/libdl.so.2 (0x00007fc6379fa000) > > > > libintel_dpdk.so => not found > > > > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc6377dd000) > > > > libc.so.6 => /lib64/libc.so.6 (0x00007fc63741c000) > > > > /lib64/ld-linux-x86-64.so.2 (0x00007fc638330000) > > > > > > > > After > > > > $ ldd x86_64-ivshmem-linuxapp-gcc/app/test > > > > linux-vdso.so.1 => (0x00007fffb79fe000) > > > > librt.so.1 => /lib64/librt.so.1 (0x00007f0d8a971000) > > > > libm.so.6 => /lib64/libm.so.6 (0x00007f0d8a66f000) > > > > libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f0d8a458000) > > > > libdl.so.2 => /lib64/libdl.so.2 (0x00007f0d8a254000) > > > > libintel_dpdk.so => not found > > > > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0d8a037000) > > > > libc.so.6 => /lib64/libc.so.6 (0x00007f0d89c76000) > > > > /lib64/ld-linux-x86-64.so.2 (0x00007f0d8ab82000) > > > > > > > > Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> > > > > Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com> > > > > > > It is what I suggested to Sergio: > > > http://dpdk.org/ml/archives/dev/2014-December/009116.html > > > > > > Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com> > > > > > > Applied > > > > > > Thanks > > > > None of the example apps are compiling for me today, and git bisect indicates that > > this patch is the culprit. I'm investigating, but if flagging it here in case > > someone else finds a fix faster than I do. > > Yes, Marvin already sent a patch: Yes, so I see, Sergio just pointed it out to me here too! I'll ack that one for you. /Bruce > http://dpdk.org/dev/patchwork/patch/2049/ > > > 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. > > Sorry, I forgot to test this basic case after applying the patch. > > -- > Thomas
> Subject: Re: [dpdk-dev] [PATCH] mk: fix link to combined library > > On Wed, Dec 17, 2014 at 11:43:51AM +0100, Thomas Monjalon wrote: > > 2014-12-17 10:38, Bruce Richardson: > > > On Wed, Dec 17, 2014 at 12:45:32AM +0100, Thomas Monjalon wrote: > > > > 2014-12-11 02:54, Hiroshi Shimamoto: > > > > > From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> > > > > > > > > > > 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. > > > > > > > > > > The current makefile generates an application that links to each library. > > > > > This patch fixes to link the single library. > > > > > > > > > > Before > > > > > $ ldd x86_64-ivshmem-linuxapp-gcc/app/test > > > > > linux-vdso.so.1 => (0x00007fff232a1000) > > > > > librte_distributor.so => not found > > > > > librte_kni.so => not found > > > > > librte_ivshmem.so => not found > > > > > librte_pipeline.so => not found > > > > > librte_table.so => not found > > > > > librte_port.so => not found > > > > > librte_timer.so => not found > > > > > librte_hash.so => not found > > > > > librte_lpm.so => not found > > > > > librte_power.so => not found > > > > > librte_acl.so => not found > > > > > librte_meter.so => not found > > > > > librte_sched.so => not found > > > > > libm.so.6 => /lib64/libm.so.6 (0x00007fc638020000) > > > > > librt.so.1 => /lib64/librt.so.1 (0x00007fc637e18000) > > > > > librte_kvargs.so => not found > > > > > librte_mbuf.so => not found > > > > > librte_ip_frag.so => not found > > > > > libethdev.so => not found > > > > > librte_malloc.so => not found > > > > > librte_mempool.so => not found > > > > > librte_ring.so => not found > > > > > librte_eal.so => not found > > > > > librte_cmdline.so => not found > > > > > librte_cfgfile.so => not found > > > > > librte_pmd_bond.so => not found > > > > > libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc637bfe000) > > > > > libdl.so.2 => /lib64/libdl.so.2 (0x00007fc6379fa000) > > > > > libintel_dpdk.so => not found > > > > > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc6377dd000) > > > > > libc.so.6 => /lib64/libc.so.6 (0x00007fc63741c000) > > > > > /lib64/ld-linux-x86-64.so.2 (0x00007fc638330000) > > > > > > > > > > After > > > > > $ ldd x86_64-ivshmem-linuxapp-gcc/app/test > > > > > linux-vdso.so.1 => (0x00007fffb79fe000) > > > > > librt.so.1 => /lib64/librt.so.1 (0x00007f0d8a971000) > > > > > libm.so.6 => /lib64/libm.so.6 (0x00007f0d8a66f000) > > > > > libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f0d8a458000) > > > > > libdl.so.2 => /lib64/libdl.so.2 (0x00007f0d8a254000) > > > > > libintel_dpdk.so => not found > > > > > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0d8a037000) > > > > > libc.so.6 => /lib64/libc.so.6 (0x00007f0d89c76000) > > > > > /lib64/ld-linux-x86-64.so.2 (0x00007f0d8ab82000) > > > > > > > > > > Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> > > > > > Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com> > > > > > > > > It is what I suggested to Sergio: > > > > http://dpdk.org/ml/archives/dev/2014-December/009116.html > > > > > > > > Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com> > > > > > > > > Applied > > > > > > > > Thanks > > > > > > None of the example apps are compiling for me today, and git bisect indicates that > > > this patch is the culprit. I'm investigating, but if flagging it here in case > > > someone else finds a fix faster than I do. > > > > Yes, Marvin already sent a patch: > > Yes, so I see, Sergio just pointed it out to me here too! I'll ack that one > for you. > > /Bruce > > > http://dpdk.org/dev/patchwork/patch/2049/ > > > > > 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. > > > > Sorry, I forgot to test this basic case after applying the patch. I'm sorry too, I never checked examples and various configuration with this patch. thanks, Hiroshi
diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 84ec4df..3782eab 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -61,6 +61,8 @@ ifeq ($(NO_AUTOLIBS),) LDLIBS += --whole-archive +ifeq ($(RTE_BUILD_COMBINE_LIBS),n) + ifeq ($(CONFIG_RTE_LIBRTE_DISTRIBUTOR),y) LDLIBS += -lrte_distributor endif @@ -119,8 +121,12 @@ LDLIBS += -lm LDLIBS += -lrt endif +endif # ! RTE_BUILD_COMBINE_LIBS + LDLIBS += --start-group +ifeq ($(RTE_BUILD_COMBINE_LIBS),n) + ifeq ($(CONFIG_RTE_LIBRTE_KVARGS),y) LDLIBS += -lrte_kvargs endif @@ -216,6 +222,8 @@ endif endif # plugins +endif # ! RTE_BUILD_COMBINE_LIBS + LDLIBS += $(EXECENV_LDLIBS) LDLIBS += --end-group