azerothcore / azerothcore-wotlk

Complete Open Source and Modular solution for MMO
http://www.azerothcore.org
GNU Affero General Public License v3.0
6.41k stars 2.57k forks source link

Build on Debian 12 is failing #19999

Closed Deiskos closed 3 hours ago

Deiskos commented 4 hours ago

Current Behaviour

/home/admin/azerothcore/src/server/database/Database/MySQLConnection.cpp:133:9: fatal error: use of undeclared identifier 'mysql_ssl_mode'; did you mean 'mysql_ssl_set'?

If I wipe the VM and manually install MySQL as described in https://www.azerothcore.org/wiki/linux-requirements it still fails because it still wants to use MariaDB headers.

If I uninstall MariaDB packages cmake can't find /usr/include/mariadb

If I symlink /usr/include/mariadb to /usr/include/mysql I get No rule to make target '/usr/lib/x86_64-linux-gnu/libmariadb.so' at the end of the build.

After reverting commit dbde182ecdcf3ebe392943c2b34adae1fdf00110 the build succeeds.

Expected Blizzlike Behaviour

I expect the build to not fail.

Source

No response

Steps to reproduce the problem

  1. Try to build on Debian 12 by following https://www.azerothcore.org/wiki/classic-installation
  2. Fail

Extra Notes

I found out about this project today and wanted to build it to see how it works and play around with it.

AC rev. hash/commit

n/a

Operating system

Debian 12

Custom changes or Modules

No response

Kitzunu commented 3 hours ago

MariaDB is not supported

Deiskos commented 3 hours ago

Even if I follow the installation guide on a completely fresh VM it still doesn't work.

sudlud commented 2 hours ago

The guide probably needs an update. Installing the requirements with acore.sh should also work

sudlud commented 2 hours ago

Also where does the guide reference mariadb still?

Deiskos commented 2 hours ago

Installing the requirements with acore.sh should also work

Nope. Tried on a fresh copy of a Debian 12 VM, here's the log and I definitely saw it install MySQL.


[ 16%] Building CXX object src/server/database/CMakeFiles/database.dir/Database/DatabaseWorker.cpp.o
[ 16%] Building CXX object src/server/database/CMakeFiles/database.dir/Database/DatabaseWorkerPool.cpp.o
[ 17%] Building CXX object src/server/database/CMakeFiles/database.dir/Database/AdhocStatement.cpp.o
[ 17%] Building CXX object src/server/database/CMakeFiles/database.dir/Database/DatabaseLoader.cpp.o
[ 17%] Building CXX object src/server/database/CMakeFiles/database.dir/Database/DatabaseEnv.cpp.o
[ 17%] Building CXX object src/server/database/CMakeFiles/database.dir/Database/Field.cpp.o
[ 17%] Building CXX object src/server/database/CMakeFiles/database.dir/Database/MySQLPreparedStatement.cpp.o
[ 17%] Building CXX object src/server/database/CMakeFiles/database.dir/Database/MySQLConnection.cpp.o
[ 17%] Building CXX object src/server/database/CMakeFiles/database.dir/Database/MySQLThreading.cpp.o
[ 17%] Building CXX object src/server/database/CMakeFiles/database.dir/Database/PreparedStatement.cpp.o
[ 17%] Building CXX object src/server/database/CMakeFiles/database.dir/Database/QueryCallback.cpp.o
[ 18%] Building CXX object src/server/database/CMakeFiles/database.dir/Database/QueryHolder.cpp.o
/home/admin/azerothcore/src/server/database/Database/MySQLConnection.cpp:133: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.
gmake[2]: *** [src/server/database/CMakeFiles/database.dir/build.make:189: src/server/database/CMakeFiles/database.dir/Database/MySQLConnection.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [CMakeFiles/Makefile2:964: src/server/database/CMakeFiles/database.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2```
Deiskos commented 2 hours ago

Also where does the guide reference mariadb still?

It doesn't, I tried the unsupported Debian 12 guide (because I'm inattentive and didn't notice the big red Unsupported tag) and it didn't work, as expected. Then I tried the Classic Installation and that didn't work either with the same message. THEN I tried a workaround that also didn't work but at least got me a bit further.

And only then finally I resorted to reverting the commit.

sudlud commented 2 hours ago

I'll try to reproduce this later

Kitzunu commented 1 hour ago

Delete the cmake cache. It probably holds maria info still

Some knowledgable people here that can assist if you need help https://discord.com/channels/217589275766685707/1284562156804902932

sudlud commented 52 minutes ago

can't confirm this, just built a35f0c4ef61f20dd88fffff4ac5864830c4c0daf on Debian 12 VPS

build completed without any issues.

Deiskos commented 43 minutes ago

https://github.com/azerothcore/azerothcore-wotlk/commit/a35f0c4ef61f20dd88fffff4ac5864830c4c0daf

Unless I'm reading this wrong, that commit is from 4 days ago, the commit that removed support for Maria is https://github.com/azerothcore/azerothcore-wotlk/commit/dbde182ecdcf3ebe392943c2b34adae1fdf00110 from yesterday.

sudlud commented 40 minutes ago

true, my fork was not up to date, retrying now

Deiskos commented 40 minutes ago

Delete the cmake cache. It probably holds maria info still

I used the completely clean debian-12-generic-amd64 cloud image fetched from https://cloud.debian.org/images/cloud/ about a month ago. There is no cache present when I followed the Classic Installation nor when I used acore.sh