azerothcore / azerothcore-wotlk

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

Unable to build application on Linux #12100

Closed noisiver closed 1 year ago

noisiver commented 2 years ago

Current Behaviour

It's possible to compile the source on linux when not using -DAPPS_BUILD or when using -DAPPS_BUILD="all" but the compile will fail if using -DAPPS_BUILD="auth-only" or -DAPPS_BUILD="world-only".

Expected Blizzlike Behaviour

It should be possible to compile specific applications.

Source

No response

Steps to reproduce the problem

  1. Clone the source
  2. Create the build directory
  3. Run cmake and use -DAPPS_BUILD="auth-only" or -DAPPS_BUILD="world-only"
  4. Run make

Extra Notes

No response

AC rev. hash/commit

82cfd1b8d4147f09564e692f13effc4142178d72

Operating system

Debian 11 x64

Custom changes or Modules

No response

noisiver commented 2 years ago

@Winfidonarleyan Could you have a look at this? (I was told to ping you)

Winfidonarleyan commented 2 years ago

https://github.com/WarheadCore/WarheadBand/runs/6951152533?check_suite_focus=true

https://github.com/WarheadCore/WarheadBand/runs/6951152510?check_suite_focus=true

I'll try it tomorrow in ac

noisiver commented 2 years ago

I'm not sure if Clang 12 fixes it or not but I'm using 11.0.1-2 since that's what's provided by Debian. I can't imagine Clang 11 being the issue though. I'm also using Debian 11 and not any Ubuntu version. I have to set a VM up to test Ubuntu to see if it works there.

noisiver commented 2 years ago

Just an update. I tried Ubuntu 21.10, using Clang 13, and it produces the same error. image

EDIT: Just to show the line I use for cmake cmake ../ -DCMAKE_INSTALL_PREFIX=/opt/azerothcore -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DWITH_WARNINGS=1 -DSCRIPTS=static -DAPPS_BUILD="auth-only"

noisiver commented 2 years ago

I figured I'd throw an update at you. I use Windows 10 when I'm working on my modules or LUA scripts and decided to use world-only since I still use my authserver on Linux to connect to it, and this happened.

Build started...
1>------ Build started: Project: sfmt, Configuration: RelWithDebInfo x64 ------
2>------ Build started: Project: revision.h, Configuration: RelWithDebInfo x64 ------
3>------ Build started: Project: fmt, Configuration: RelWithDebInfo x64 ------
4>------ Build started: Project: argon2, Configuration: RelWithDebInfo x64 ------
1>Building Custom Rule C:/AzerothCore/deps/SFMT/CMakeLists.txt
1>SFMT.c
4>Building Custom Rule C:/AzerothCore/deps/argon2/CMakeLists.txt
3>Building Custom Rule C:/AzerothCore/deps/fmt/CMakeLists.txt
4>argon2.c
4>blake2b.c
4>core.c
4>encoding.c
4>opt.c
4>thread.c
2>Building Custom Rule C:/AzerothCore/src/genrev/CMakeLists.txt
1>sfmt.vcxproj -> C:\AzerothCore\build\deps\SFMT\RelWithDebInfo\sfmt.lib
5>------ Build started: Project: worldserver, Configuration: RelWithDebInfo x64 ------
5>Building Custom Rule C:/AzerothCore/src/server/apps/CMakeLists.txt
4>argon2.vcxproj -> C:\AzerothCore\build\deps\argon2\RelWithDebInfo\argon2.lib
5>cmake_pch.cxx
5>C:/AzerothCore/src/server/apps/worldserver/PrecompiledHeaders/worldserverPCH.h(18,10): fatal error C1083: Cannot open include file: 'Common.h': No such file or directory
5>Done building project "worldserver.vcxproj" -- FAILED.
3>format.cc
3>os.cc
3>fmt.vcxproj -> C:\AzerothCore\build\deps\fmt\RelWithDebInfo\fmt.lib
6>------ Build started: Project: common, Configuration: RelWithDebInfo x64 ------
6>Building Custom Rule C:/AzerothCore/src/common/CMakeLists.txt
6>cmake_pch.cxx
6>Banner.cpp
6>Common.cpp
6>GitRevision.cpp
6>BuiltInConfig.cpp
6>Config.cpp
6>AES.cpp
6>ARC4.cpp
6>Argon2.cpp
6>BigNumber.cpp
6>CryptoRandom.cpp
6>OpenSSLCrypto.cpp
6>TOTP.cpp
6>AuthCrypt.cpp
6>SRP6.cpp
6>DBCFileLoader.cpp
6>Base32.cpp
6>Base64.cpp
6>IPLocation.cpp
6>Appender.cpp
6>AppenderConsole.cpp
6>AppenderFile.cpp
6>Log.cpp
6>LogMessage.cpp
6>LogOperation.cpp
6>Logger.cpp
6>enuminfo_AppenderConsole.cpp
6>enuminfo_LogCommon.cpp
6>Metric.cpp
6>ProcessPriority.cpp
6>Threading.cpp
6>EventMap.cpp
6>EventProcessor.cpp
6>Random.cpp
6>SFMTRand.cpp
6>StartProcess.cpp
6>StringFormat.cpp
6>TaskScheduler.cpp
6>Timer.cpp
6>Tokenize.cpp
6>Util.cpp
6>Errors.cpp
6>common.vcxproj -> C:\AzerothCore\build\src\common\RelWithDebInfo\common.lib
7>------ Build started: Project: database, Configuration: RelWithDebInfo x64 ------
7>Building Custom Rule C:/AzerothCore/src/server/database/CMakeLists.txt
7>cmake_pch.cxx
7>AdhocStatement.cpp
7>DatabaseEnv.cpp
7>DatabaseLoader.cpp
7>DatabaseWorker.cpp
7>DatabaseWorkerPool.cpp
7>Field.cpp
7>MySQLConnection.cpp
7>MySQLPreparedStatement.cpp
7>MySQLThreading.cpp
7>PreparedStatement.cpp
7>QueryCallback.cpp
7>QueryHolder.cpp
7>QueryResult.cpp
7>Transaction.cpp
7>CharacterDatabase.cpp
7>LoginDatabase.cpp
7>WorldDatabase.cpp
7>AppenderDB.cpp
7>DBUpdater.cpp
7>UpdateFetcher.cpp
7>database.vcxproj -> C:\AzerothCore\build\src\server\database\RelWithDebInfo\database.lib
8>------ Build started: Project: ALL_BUILD, Configuration: RelWithDebInfo x64 ------
8>Building Custom Rule C:/AzerothCore/CMakeLists.txt
9>------ Skipped Build: Project: INSTALL, Configuration: RelWithDebInfo x64 ------
9>Project not selected to build for this solution configuration 
========== Build: 7 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========

It seems to not affect only Linux.

noisiver commented 2 years ago

image I made this change and it reaches another point. Both auth and world require common and database, which is why I added them outside the if else below it. But now the error instead is as shown below.

auth-only:

In file included from <built-in>:1:
In file included from /opt/azerothcore/build/src/server/apps/CMakeFiles/authserver.dir/cmake_pch.hxx:5:
/opt/azerothcore/src/server/apps/authserver/PrecompiledHeaders/authserverPCH.h:22:10: fatal error: 'RealmList.h' file not found
#include "RealmList.h"
         ^~~~~~~~~~~~~
1 error generated.

world-only:

In file included from <built-in>:1:
In file included from /opt/azerothcore/build/src/server/apps/CMakeFiles/worldserver.dir/cmake_pch.hxx:5:
/opt/azerothcore/src/server/apps/worldserver/PrecompiledHeaders/worldserverPCH.h:23:10: fatal error: 'World.h' file not found
#include "World.h"
         ^~~~~~~~~
1 error generated.

I can't seem to figure out how to make those files accessible by each application so if anyone could lend a hand it would be so greatly appreciated.

Compiling using -DAPPS_BUILD="all" always work, for some reason.

noisiver commented 2 years ago

I'm dropping the attention for this issue for the time being. I did find a solution that works but I'm not sure if it's the real way of doing it so I'm not going to open a pull request for it yet.

In case anyone is interested in getting this feature working, here is the very little I had to change: https://github.com/tkn963/azerothcore-wotlk/commit/19a26ab8cb029ccd20d10a5bcbb913bba97944a6

mcdubhghlas commented 2 years ago

Just an update. I tried Ubuntu 21.10, using Clang 13, and it produces the same error. image

EDIT: Just to show the line I use for cmake cmake ../ -DCMAKE_INSTALL_PREFIX=/opt/azerothcore -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DWITH_WARNINGS=1 -DSCRIPTS=static -DAPPS_BUILD="auth-only"

I tried this out... Here are some important notes, I'm running gentoo linux and clang-14.0.4

$ cmake ../ -DCMAKE_INSTALL_PREFIX=/mnt/hdd0/PrivateServers/Worldofwarcraft/TESTING -DCMAKE_C_COMPILER=/usr/lib/llvm/14/bin/c>
CMake Warning:
  Ignoring extra path from command line:

   "DCMAKE_CXX_COMPILER=/usr/lib/llvm/14/bin/clang++"

-- CMake version: 3.23.2
-- Running cmake hook: AFTER_LOAD_CONF
-- No hooks registered for AFTER_LOAD_CONF
-- Enabled С++20 standard
-- Detected 64-bit platform
-- UNIX: Using jemalloc
-- UNIX: Using default configuration directory
-- UNIX: Using default library directory
-- UNIX: Configuring uninstall target
-- UNIX: Created uninstall target
-- UNIX: Detected compiler: /usr/lib/llvm/14/bin/clang
-- Clang: Minimum version required is 10.0.0, found 14.0.4 - ok!
-- Clang: All warnings enabled
-- Running cmake hook: AFTER_LOAD_CMAKE_MODULES
-- No hooks registered for AFTER_LOAD_CMAKE_MODULES
-- Using mysql-config: /usr/bin/mysql_config
-- Found MySQL library: /usr/lib64/libmysqlclient.so
-- Found MySQL headers: /usr/include/mysql
-- Found MySQL executable: /usr/bin/mysql
-- Found git binary : /usr/bin/git

* AzerothCore revision            : 351294ed3807 2022-06-22 23:31:47 -0500 (master branch)
* AzerothCore buildtype           : RelWithDebInfo

* Install core to                 : /mnt/hdd0/PrivateServers/Worldofwarcraft/TESTING
* Install libraries to            : /mnt/hdd0/PrivateServers/Worldofwarcraft/TESTING/lib
* Install configs to              : /mnt/hdd0/PrivateServers/Worldofwarcraft/TESTING/etc

* Build applications              : Yes (auth-only)
* Build tools                     : No
* Build with scripts              : Yes (static)
* Build with modules              : Yes (static)
* Build unit tests                : No  (default)
* Build core w/PCH                : Yes (default)
* Build scripts w/PCH             : Yes (default)
* Show all warnings               : Yes
* Use coreside debug              : No  (default)
* Use unix gperftools             : No  (default)
* Use GIT revision hash           : Yes (default)
* Enable vmap DisableMgr checks   : Yes (default)
* Show source tree                : No (For UNIX default)

-- Running cmake hook: BEFORE_SRC_LOAD
-- No hooks registered for BEFORE_SRC_LOAD

* Apps build list (auth-only):
  |
  +- apps
  |   +- authserver
  |
  |  disabled
  |   +- worldserver
  |

-- Running cmake hook: AFTER_SRC_LOAD
-- No hooks registered for AFTER_SRC_LOAD
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/hdd0/PrivateServers/Worldofwarcraft/azerothcore-wotlk-gentoo/build
$ make -j30 && make install
Consolidate compiler generated dependencies of target sfmt
Consolidate compiler generated dependencies of target fmt
Consolidate compiler generated dependencies of target argon2
Consolidate compiler generated dependencies of target jemalloc
[  1%] Building C object deps/SFMT/CMakeFiles/sfmt.dir/SFMT.c.o
[  1%] Building C object deps/argon2/CMakeFiles/argon2.dir/argon2/argon2.c.o
[  2%] Building C object deps/argon2/CMakeFiles/argon2.dir/argon2/blake2/blake2b.c.o
[  3%] Building C object deps/argon2/CMakeFiles/argon2.dir/argon2/core.c.o
[  5%] Building C object deps/argon2/CMakeFiles/argon2.dir/argon2/encoding.c.o
[  5%] Building C object deps/argon2/CMakeFiles/argon2.dir/argon2/opt.c.o
[  6%] Building C object deps/argon2/CMakeFiles/argon2.dir/argon2/thread.c.o
[  8%] Building CXX object deps/fmt/CMakeFiles/fmt.dir/src/os.cc.o
[  8%] Building CXX object deps/fmt/CMakeFiles/fmt.dir/src/format.cc.o
[  9%] Linking CXX static library libsfmt.a
[  9%] Built target revision.h
Consolidate compiler generated dependencies of target authserver
[  9%] Built target sfmt
[  9%] Linking CXX static library libargon2.a
[  9%] Built target argon2
[ 11%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/arena.c.o
[ 11%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/background_thread.c.o
[ 11%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/base.c.o
[ 12%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/bin.c.o
[ 15%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/bitmap.c.o
[ 15%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/ctl.c.o
[ 16%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/ckh.c.o
[ 16%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/div.c.o
[ 17%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/extent.c.o
[ 17%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/extent_dss.c.o
[ 18%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/extent_mmap.c.o
[ 19%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/hash.c.o
[ 20%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/hook.c.o
[ 21%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/jemalloc.c.o
[ 23%] Building CXX object deps/jemalloc/CMakeFiles/jemalloc.dir/src/jemalloc_cpp.cpp.o
[ 23%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/large.c.o
[ 24%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/log.c.o
[ 24%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/malloc_io.c.o
[ 27%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/nstime.c.o
[ 27%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/mutex_pool.c.o
[ 27%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/mutex.c.o
[ 28%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/pages.c.o
[ 30%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/prof.c.o
[ 30%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/prng.c.o
[ 30%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/rtree.c.o
[ 32%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/safety_check.c.o
[ 32%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/stats.c.o
[ 33%] Building CXX object src/server/apps/CMakeFiles/authserver.dir/cmake_pch.hxx.pch
In file included from <built-in>:1:
In file included from /mnt/hdd0/PrivateServers/Worldofwarcraft/azerothcore-wotlk-gentoo/build/src/server/apps/CMakeFiles/authserver.dir/cmake_pch.hxx:5:
/mnt/hdd0/PrivateServers/Worldofwarcraft/azerothcore-wotlk-gentoo/src/server/apps/authserver/PrecompiledHeaders/authserverPCH.h:18:10: fatal error: 'Common.h' file not found
#include "Common.h"
         ^~~~~~~~~~
1 error generated.
make[2]: *** [src/server/apps/CMakeFiles/authserver.dir/build.make:77: src/server/apps/CMakeFiles/authserver.dir/cmake_pch.hxx.pch] Error 1
make[1]: *** [CMakeFiles/Makefile2:563: src/server/apps/CMakeFiles/authserver.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 34%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/sc.c.o
[ 35%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/sz.c.o
[ 36%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/tcache.c.o
[ 36%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/test_hooks.c.o
[ 37%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/ticker.c.o
[ 38%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/tsd.c.o
[ 39%] Building C object deps/jemalloc/CMakeFiles/jemalloc.dir/src/witness.c.o
[ 40%] Linking CXX static library libjemalloc.a
[ 40%] Built target jemalloc
[ 41%] Linking CXX static library libfmt.a
[ 41%] Built target fmt
make: *** [Makefile:136: all] Error 2

So, it would appear to be an issue just generally and your clang-version isn't too relevant....

It looks like you need to move all the proper files over though that are needed in ./rc/server/apps/authserver/PrecompiledHeaders/authserverPCH.h

$ cp ./src/common/Common.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/common/Define.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp .src/common/CompilerDefs.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/common/Configuration/Config.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/server/database/Database/DatabaseEnv.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/server/database/Database/DatabaseWorkerPool.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/server/database/Database/DatabaseEnvFwd.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/common/Utilities/StringFormat.h ./src/server/apps/authserver/PrecompiledHeaders/
$ mkdir ./src/server/apps/authserver/PrecompiledHeaders/Implementation/
$ cp /src/server/database/Database/Implementation/CharacterDatabase.h ./src/server/apps/authserver/PrecompiledHeaders/Implementation/
$ cp /src/server/database/Database/MySQLConnection.h ./src/server/apps/authserver/PrecompiledHeaders/Implementation/
$ cp ./src/server/database/Database/DatabaseEnvFwd.h ./src/server/apps/authserver/PrecompiledHeaders/Implementation/
$ cp ./src/common/Define.h ./src/server/apps/authserver/PrecompiledHeaders/Implementation/
$ cp ./src/server/database/Database/Implementation/LoginDatabase.h ./src/server/apps/authserver/PrecompiledHeaders/Implementation/
$ cp ./src/server/database/Database/Implementation/WorldDatabase.h ./src/server/apps/authserver/PrecompiledHeaders/Implementation/
$ cp  ./src/server/database/Database/Field.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/common/Utilities/Duration.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/server/database/Database/PreparedStatement.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/common/Utilities/Optional.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/server/database/Database/SQLOperation.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/server/database/Database/QueryCallback.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/server/database/Database/QueryResult.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/server/database/Database/Transaction.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/common/Logging/Log.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/common/Logging/LogCommon.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/server/shared/Realms/RealmList.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/server/shared/Realms/Realm.h ./src/server/apps/authserver/PrecompiledHeaders/
$ cp ./src/common/Asio/AsioHacksFwd.h ./src/server/apps/authserver/PrecompiledHeaders/

I've compiled each time I moved and it fails, asking for more stuff....

$ make -j30 && make install                                                                                                   
[  2%] Built target sfmt
[ 10%] Built target fmt
[ 10%] Built target argon2
$ make -j30 && make install                                                                                                   
[  2%] Built target sfmt
[ 10%] Built target argon2
[ 10%] Built target fmt
[ 40%] Built target jemalloc
$ make -j30 && make install                                                                                                   
[  2%] Built target sfmt
[  7%] Built target argon2
[ 10%] Built target fmt
[ 40%] Built target jemalloc
[ 77%] Built target common
[ 95%] Built target database
[ 95%] Built target revision.h
[ 96%] Building CXX object src/server/apps/CMakeFiles/authserver.dir/cmake_pch.hxx.pch
[ 98%] Building CXX object src/server/apps/CMakeFiles/authserver.dir/authserver/Main.cpp.o
[ 98%] Building CXX object src/server/apps/CMakeFiles/authserver.dir/authserver/Authentication/AuthCodes.cpp.o
[ 99%] Building CXX object src/server/apps/CMakeFiles/authserver.dir/authserver/Server/AuthSession.cpp.o
/mnt/hdd0/PrivateServers/Worldofwarcraft/azerothcore-wotlk-gentoo/src/server/apps/authserver/Main.cpp:26:10: fatal error: 'AppenderDB.h' file not found
#include "AppenderDB.h"
         ^~~~~~~~~~~~~~
In file included from /mnt/hdd0/PrivateServers/Worldofwarcraft/azerothcore-wotlk-gentoo/src/server/apps/authserver/Authentication/AuthCodes.cpp:18:
/mnt/hdd0/PrivateServers/Worldofwarcraft/azerothcore-wotlk-gentoo/src/server/apps/authserver/Authentication/AuthCodes.h:21:10: fatal error: 'Define.h' file not found
#include "Define.h"
         ^~~~~~~~~~
In file included from /mnt/hdd0/PrivateServers/Worldofwarcraft/azerothcore-wotlk-gentoo/src/server/apps/authserver/Server/AuthSession.cpp:18:
/mnt/hdd0/PrivateServers/Worldofwarcraft/azerothcore-wotlk-gentoo/src/server/apps/authserver/Server/AuthSession.h:21:10: fatal error: 'AsyncCallbackProcessor.h' file not found
#include "AsyncCallbackProcessor.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [src/server/apps/CMakeFiles/authserver.dir/build.make:109: src/server/apps/CMakeFiles/authserver.dir/authserver/Authentication/AuthCodes.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [src/server/apps/CMakeFiles/authserver.dir/build.make:125: src/server/apps/CMakeFiles/authserver.dir/authserver/Server/AuthSession.cpp.o] Error 1
1 error generated.
make[2]: *** [src/server/apps/CMakeFiles/authserver.dir/build.make:93: src/server/apps/CMakeFiles/authserver.dir/authserver/Main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:563: src/server/apps/CMakeFiles/authserver.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

I hope this is helpful in some capacity, despite the fact that I went nowhere.

noisiver commented 2 years ago

@fascistgoober Try changing the code I said that I changed, but leave everything else as default, in https://github.com/tkn963/azerothcore-wotlk/commit/19a26ab8cb029ccd20d10a5bcbb913bba97944a6. I don't quite know why APPS_BUILD looks for servers-only or dbimport-only because those are non-existant according to my tests.

Also according to my tests, that is the answer because it never flags auth or worldserver as active and therefore doesn't include what it needs. My change seems to fix that but needs testing.

Note: Don't use my repo or branch, just look at those few rows I changed in that one file and run tests on your own system.

mcdubhghlas commented 2 years ago

Both worked and compiled fine. That seems like an actual fix, too. I'm not sure what servers-only and dbimport-only was for, maybe its a legacy thing. I'll look at it later when I finish cooking.

Either way, I'm adding your fix to my fork. :+1:

noisiver commented 2 years ago

I can't find any reference to any of those two I removed in any other cmakelists, or anywhere in the code in fact, which makes me think it's wrong and what I changed should be the solution. If anyone more knowledgable on the matter says it's a good fix I'll open a pull request for it.

Winfidonarleyan commented 2 years ago

Try this https://github.com/azerothcore/azerothcore-wotlk/pull/12202

yuanf225 commented 2 years ago

cmake ../ -DCMAKE_INSTALL_PREFIX=/home/server/ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DWITH_WARNINGS=1 -DAPPS_BUILD=all -DTOOLS_BUILD=all -DSCRIPTS=static -DMODULES=static

cd57679

There is no problem in compiling and testing, the environment is Ubuntu20.04 clang10 cmake3.21.4