New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mysql linking issue with libnetsnmptrapd.so #150
Comments
I have a similar issue. After installing Ubuntu 20.04 (Focal) and installing default dependencies utilizing snmpd for monitoring we get a lot of issues with MySQL 8 trying to be installed, even if MariaDB is installed causing problems. Could the libmysqlclient dependency be taken out of libnetsnmptrapd.so to avoid conflicts with other systems being installed on the operating system ? Or have it depend on mysql-client or mariadb-client as a mutal depencency to avoid MySQL 8 server being installed Example from clean Focal system where I can't install snmpd due to this dependency:
|
This is around two Debian bugs. To better understand them, there are three Debian packages involved:
#953948 is asking why does the libsnmp30 (now libsnmp35) package keep depending on MySQL libraries and then stop depending on them.
#964166 is a bug report stating that libnetsnmptrapd.so uses MySQL library but is not linked to it. Looking at the source code, especially apps/Makefile.in and tracing where MYSQL_LIBS is used, you can see that snmptrapd binary is linked but the library is not.
This means that if someone wanted to link to libnetsnmptrapd they would get an error unless the binary was linked to MySQL library as well. The library should link to the other libraries it needs.
Except... it is impossible to simply link to libnetsnmptrapd as the header files are not shipped nor do net-snmp-config reference the library.
I see a few things that might need to happen:
You might also want to consider having libnetsnmptrapd.so conditionally using something like dlopen. This would mean that for most people they would not need or load the MySQL library but for those that do the dlopen and associated functions would make that feature work. If that is something of interest, I may be able to try to get that working myself and raise a pull request.
The text was updated successfully, but these errors were encountered: