Hi, vpp-dev teams.

I think this issue is a minor bug and still exists on v18.01-rc2.

There are no declaration of "sample_main" among all code files .
"sample_main" only has been declared as "extern" in sample.h.

> > load_one_plugin:142:
> > /vpp/build-root/install-vpp_debug-native/sample-plugin/lib64/vpp_plugins/sample_plugin.so:
> > undefined symbol: sample_main
> >
> > load_one_plugin:143: Failed to load plugin 'sample_plugin.so'


Below one line will solve it.

diff --git a/src/examples/sample-plugin/sample/sample.c 
b/src/examples/sample-plugin/sample/sample.c
index 703e604..cdd6d44 100644
--- a/src/examples/sample-plugin/sample/sample.c
+++ b/src/examples/sample-plugin/sample/sample.c
@@ -63,6 +63,7 @@ VLIB_PLUGIN_REGISTER () = {
 };
 /* *INDENT-ON* */

+sample_main_t sample_main;
 /**
  * @brief Enable/disable the macswap plugin.
  *


Thanks!
---
Best Regards,

Ryota Yushina,

> -----Original Message-----
> From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
> Behalf Of Kinsella, Ray
> Sent: Thursday, December 07, 2017 11:03 PM
> To: Pradeep Patel (pradpate) <pradp...@cisco.com>; vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] Building and running sample plugin
> 
> 
> You can find previous guidance on how to build it here.
> 
> https://docs.fd.io/vpp/17.10/sample_plugin_doc.html
> 
> Ray K
> 
> On 06/12/2017 19:44, Pradeep Patel (pradpate) wrote:
> >
> > I am trying to build and run sample plugin using make option. I see
> > sample plugin so gets created but failed due to undefined symbol:
> > sample_main. Any pointers with be helpful.
> >
> > Regards,
> > Pradeep
> >
> > >make build SAMPLE_PLUGIN=yes
> >
> > > make run SAMPLE_PLUGIN=yes
> >
> > vagrant@localhost:/vpp$ make run SAMPLE_PLUGIN=yes
> >
> > WARNING: STARTUP_CONF not defined or file doesn't exist.
> >
> > Running with minimal startup config:  unix { interactive cli-listen
> > /run/vpp/cli.sock gid 1000 }
> >
> > vlib_plugin_early_init:356: plugin path
> > /vpp/build-root/install-vpp_debug-native/sample-plugin/lib64/vpp_plugi
> > ns:/vpp/build-root/install-vpp_debug-native/vpp/lib64/vpp_plugins
> >
> > load_one_plugin:184: Loaded plugin: acl_plugin.so (Access Control
> > Lists)
> >
> > load_one_plugin:184: Loaded plugin: dpdk_plugin.so (Data Plane
> > Development Kit (DPDK))
> >
> > load_one_plugin:184: Loaded plugin: flowprobe_plugin.so (Flow per
> > Packet)
> >
> > load_one_plugin:184: Loaded plugin: gtpu_plugin.so (GTPv1-U)
> >
> > load_one_plugin:184: Loaded plugin: ila_plugin.so (Identifier-locator
> > addressing for IPv6)
> >
> > load_one_plugin:184: Loaded plugin: ioam_plugin.so (Inbound OAM)
> >
> > load_one_plugin:114: Plugin disabled (default): ixge_plugin.so
> >
> > load_one_plugin:184: Loaded plugin: lb_plugin.so (Load Balancer)
> >
> > load_one_plugin:184: Loaded plugin: libsixrd_plugin.so (IPv6 Rapid
> > Deployment on IPv4 Infrastructure (RFC5969))
> >
> > load_one_plugin:184: Loaded plugin: memif_plugin.so (Packet Memory
> > Interface (experimetal))
> >
> > load_one_plugin:184: Loaded plugin: nat_plugin.so (Network Address
> > Translation)
> >
> > load_one_plugin:184: Loaded plugin: pppoe_plugin.so (PPPoE)
> >
> > load_one_plugin:142:
> > /vpp/build-root/install-vpp_debug-native/sample-plugin/lib64/vpp_plugins/sample_plugin.so:
> > undefined symbol: sample_main
> >
> > load_one_plugin:143: Failed to load plugin 'sample_plugin.so'
> >
> > Aborted
> >
> > Makefile:434: recipe for target 'run' failed
> >
> > make: *** [run] Error 134
> >
> > vagrant@localhost:/vpp$ vim ^C
> >
> >
> >
> > _______________________________________________
> > vpp-dev mailing list
> > vpp-dev@lists.fd.io
> > https://lists.fd.io/mailman/listinfo/vpp-dev
> 
> _______________________________________________
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to