Re: [sr-dev] [kamailio/kamailio] app_perl.so: undefined symbol: sv2int_str (#1012)
Fixed by 42d3b93f838d1c2eeb009894422fe016a6572520. -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1012#issuecomment-287618870___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] app_perl.so: undefined symbol: sv2int_str (#1012)
Closed #1012. -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1012#event-1005858852___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] app_perl.so: undefined symbol: sv2int_str (#1012)
It turns out this inline difference is not a bug but rather a C89 vs C11 difference, and gcc5 switched from -std=gnu89 to -std=gnu11 by default. So removing the inline is not a bad idea. Or better yet adding static. I'll send a pull request for adding static to that declaration. A quick test shows that adding static works. -JimC -- James CloosOpenPGP: 0x997A9F17ED7DAEA6 -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1012#issuecomment-284457010___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] app_perl.so: undefined symbol: sv2int_str (#1012)
> "DM" == Daniel-Constantin Mierlawrites: DM> If the function is not used in the same object (source file) only, DM> then inline should be removed, It is only used in the .xs file where it is defined. Without optimization gcc (at least gcc 5) leaves it in the .o file as an undefined symbol. I just duplicated what kamailio master does to make(1) kamailioxs.s, but with -S instead of -c. The four places where sv2int_str() is called show up as: callsv2int_str@PLT With -O2 or -O1 it gets inlined. So it seems that w/o optimization gcc5 fails to inline the function at its call sites, but also leaves it out because it was defined as inline. Gcc-4.8, OTOH, compiles it as a non-inlined function called run w/o optimization. So this is a gcc bug which kamailio can work around by optimizing. I see in Makefile.defs that CC_OPT defaults to -O3 when using clang. And before that it is ?='ed to -O9. But that -O9 didn't make it into the gcc calls when I tried compiling with Q=0. To test, make kama however you normally do, then: cd src/modules/app_perl rm kamailioxs.o make kamailioxs.o Q=0 copy the resulting cc line, replacing -c with -S and kamailioxs.o with kamailioxs.s and search for sv2int_str in that kamailioxs.s. -JimC -- James Cloos OpenPGP: 0x997A9F17ED7DAEA6 -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1012#issuecomment-284442048___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] app_perl.so: undefined symbol: sv2int_str (#1012)
If the function is not used in the same object (source file) only, then inline should be removed, because it doesn't do anything and it is not seen as symbol to other object files. If anyone can provide a pull request, then it will be merged, if not I will do it during next days. -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1012#issuecomment-284318192___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] app_perl.so: undefined symbol: sv2int_str (#1012)
I can confirm that CC_OPT=-O2 solves the problem. I've added this to our installer, so it solves the problem for us. It would still be good to fix this for others. -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1012#issuecomment-283535890___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] app_perl.so: undefined symbol: sv2int_str (#1012)
It looks like adding CC_OPT=-O2 to the make invocation works around this. W/ optimization gcc elides the inlined symbol, and that should allow the .so to load. -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1012#issuecomment-283509142___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] app_perl.so: undefined symbol: sv2int_str (#1012)
The function sv2int_str is defined in kamailio/src/modules/app_perl/kamailioxs.xs as inline. Which is why it does not show up in the .o or, therefor, the .so. The question is what expects it as a symbol? Removing inline from its definition may be a quick workaround. -JimC -- James CloosOpenPGP: 0x997A9F17ED7DAEA6 -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1012#issuecomment-283494183___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] app_perl.so: undefined symbol: sv2int_str (#1012)
Certainly: root@albatross:/lib64/kamailio/modules# ldd app_perl.so linux-vdso.so.1 => (0x7ffc2bb9c000) libperl.so.5.22 => /usr/lib/x86_64-linux-gnu/libperl.so.5.22 (0x7f823470f000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f82344f1000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f823412a000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x7f8233f26000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x7f8233c1d000) libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x7f82339e3000) /lib64/ld-linux-x86-64.so.2 (0x55ebaa31a000) -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1012#issuecomment-283277548___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] app_perl.so: undefined symbol: sv2int_str (#1012)
By which I certainly meant `app_perl.so`. -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1012#issuecomment-283248364___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] app_perl.so: undefined symbol: sv2int_str (#1012)
Hello Alistair, Could you provide the output of: ldd {module path}/mod_perl.so ? Thanks, -- Alex -- Alex Balashov | Principal | Evariste Systems LLC Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev