Guys, We’re not going to revert that patch. I strongly suspect that the problem is due to stale bits installed on the host.
Please check your system against this result: $ ldd /usr/bin/vpp_api_test linux-vdso.so.1 => (0x00007fff69357000) libvlibmemoryclient.so.0 => /usr/lib/x86_64-linux-gnu/libvlibmemoryclient.so.0 (0x00007f38f79c8000) libsvm.so.0 => /usr/lib/x86_64-linux-gnu/libsvm.so.0 (0x00007f38f77ab000) libvatplugin.so.0 => /usr/lib/x86_64-linux-gnu/libvatplugin.so.0 (0x00007f38f75a7000) libvppinfra.so.0 => /usr/lib/x86_64-linux-gnu/libvppinfra.so.0 (0x00007f38f72b9000) libvlibapi.so.0 => /usr/lib/x86_64-linux-gnu/libvlibapi.so.0 (0x00007f38f70a3000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f38f6e85000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f38f6c81000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f38f68b8000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f38f66af000) /lib64/ld-linux-x86-64.so.2 (0x0000564972b0c000) If you see that vpp_api_test is linked against libvlib.so, I guarantee that it will crash as described. Thanks… Dave From: Adrian Daniel Calianu [mailto:adrian.cali...@gmail.com] Sent: Monday, March 27, 2017 10:27 AM To: Jon Loeliger <j...@netgate.com> Cc: vpp-dev <vpp-dev@lists.fd.io>; Dave Barach (dbarach) <dbar...@cisco.com> Subject: Re: [vpp-dev] Strange C Dyanmic Loading Failure Hi all, I have the same issue. After I built the vpp from sources(master branch) and run vppctl I see a segmentation fault. This looks to be caused by the fact that the vlib_mains from init functions of dynamic linked libraries is 0x0. Following patch will fix the problem: --- a/src/vlib/global_funcs.h 19 +++ b/src/vlib/global_funcs.h 20 @@ -23,7 +23,7 @@ always_inline vlib_main_t * 21 vlib_get_main (void) 22 { 23 vlib_main_t *vm; 24 - vm = vlib_mains[os_get_cpu_number ()]; 25 + vm = vlib_mains ? vlib_mains[os_get_cpu_number ()] : &vlib_global_main; 26 ASSERT (vm); 27 return vm; 28 } This is like a part of patch did in commit: 80f54e20270ed0628ee725e3e3c515731a0188f2 need to be reverted. Is other fix of this issue? /Adrian On Tue, Mar 21, 2017 at 4:34 AM, Jon Loeliger <j...@netgate.com<mailto:j...@netgate.com>> wrote: On Mon, Mar 20, 2017 at 9:18 PM, Jon Loeliger <j...@netgate.com<mailto:j...@netgate.com>> wrote: Dave, With the advent of a compiling tree (hooray!), I've updated, rebuilt, installed, and tried running all the C libraries and API pieces again. Sadly, things are not working. Very early in the bring-up of a C executable that is linked to VPP's libraries (vlibmemoryclient vlibapi svm vppinfra), it goes into the weeds trying to load some statically configured CLI initialization functions dynamically: 80f54e20270ed0628ee725e3e3c515731a0188f2 Author: Dave Barach <d...@barachs.net<mailto:d...@barachs.net>> Date: Wed Mar 8 19:08:56 2017 -0500 vlib_mains == 0 special cases be gone Clean up spurious binary API client link dependency on libvlib.so, which managed to hide behind vlib_mains == 0 checks reached by VLIB_xxx_FUNCTION macros. Change-Id: I5df1f8ab07dca1944250e643ccf06e60a8462325 Signed-off-by: Dave Barach <d...@barachs.net<mailto:d...@barachs.net>> Also, if one simply 'git reverts' this one commit on the current top of tree, things resume working again. HTH, jdl _______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io<mailto: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