The-Cataclysm-Preservation-Project / TrinityCore

Archived repository for WoW 4.3.4.15595. The project will be reworked for Cataclysm Classic as an official new branch of TrinityCore at https://github.com/TrinityCore/TrinityCore
GNU General Public License v2.0
239 stars 97 forks source link

Fixed build for newer OpenSSL and MariaDB #398

Closed danielsreichenbach closed 1 year ago

danielsreichenbach commented 1 year ago

Changes proposed:

Issues addressed: None

Tests performed: (Does it build, tested in-game, etc)

Known issues and TODO list: None

FuzzyWuggzy commented 1 year ago

EDIT: Turns out it's an issue with my setup, forced it to use the OpenSSL 1.1.1 compatibility packages and it still failed, I've opened up an issue here.


Thank you for this, it helped with the OpenSSL incompatibility, but it still won't build and returns this error:

[ 83%] Building CXX object src/server/game/CMakeFiles/game.dir/Maps/MapReference.cpp.o
In file included from /mnt/[UUID]/TrinityCore/src/server/game/Handlers/TicketHandler.cpp:29:
/mnt/[UUID]/TrinityCore/src/server/game/Server/Packets/TicketPackets.h:71:43: error: declaration of ‘TaggedPosition<Position::XYZ> WorldPackets::Ticket::SupportTicketHeader::Position’ changes meaning of ‘Position’ [-fpermissive]
   71 |             TaggedPosition<Position::XYZ> Position;
      |                                           ^~~~~~~~
In file included from /mnt/[UUID]/TrinityCore/src/server/game/Entities/Object/MovementInfo.h:22,
                 from /mnt/[UUID]/TrinityCore/src/server/game/Entities/Object/Object.h:27,
                 from /mnt/[UUID]/TrinityCore/src/server/game/Entities/Unit/Unit.h:21,
                 from /mnt/[UUID]/TrinityCore/src/server/game/Entities/Creature/Creature.h:21,
                 from /mnt/[UUID]/TrinityCore/src/server/game/PrecompiledHeaders/gamePCH.h:20,
                 from /mnt/[UUID]/TrinityCore/build/src/server/game/CMakeFiles/game.dir/cmake_pch.hxx:5,
                 from <command-line>:
/mnt/[UUID]/TrinityCore/src/server/game/Entities/Object/Position.h:27:20: note: ‘Position’ declared here as ‘struct Position’
   27 | struct TC_GAME_API Position
      |                    ^~~~~~~~
make[2]: *** [src/server/game/CMakeFiles/game.dir/build.make:2477: src/server/game/CMakeFiles/game.dir/Handlers/TicketHandler.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1241: src/server/game/CMakeFiles/game.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

I'm not sure this is related to your PR, I can't build the master branch without downgrading OpenSSL system-wide. It built successfully for you and no commits have been made in two weeks so I can't say what the issue is.

Thank you again

Kind regards

Mr-Scooty commented 1 year ago

Successfully built on Ubuntu 22.04

Ovahlord commented 1 year ago

Mind to rebase this PR with the current head branch pls?

danielsreichenbach commented 1 year ago

Mind to rebase this PR with the current head branch pls?

Not at all, just pushed a rebased version of it.

Ovahlord commented 1 year ago

so apparently this PR has not been tested because I just did so and the bnetserver crashes right away when logging. so there are bits and pieces missing somewhere. Apparently the ARC4 part is missing quite a few refactors which needs to be cherrypicked first.

danielsreichenbach commented 1 year ago

so apparently this PR has not been tested because I just did so and the bnetserver crashes right away when logging. so there are bits and pieces missing somewhere. Apparently the ARC4 part is missing quite a few refactors which needs to be cherrypicked first.

Am running this for almost two months on a Ubuntu Linux machine, and did not get crashes there. Can check if you can tell me what settings you are using.

Ovahlord commented 1 year ago

I'm running it on Windows 11 using openssl 3.1. So if Linux runs fine, it's likely a missing compatability fix

Ovahlord commented 1 year ago

https://gist.github.com/Ovahlord/d150ef591fea528f1f1dbcd8711850b7 here's a crashlog if that helps you investigating

Ovahlord commented 1 year ago

well, based on my investigations, you forgot the entirety of HmacHash which is still using deprecated openssl methods and thus causing ARC4 to fetch a nullptr

Shauren commented 1 year ago

I have not looked at the code at all but any crashing that happens on windows but not on linux is because of a user error not copying legacy.dll in addition to the usual openssl dlls from install dir to server dir

Ovahlord commented 1 year ago

https://github.com/The-Cataclysm-Preservation-Project/TrinityCore/commit/a7527a8698e7c7ee5ca0c1f18f31d4e63400fd9d