Open petervnv opened 5 years ago
Has anyone been able to compile flexisip master without the soci error messages?
I'm facing the same issue with the build in debian repos has the same issue, can't figure out why. All the libraries it could need for mysql are there.
This is a summary of the solution from here
I had similar situation: 1) I have Debian 9 Stretch 2) Installed latest Flexisip packages 3) Got the same error:
liblinphone-warning-Unable to build db session with uri: Failed to find shared library for backend mysql
liblinphone-error-Unable to open linphone database with uri
4) Installed libsoci-mysql package:
# apt install libsoci-mysql3.2 (there is no apt install libsoci-mysql4.0 package available)
5) Restarted flexisip-conference service and got the same error
6) ~ 3 hours digging in /usr/lib/ , tried to make soft links like
ln -s /usr/lib/x86_64-linux-gnu/libsoci_mysql.so.3.2.3 /usr/lib/libsoci_mysql.so
etc. nothing helped
7) Launched
ldd /opt/belledonne-communications/bin/flexisip
and found the following line:
libsoci_core.so.4.0 => /opt/belledonne-communications/lib/libsoci_core.so.4.0 (0x00007f7f40f2f000)
FlexiSip comes bundled with Libsoci core library but without backends and this library of course looks for backend extensions at the same path where it resides!
8) Copied :
cp /usr/lib/x86_64-linux-gnu/libsoci_mysql.so.3.2.3 /opt/belledonne-communications/lib/libsoci_mysql.so.3.2.3
and renamed:
mv /opt/belledonne-communications/lib/libsoci_mysql.so.3.2.3 /opt/belledonne-communications/lib/libsoci_mysql.so.4.0
9) Restarted flexisip conference:
systemctl restart flexisip-conference
10) Checked the log (debug level enabled already):
tail /var/opt/belledonne-communications/log/flexisip/flexisip-conference.log
[...]
2020-02-02 03:50:44:882 liblinphone-message-Linphone core [0x55f3db3c9d40] notified [global_state_changed]
2020-02-02 03:50:44:882 liblinphone-message-No charset defined forcing utf8 4 bytes specially for conference subjet storage
2020-02-02 03:50:44:882 liblinphone-message-Opening linphone database db=flexisip user=xxxxx password='xxxxxxxx' host=127.0.0.1 charset=utf8mb4 with backend Mysql
Im experiencing the same. Tried above, but get segmentation failed/core dump on reg/db connection attempt. Im on Debian 10.
root@ims:/usr/src/flexisip/OUTPUT/bin# ./flexisip -c /home/fs/flexisip.conf Writing logs in : /usr/src/flexisip/OUTPUT/var/log/flexisip/flexisip-proxy.log Starting flexisip proxy-server version _b57016d9dba5f3e427b31ba8cb7cd84399c140f8 --on a registration/mysql db connection-- Segmentation fault (core dumped)
Further i can see this when im compiling. But i have mysql support.
-- Configuring SOCI:
-- SOCI_VERSION = 4.0.0
-- SOCI_ABI_VERSION = 4.0
-- SOCI_SHARED = YES
-- SOCI_STATIC = NO
-- SOCI_FRAMEWORK = OFF
-- SOCI_TESTS = NO
-- SOCI_ASAN = OFF
-- SOCI_CXX_C11 =
-- LIB_SUFFIX = 64
-- Looking for SOCI dependencies:
-- CMAKE_THREAD_LIBS_INIT = -lpthread
-- MySQL:
-- Performing Test HAVE_MYSQL_OPT_EMBEDDED_CONNECTION
-- Performing Test HAVE_MYSQL_OPT_EMBEDDED_CONNECTION - Failed
-- MySQL not found.
-- MySQL Embedded not found.
-- WARNING: MySQL libraries not found, some features will be disabled.
-- ODBC: disabled, since WITH_ODBC=OFF
-- Oracle: disabled, since WITH_ORACLE=OFF
-- PostgreSQL: disabled, since WITH_POSTGRESQL=OFF
-- SQLite3:
-- SQLITE3_INCLUDE_DIR = /usr/src/flexisip/OUTPUT/include
-- SQLITE3_LIBRARIES = /usr/src/flexisip/OUTPUT/lib/libsqlite3.so
-- Firebird: disabled, since WITH_FIREBIRD=OFF
-- DB2: disabled, since WITH_DB2=OFF
-- Configuring SOCI core library:
-- SOCI_CORE_TARGET = soci_core
-- SOCI_CORE_TARGET_OUTPUT_NAME = soci_core
-- SOCI_CORE_DEPS_LIBS = -lpthread /usr/lib/x86_64-linux-gnu/libdl.so
-- SOCI_CORE_INCLUDE_DIRS = /usr/src/flexisip/WORK/flexisip/Build/soci /usr/src/flexisip/linphone-sdk/external/soci/include /usr/src/flexisip/WORK/flexisip/Build/soci/include /usr/src/flexisip/linphone-sdk/external/soci/include/private /usr/src/flexisip/WORK/flexisip/Build/soci/src/core
-- WITH_BOOST =
-- COMPILE_DEFINITIONS = SOCI_ABI_VERSION="4.0" HAVE_DL=1 SOCI_LIBPREFIX="libsoci" SOCI_LIB_SUFFIX=".so" SOCI_DEBUG_POSTFIX=""
--
-- Configuring SOCI backend libraries:
-- MySQL not found.
-- MySQL Embedded not found.
Resolved after installing libmariadbclient-dev packages.
All works fine on Debian 10 buster.
This is a summary of the solution from here
I had similar situation:
- I have Debian 9 Stretch
- Installed latest Flexisip packages
- Got the same error:
liblinphone-warning-Unable to build db session with uri: Failed to find shared library for backend mysql liblinphone-error-Unable to open linphone database with uri
- Installed libsoci-mysql package:
# apt install libsoci-mysql3.2 (there is no apt install libsoci-mysql4.0 package available)
- Restarted flexisip-conference service and got the same error
- ~ 3 hours digging in /usr/lib/ , tried to make soft links like
ln -s /usr/lib/x86_64-linux-gnu/libsoci_mysql.so.3.2.3 /usr/lib/libsoci_mysql.so
etc. nothing helped- Launched
ldd /opt/belledonne-communications/bin/flexisip
and found the following line:libsoci_core.so.4.0 => /opt/belledonne-communications/lib/libsoci_core.so.4.0 (0x00007f7f40f2f000)
FlexiSip comes bundled with Libsoci core library but without backends and this library of course looks for backend extensions at the same path where it resides!- Copied :
cp /usr/lib/x86_64-linux-gnu/libsoci_mysql.so.3.2.3 /opt/belledonne-communications/lib/libsoci_mysql.so.3.2.3
and renamed:mv /opt/belledonne-communications/lib/libsoci_mysql.so.3.2.3 /opt/belledonne-communications/lib/libsoci_mysql.so.4.0
- Restarted flexisip conference:
systemctl restart flexisip-conference
- Checked the log (debug level enabled already):
tail /var/opt/belledonne-communications/log/flexisip/flexisip-conference.log [...] 2020-02-02 03:50:44:882 liblinphone-message-Linphone core [0x55f3db3c9d40] notified [global_state_changed] 2020-02-02 03:50:44:882 liblinphone-message-No charset defined forcing utf8 4 bytes specially for conference subjet storage 2020-02-02 03:50:44:882 liblinphone-message-Opening linphone database db=flexisip user=xxxxx password='xxxxxxxx' host=127.0.0.1 charset=utf8mb4 with backend Mysql
Thanks a lot, It resolved the problem (y)
You dont have to do this and this wont work in debian 10 either. more over renaming a lib to a different version can break many things. To fix this just install libmysqlclient dev packages and build with SOCI-MYSQL enabled.
more specifically
install
libmariadbclient-dev-compat https://packages.debian.org/stretch/libmariadbclient-dev-compat
libmariadbclient-dev https://packages.debian.org/stretch/libmariadbclient-dev-compat
./prepare.py flexisip -DENABLE_SOCI_MYSQL=ON
make -C WORK/flexisip/cmake
On Fri, May 8, 2020 at 2:03 PM ZeeshanKhalidSE notifications@github.com wrote:
This is a summary of the solution from here https://itgala.xyz/flexisip-error-failed-to-find-shared-library-for-backend-mysql/
I had similar situation:
- I have Debian 9 Stretch
- Installed latest Flexisip packages
- Got the same error:
liblinphone-warning-Unable to build db session with uri: Failed to find shared library for backend mysql liblinphone-error-Unable to open linphone database with uri
- Installed libsoci-mysql package:
apt install libsoci-mysql3.2 (there is no apt install
libsoci-mysql4.0 package available)
- Restarted flexisip-conference service and got the same error
- ~ 3 hours digging in /usr/lib/ , tried to make soft links like ln -s /usr/lib/x86_64-linux-gnu/libsoci_mysql.so.3.2.3 /usr/lib/libsoci_mysql.so etc. nothing helped
- Launched ldd /opt/belledonne-communications/bin/flexisip and found the following line: libsoci_core.so.4.0 => /opt/belledonne-communications/lib/libsoci_core.so.4.0 (0x00007f7f40f2f000) FlexiSip comes bundled with Libsoci core library but without backends and this library of course looks for backend extensions at the same path where it resides!
- Copied : cp /usr/lib/x86_64-linux-gnu/libsoci_mysql.so.3.2.3 /opt/belledonne-communications/lib/libsoci_mysql.so.3.2.3 and renamed: mv /opt/belledonne-communications/lib/libsoci_mysql.so.3.2.3 /opt/belledonne-communications/lib/libsoci_mysql.so.4.0
- Restarted flexisip conference: systemctl restart flexisip-conference
- Checked the log (debug level enabled already):
tail /var/opt/belledonne-communications/log/flexisip/flexisip-conference.log [...] 2020-02-02 03:50:44:882 liblinphone-message-Linphone core [0x55f3db3c9d40] notified [global_state_changed] 2020-02-02 03:50:44:882 liblinphone-message-No charset defined forcing utf8 4 bytes specially for conference subjet storage 2020-02-02 03:50:44:882 liblinphone-message-Opening linphone database db=flexisip user=xxxxx password='xxxxxxxx' host=127.0.0.1 charset=utf8mb4 with backend Mysql
Thanks a lot, It resolved the problem (y)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/BelledonneCommunications/flexisip/issues/50#issuecomment-625706135, or unsubscribe https://github.com/notifications/unsubscribe-auth/APE2EZTCAKV5UORNBKZYIJDRQO7UPANCNFSM4GQGERRA .
ok I will try this.
You dont have to do this and this wont work in debian 10 either. more over renaming a lib to a different version can break many things. To fix this just install libmysqlclient dev packages and build with SOCI-MYSQL enabled. more specifically install libmariadbclient-dev-compat https://packages.debian.org/stretch/libmariadbclient-dev-compat libmariadbclient-dev https://packages.debian.org/stretch/libmariadbclient-dev-compat ./prepare.py flexisip -DENABLE_SOCI_MYSQL=ON make -C WORK/flexisip/cmake … On Fri, May 8, 2020 at 2:03 PM ZeeshanKhalidSE @.***> wrote: This is a summary of the solution from here https://itgala.xyz/flexisip-error-failed-to-find-shared-library-for-backend-mysql/ I had similar situation: 1. I have Debian 9 Stretch 2. Installed latest Flexisip packages 3. Got the same error: liblinphone-warning-Unable to build db session with uri: Failed to find shared library for backend mysql liblinphone-error-Unable to open linphone database with uri 1. Installed libsoci-mysql package: # apt install libsoci-mysql3.2 (there is no apt install libsoci-mysql4.0 package available) 2. Restarted flexisip-conference service and got the same error 3. ~ 3 hours digging in /usr/lib/ , tried to make soft links like ln -s /usr/lib/x86_64-linux-gnu/libsoci_mysql.so.3.2.3 /usr/lib/libsoci_mysql.so etc. nothing helped 4. Launched ldd /opt/belledonne-communications/bin/flexisip and found the following line: libsoci_core.so.4.0 => /opt/belledonne-communications/lib/libsoci_core.so.4.0 (0x00007f7f40f2f000) FlexiSip comes bundled with Libsoci core library but without backends and this library of course looks for backend extensions at the same path where it resides! 5. Copied : cp /usr/lib/x86_64-linux-gnu/libsoci_mysql.so.3.2.3 /opt/belledonne-communications/lib/libsoci_mysql.so.3.2.3 and renamed: mv /opt/belledonne-communications/lib/libsoci_mysql.so.3.2.3 /opt/belledonne-communications/lib/libsoci_mysql.so.4.0 6. Restarted flexisip conference: systemctl restart flexisip-conference 7. Checked the log (debug level enabled already): tail /var/opt/belledonne-communications/log/flexisip/flexisip-conference.log [...] 2020-02-02 03:50:44:882 liblinphone-message-Linphone core [0x55f3db3c9d40] notified [global_state_changed] 2020-02-02 03:50:44:882 liblinphone-message-No charset defined forcing utf8 4 bytes specially for conference subjet storage 2020-02-02 03:50:44:882 liblinphone-message-Opening linphone database db=flexisip user=xxxxx password='xxxxxxxx' host=127.0.0.1 charset=utf8mb4 with backend Mysql Thanks a lot, It resolved the problem (y) — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#50 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/APE2EZTCAKV5UORNBKZYIJDRQO7UPANCNFSM4GQGERRA .
Just installed a fresh debian (9) package of flexisip and noticed right away there are now new errors related to soci
flexisip[998]: [SOCI] connection pool open error: Failed to find shared library for backend mysql
I have soci installed already:
/usr/lib/libsoci_mysql.so.3.2 /usr/lib/libsoci_mysql.so.3.2.3 /usr/lib/x86_64-linux-gnu/libsoci_mysql.so.3.2 /usr/lib/x86_64-linux-gnu/libsoci_mysql.so.3.2.3 /usr/lib/x86_64-linux-gnu/libsoci_mysql.so /opt/belledonne-communications/lib/libsoci_mysql.so.4.0 /opt/belledonne-communications/lib/libsoci_mysql.so.4.0.0
And in flexisip.conf I've tried both these options:
datasource=DRIVER={/usr/lib/x86_64-linux-gnu/libsoci_mysql.so.3.2.3};SERVER=localhost;PORT=5000;DATABASE=mydb;USER=flexisip;PASSWORD=mypassword;OPTION=3; AND also tried datasource=DRIVER={/opt/belledonne-communications/lib/libsoci_mysql.so.4.0.0};SERVER=localhost;PORT=5000;DATABASE=mydb;USER=flexisip;PASSWORD=mypasswordOPTION=3;
Unfortunately none of those seem to work since flexisip doesn't start up and systemctl status shows that it can't find soci for some reason.
flexisip[998]: [SOCI] connection pool open error: Failed to find shared library for backend mysql
The datasource=DRIVER={/usr/lib/x86_64-linux-gnu/libsoci_mysql.so.3.2.3};SERVER=localhost;PORT=5000;DATABASE=mydb;USER=flexisip;PASSWORD=mypassword;OPTION=3; option used to work fine with previous versions of flexisip, so not sure what changed.
Any help please?
Cheers, Peter