Skip to content
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

fatal error: use of undeclared identifier 'mysql_ssl_mode' #20139

Closed
neohyuga opened this issue Oct 5, 2024 · 5 comments
Closed

fatal error: use of undeclared identifier 'mysql_ssl_mode' #20139

neohyuga opened this issue Oct 5, 2024 · 5 comments

Comments

@neohyuga
Copy link

neohyuga commented Oct 5, 2024

Current Behaviour

Trying to update core to latest, during make, I get this error:

~/azerothcore/build$ make
[ 0%] Built target sfmt
[ 1%] Built target argon2
[ 1%] Built target fmt
[ 4%] Built target jemalloc
[ 8%] Built target g3dlib
[ 8%] Built target Detour
[ 9%] Built target Recast
[ 10%] Built target gsoap
[ 10%] Built target mpq
[ 15%] Built target common
[ 15%] Built target revision.h
[ 15%] Building CXX object src/server/database/CMakeFiles/database.dir/Database/MySQLConnection.cpp.o
/home/acadmin/azerothcore/src/server/database/Database/MySQLConnection.cpp:132:9: fatal error: use of undeclared identifier 'mysql_ssl_mode'; did you mean 'mysql_ssl_set'?
mysql_ssl_mode opt_use_ssl = SSL_MODE_DISABLED;
^~~~~~~~~~~~~~
mysql_ssl_set
/usr/include/mariadb/mysql.h:539:14: note: 'mysql_ssl_set' declared here
int STDCALL mysql_ssl_set(MYSQL *mysql, const char *key,
^
1 error generated.
make[2]: *** [src/server/database/CMakeFiles/database.dir/build.make:189: src/server/database/CMakeFiles/database.dir/Database/MySQLConnection.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1052: src/server/database/CMakeFiles/database.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Note that I got that error, then went searching for a solution. I found a message that said that said that MariaDB was no longer supported.

I then set out to backup databases, uninstall mariadb, install mysql 8.4-lts, import databases, then try again. Current binaries started just fine, so proceeded to attempt the make command again. But got same error. Perhaps some mariadb parts remain?

Expected Blizzlike Behaviour

Expected make command to complete successfully.

Source

No response

Steps to reproduce the problem

git pull
cd build
cmake ...
make

Extra Notes

No response

AC rev. hash/commit

d340ae0

Operating system

Debian 12

Custom changes or Modules

No response

@YinDeGuan
Copy link

new version abandon like #if OPENSSL_VERSION_NUMBER >= 0x30000000L #else ... #endif with inconsiderate writing

@neohyuga
Copy link
Author

neohyuga commented Oct 6, 2024

I do not follow.... do I need to change something?

@sudlud
Copy link
Member

sudlud commented Oct 6, 2024

Please ensure you're meeting the requirements like e.g. OpenSSL and MySQL version

https://www.azerothcore.org/wiki/linux-requirements

@Kitzunu
Copy link
Member

Kitzunu commented Oct 6, 2024

Make sure you delete cmake cache

@Kitzunu Kitzunu closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2024
@neohyuga
Copy link
Author

neohyuga commented Oct 6, 2024

I think the fix to my issue was a combination of what sudlud and Kitzune suggested.

I was missing installing this package: libmysqlclient-dev

I also had 2 mariadb packages still installed.

Once I cleaned that up, I got errors stating mysql.h was not found and that I had a reference to /usr/include/mariadb.

I ran "git clean -d -f -x" , which deleted the "build" directory.

I recreated it, re-ran cmake, then make. It compiled!

Hopefully this helps someone that was using mariadb on Debian 12 and migrated to MySQL 8.4-LTS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants