• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

26.08.2023 TFS NEKIRO 7.72 <fmt> lib problem

Rondel

New Member
Joined
Feb 1, 2022
Messages
3
Reaction score
1
Hey, I've just followed the Compiling on Windows (vcpkg) (https://github.com/otland/forgottenserver/wiki/Compiling-on-Windows-%28vcpkg%29) tutorial. I've succesfully went through all the steps, however when I tried building the Nekiro 1.5 TFS 7.72 downgrade i've encountered few errors:

Code:
Severity    Code    Description    Project    File    Line    Suppression State
Error    C2079    '_' uses undefined struct 'fmt::v10::detail::type_is_unformattable_for<T,char>'    theforgottenserver    C:\dev\vcpkg\installed\x64-windows\include\fmt\core.h    1577   
Error    C2338    static_assert failed: 'Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt' (compiling source file ..\src\iomarket.cpp)    theforgottenserver    C:\dev\vcpkg\installed\x64-windows\include\fmt\core.h    1581   
Error    C2079    '_' uses undefined struct 'fmt::v10::detail::type_is_unformattable_for<T,char>'    theforgottenserver    C:\dev\vcpkg\installed\x64-windows\include\fmt\core.h    1577   
Error    C2079    '_' uses undefined struct 'fmt::v10::detail::type_is_unformattable_for<T,char>'    theforgottenserver    C:\dev\vcpkg\installed\x64-windows\include\fmt\core.h    1577   
Error    C2338    static_assert failed: 'Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt' (compiling source file ..\src\iomapserialize.cpp)    theforgottenserver    C:\dev\vcpkg\installed\x64-windows\include\fmt\core.h    1581

The above erros in the picutre1693085123264.png

Any ideas how to fix that? Thank you in advance!
 
Solution
Solution
Damn, I've just found the topic that Fabi linked and it worked for me :D So should I just stick with it or switch over to the @lursky solution that he's linked?

(thank you both for help obviosuly)
 
@lursky

thanks for reply. I did it and got this error now
also i did fixes on MessageClasses like u said to me on priv:
Repalce:
C++:
MESSAGE_STATUS_SMALL = 21, /*White message at the bottom of the game window"
MESSAGE_INFO_DESCR = 22, /*Green message in game window and in the console

With:

C++:
MESSAGE_STATUS_SMALL = 21, // White message at the bottom of the game window"
MESSAGE_INFO_DESCR = 22, // Green message in game window and in the console

Anyway whole MessageClasses is commented out but seems like there's an issue once there's a multiline comment inside another one

It's just an warning so no big deal but why no fix if it's that easy


PHP:
[  1%] Building CXX object CMakeFiles/tfs.dir/src/actions.cpp.o
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/actions.cpp:23:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/bed.h:23:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/item.h:27:
/Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/tools.h:107:37: error: 'auto' not allowed in function prototype
inline constexpr auto to_underlying(auto e) noexcept { return static_cast<std::underlying_type_t<decltype(e)>>(e); }
                                    ^~~~
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/actions.cpp:28:
/Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/spells.h:208:3: error: C++ requires a type specifier for all declarations
                setGroup(SpellGroup_t g) {
                ^
2 errors generated.
make[2]: *** [CMakeFiles/tfs.dir/src/actions.cpp.o] Error 1
make[1]: *** [CMakeFiles/tfs.dir/all] Error 2
make: *** [all] Error
 
@lursky i added this to project, but seems like nothing has changed while compiling. Orginaly in tfs 1.5 downgrade by nekiro there wasnt file called .clang-format. Do i have to add something else to make it work expect .clang-format file?
 
@OTAmator as you're doing it on mac OS, you're probably doing it with cmake so add this into your CMakeLists

Code:
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

It's TFS1.5-Downgrades so change 17 to 20 there:
Code:
set_target_properties(tfs PROPERTIES CXX_STANDARD 17)
set_target_properties(tfs PROPERTIES CXX_STANDARD_REQUIRED ON)
 
@lursky

i set to from 17 to 20
C++:
set_target_properties(tfs PROPERTIES CXX_STANDARD 20)
set_target_properties(tfs PROPERTIES CXX_STANDARD_REQUIRED ON)

and still facing same error:
: error: C++ requires a type specifier for all declarations
setGroup(SpellGroup_t g) {
^
1 error generated.
make[2]: *** [CMakeFiles/tfs.dir/src/actions.cpp.o] Error 1
make[1]: *** [CMakeFiles/tfs.dir/all] Error 2
 
nice it worked for spells, but got error in core.h now:


Code:
[ 41%] Building CXX object CMakeFiles/tfs.dir/src/iomarket.cpp.o
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/iomarket.cpp:30:
In file included from /opt/homebrew/include/fmt/format.h:49:
/opt/homebrew/include/fmt/core.h:2550:45: error: implicit instantiation of undefined template 'fmt::detail::type_is_unformattable_for<MarketAction_t, char>'
    type_is_unformattable_for<T, char_type> _;
                                            ^
/opt/homebrew/include/fmt/core.h:2613:23: note: in instantiation of function template specialization 'fmt::detail:arse_format_specs<MarketAction_t, fmt::detail::compile_parse_context<char>>' requested here
        parse_funcs_{&parse_format_specs<Args, parse_context_type>...} {}
                      ^
/opt/homebrew/include/fmt/core.h:2742:47: note: in instantiation of member function 'fmt::detail::format_string_checker<char, MarketAction_t, unsigned short>::format_string_checker' requested here
      detail:arse_format_string<true>(str_, checker(s));
                                              ^
/Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/iomarket.cpp:39:71: note: in instantiation of function template specialization 'fmt::basic_format_string<char, MarketAction_t &, unsigned short &>::basic_format_string<char[192], 0>' requested here
        DBResult_ptr result = Database::getInstance().storeQuery(fmt::format("SELECT [ICODE]id[/ICODE], [ICODE]amount[/ICODE], [ICODE]price[/ICODE], [ICODE]created[/ICODE], [ICODE]anonymous[/ICODE], (SELECT [ICODE]name[/ICODE] FROM [ICODE]players[/ICODE] WHERE [ICODE]id[/ICODE] = [ICODE]player_id[/ICODE]) AS [ICODE]player_name[/ICODE] FROM [ICODE]market_offers[/ICODE] WHERE [ICODE]sale[/ICODE] = {:d} AND [ICODE]itemtype[/ICODE] = {:d}", action, itemId));
                                                                             ^
/opt/homebrew/include/fmt/core.h:1555:45: note: template is declared here
template <typename T, typename Char> struct type_is_unformattable_for;
                                            ^
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/5f/y0pq9jw12wzgjz67cnybg3t00000gn/T/iomarket-fce461.cpp
clang: note: diagnostic msg: /var/folders/5f/y0pq9jw12wzgjz67cnybg3t00000gn/T/iomarket-fce461.sh
clang: note: diagnostic msg: Crash backtrace is located in
clang: note: diagnostic msg: /Users/x/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang: note: diagnostic msg:
 
Seems like you missed most important part of that PR, you have an issue in iomarket.cpp
Change use of enum values to tfs::to_underlying(value) like in PR:
C++:
tfs::to_underlying(action)

That might also be required for C++20:
 
Last edited:
@lursky
this time faced error in outputmessage.cpp

Code:
[ 61%] Building CXX object CMakeFiles/tfs.dir/src/outputmessage.cpp.o
In file included from <built-in>:501:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/build/CMakeFiles/tfs.dir/cmake_pch_arm64.hxx:5:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/otpch.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/algorithm:1712:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/memory:846:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/allocate_at_least.h:13:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/allocator_traits.h:161:57: error: no member named 'rebind' in 'LockfreePoolingAllocator<void, 2048>'
    using type _LIBCPP_NODEBUG = typename _Tp::template rebind<_Up>::other;
                                          ~~~~~         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:951:45: note: in instantiation of template class 'std::__allocator_traits_rebind<LockfreePoolingAllocator<void, 2048>, std::__shared_ptr_emplace<OutputMessage, LockfreePoolingAllocator<void, 2048>>, false>' requested here
    using _ControlBlockAllocator = typename __allocator_traits_rebind<_Alloc, _ControlBlock>::type;
                                            ^
/Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/outputmessage.cpp:81:14: note: in instantiation of function template specialization 'std::allocate_shared<OutputMessage, LockfreePoolingAllocator<void, 2048>, void>' requested here
        return std::allocate_shared<OutputMessage>(LockfreePoolingAllocator<void, OUTPUTMESSAGE_FREE_LIST_CAPACITY>());
                    ^
In file included from <built-in>:501:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/build/CMakeFiles/tfs.dir/cmake_pch_arm64.hxx:5:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/otpch.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/algorithm:1712:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/memory:846:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/allocate_at_least.h:13:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/allocator_traits.h:232:33: error: type 'std::allocator_traits<int>::allocator_type' (aka 'int') cannot be used prior to '::' because it has no members
    using value_type = typename allocator_type::value_type;
                                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/allocation_guard.h:45:31: note: in instantiation of template class 'std::allocator_traits<int>' requested here
    using _Pointer = typename allocator_traits<_Alloc>::pointer;
                              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:952:48: note: in instantiation of template class 'std::__allocation_guard<int>' requested here
    __allocation_guard<_ControlBlockAllocator> __guard(__a, 1);
                                               ^
/Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/outputmessage.cpp:81:14: note: in instantiation of function template specialization 'std::allocate_shared<OutputMessage, LockfreePoolingAllocator<void, 2048>, void>' requested here
        return std::allocate_shared<OutputMessage>(LockfreePoolingAllocator<void, OUTPUTMESSAGE_FREE_LIST_CAPACITY>());
                    ^
In file included from <built-in>:501:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/build/CMakeFiles/tfs.dir/cmake_pch_arm64.hxx:5:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/otpch.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/algorithm:1712:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/memory:846:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/allocate_at_least.h:13:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/allocator_traits.h:161:57: error: no member named 'rebind' in 'LockfreePoolingAllocator<void, 2048>'
    using type _LIBCPP_NODEBUG = typename _Tp::template rebind<_Up>::other;
                                          ~~~~~         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:290:35: note: in instantiation of template class 'std::__allocator_traits_rebind<LockfreePoolingAllocator<void, 2048>, OutputMessage, false>' requested here
        using _TpAlloc = typename __allocator_traits_rebind<_Alloc, _Tp>::type;
                                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:953:55: note: in instantiation of function template specialization 'std::__shared_ptr_emplace<OutputMessage, LockfreePoolingAllocator<void, 2048>>::__shared_ptr_emplace<>' requested here
    ::new ((void*)_VSTD::addressof(*__guard.__get())) _ControlBlock(__a, _VSTD::forward<_Args>(__args)...);
                                                      ^
/Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/outputmessage.cpp:81:14: note: in instantiation of function template specialization 'std::allocate_shared<OutputMessage, LockfreePoolingAllocator<void, 2048>, void>' requested here
        return std::allocate_shared<OutputMessage>(LockfreePoolingAllocator<void, OUTPUTMESSAGE_FREE_LIST_CAPACITY>());
                    ^
In file included from <built-in>:501:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/build/CMakeFiles/tfs.dir/cmake_pch_arm64.hxx:5:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/otpch.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/algorithm:1712:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/memory:860:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:291:18: error: no viable conversion from 'LockfreePoolingAllocator<void, 2048>' to '_TpAlloc' (aka 'int')
        _TpAlloc __tmp(*__get_alloc());
                 ^     ~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:953:55: note: in instantiation of function template specialization 'std::__shared_ptr_emplace<OutputMessage, LockfreePoolingAllocator<void, 2048>>::__shared_ptr_emplace<>' requested here
    ::new ((void*)_VSTD::addressof(*__guard.__get())) _ControlBlock(__a, _VSTD::forward<_Args>(__args)...);
                                                      ^
/Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/outputmessage.cpp:81:14: note: in instantiation of function template specialization 'std::allocate_shared<OutputMessage, LockfreePoolingAllocator<void, 2048>, void>' requested here
        return std::allocate_shared<OutputMessage>(LockfreePoolingAllocator<void, OUTPUTMESSAGE_FREE_LIST_CAPACITY>());
                    ^
In file included from <built-in>:501:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/build/CMakeFiles/tfs.dir/cmake_pch_arm64.hxx:5:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/otpch.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/algorithm:1712:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/memory:860:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:308:18: error: no viable conversion from 'LockfreePoolingAllocator<void, 2048>' to '_TpAlloc' (aka 'int')
        _TpAlloc __tmp(*__get_alloc());
                 ^     ~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:286:14: note: in instantiation of member function 'std::__shared_ptr_emplace<OutputMessage, LockfreePoolingAllocator<void, 2048>>::__on_zero_shared' requested here
    explicit __shared_ptr_emplace(_Alloc __a, _Args&& ...__args)
             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:953:55: note: in instantiation of function template specialization 'std::__shared_ptr_emplace<OutputMessage, LockfreePoolingAllocator<void, 2048>>::__shared_ptr_emplace<>' requested here
    ::new ((void*)_VSTD::addressof(*__guard.__get())) _ControlBlock(__a, _VSTD::forward<_Args>(__args)...);
                                                      ^
/Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/outputmessage.cpp:81:14: note: in instantiation of function template specialization 'std::allocate_shared<OutputMessage, LockfreePoolingAllocator<void, 2048>, void>' requested here
        return std::allocate_shared<OutputMessage>(LockfreePoolingAllocator<void, OUTPUTMESSAGE_FREE_LIST_CAPACITY>());
                    ^
In file included from <built-in>:501:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/build/CMakeFiles/tfs.dir/cmake_pch_arm64.hxx:5:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/otpch.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/algorithm:1712:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/memory:860:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:318:28: error: no viable conversion from 'LockfreePoolingAllocator<void, 2048>' to '_ControlBlockAlloc' (aka 'int')
        _ControlBlockAlloc __tmp(*__get_alloc());
                           ^     ~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:286:14: note: in instantiation of member function 'std::__shared_ptr_emplace<OutputMessage, LockfreePoolingAllocator<void, 2048>>::__on_zero_shared_weak' requested here
    explicit __shared_ptr_emplace(_Alloc __a, _Args&& ...__args)
             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:953:55: note: in instantiation of function template specialization 'std::__shared_ptr_emplace<OutputMessage, LockfreePoolingAllocator<void, 2048>>::__shared_ptr_emplace<>' requested here
    ::new ((void*)_VSTD::addressof(*__guard.__get())) _ControlBlock(__a, _VSTD::forward<_Args>(__args)...);
                                                      ^
/Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/outputmessage.cpp:81:14: note: in instantiation of function template specialization 'std::allocate_shared<OutputMessage, LockfreePoolingAllocator<void, 2048>, void>' requested here
        return std::allocate_shared<OutputMessage>(LockfreePoolingAllocator<void, OUTPUTMESSAGE_FREE_LIST_CAPACITY>());
                    ^
In file included from <built-in>:501:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/build/CMakeFiles/tfs.dir/cmake_pch_arm64.hxx:5:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/otpch.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/algorithm:1712:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/memory:846:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/allocate_at_least.h:13:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/allocator_traits.h:282:12: error: member reference base type 'std::allocator_traits<int>::allocator_type' (aka 'int') is not a structure or union
        __a.deallocate(__p, __n);
        ~~~^~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:320:47: note: in instantiation of member function 'std::allocator_traits<int>::deallocate' requested here
        allocator_traits<_ControlBlockAlloc>::deallocate(__tmp,
                                              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:286:14: note: in instantiation of member function 'std::__shared_ptr_emplace<OutputMessage, LockfreePoolingAllocator<void, 2048>>::__on_zero_shared_weak' requested here
    explicit __shared_ptr_emplace(_Alloc __a, _Args&& ...__args)
             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:953:55: note: in instantiation of function template specialization 'std::__shared_ptr_emplace<OutputMessage, LockfreePoolingAllocator<void, 2048>>::__shared_ptr_emplace<>' requested here
    ::new ((void*)_VSTD::addressof(*__guard.__get())) _ControlBlock(__a, _VSTD::forward<_Args>(__args)...);
                                                      ^
/Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/outputmessage.cpp:81:14: note: in instantiation of function template specialization 'std::allocate_shared<OutputMessage, LockfreePoolingAllocator<void, 2048>, void>' requested here
        return std::allocate_shared<OutputMessage>(LockfreePoolingAllocator<void, OUTPUTMESSAGE_FREE_LIST_CAPACITY>());
                    ^
In file included from <built-in>:501:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/build/CMakeFiles/tfs.dir/cmake_pch_arm64.hxx:5:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/otpch.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/algorithm:1712:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/memory:860:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:321:62: error: non-const lvalue reference to type 'typename conditional<is_void<element_type>::value, __nat, element_type>::type' (aka 'int') cannot bind to a value of unrelated type 'std::__shared_ptr_emplace<OutputMessage, LockfreePoolingAllocator<void, 2048>>'
            pointer_traits<_ControlBlockPointer>::pointer_to(*this), 1);
                                                             ^~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:286:14: note: in instantiation of member function 'std::__shared_ptr_emplace<OutputMessage, LockfreePoolingAllocator<void, 2048>>::__on_zero_shared_weak' requested here
    explicit __shared_ptr_emplace(_Alloc __a, _Args&& ...__args)
             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:953:55: note: in instantiation of function template specialization 'std::__shared_ptr_emplace<OutputMessage, LockfreePoolingAllocator<void, 2048>>::__shared_ptr_emplace<>' requested here
    ::new ((void*)_VSTD::addressof(*__guard.__get())) _ControlBlock(__a, _VSTD::forward<_Args>(__args)...);
                                                      ^
/Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/outputmessage.cpp:81:14: note: in instantiation of function template specialization 'std::allocate_shared<OutputMessage, LockfreePoolingAllocator<void, 2048>, void>' requested here
        return std::allocate_shared<OutputMessage>(LockfreePoolingAllocator<void, OUTPUTMESSAGE_FREE_LIST_CAPACITY>());
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/pointer_traits.h:150:67: note: passing argument to parameter '__r' here
                                      __nat, element_type>::type& __r) _NOEXCEPT
                                                                  ^
8 errors generated.
make[2]: *** [CMakeFiles/tfs.dir/src/outputmessage.cpp.o] Error 1
make[1]: *** [CMakeFiles/tfs.dir/all] Error 2
make: *** [all] Error 2
 
still same issue?
try this
Lua:
cmake_minimum_required(VERSION 3.10)

set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)

project(tfs CXX)

add_subdirectory(src)
add_executable(tfs ${tfs_SRC})

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

set_target_properties(tfs PROPERTIES CXX_STANDARD 20)
set_target_properties(tfs PROPERTIES CXX_STANDARD_REQUIRED ON)

if (NOT WIN32)
    add_compile_options(-Wall -Werror -pipe -fvisibility=hidden)
endif ()

set(CMAKE_CXX_FLAGS_PERFORMANCE "${CMAKE_CXX_FLAGS_RELEASE} -march=native")

if (CMAKE_COMPILER_IS_GNUCXX)
    add_compile_options(-fno-strict-aliasing)
endif ()

# Find packages.
find_package(CryptoPP QUIET)
if (CryptoPP_FOUND)  # vcpkg-provided cmake package called CryptoPP
    set(Crypto++_LIBRARIES "cryptopp-static")
else()
    find_package(Crypto++ REQUIRED)
endif ()
find_package(fmt 6.1.2 REQUIRED)

# Look for vcpkg-provided libmariadb first
# If we link to the file directly, we might miss its dependencies from vcpkg
find_package(unofficial-libmariadb CONFIG QUIET)
if (unofficial-libmariadb_FOUND)
    set(MYSQL_CLIENT_LIBS "libmariadb")
else ()
    find_package(MySQL REQUIRED)
endif ()

find_package(Threads REQUIRED)
find_package(PugiXML REQUIRED)

# Selects LuaJIT if user defines or auto-detected
if (DEFINED USE_LUAJIT AND NOT USE_LUAJIT)
    set(FORCE_LUAJIT ${USE_LUAJIT})
else ()
    find_package(LuaJIT)
    set(FORCE_LUAJIT ${LuaJIT_FOUND})
endif ()
option(USE_LUAJIT "Use LuaJIT" ${FORCE_LUAJIT})

if (FORCE_LUAJIT)
    if (APPLE)
        set(CMAKE_EXE_LINKER_FLAGS "-pagezero_size 10000 -image_base 100000000")
    endif ()
else ()
    find_package(Lua REQUIRED)
endif ()

find_package(Boost 1.66.0 REQUIRED COMPONENTS date_time system iostreams)

include_directories(${Boost_INCLUDE_DIRS} ${Crypto++_INCLUDE_DIR} ${LUA_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${PUGIXML_INCLUDE_DIR})
target_link_libraries(tfs PRIVATE
        Boost::date_time
        Boost::system
        Boost::iostreams
        fmt::fmt
        ${CMAKE_THREAD_LIBS_INIT}
        ${Crypto++_LIBRARIES}
        ${LUA_LIBRARIES}
        ${MYSQL_CLIENT_LIBS}
        ${PUGIXML_LIBRARIES}
        )

### INTERPROCEDURAL_OPTIMIZATION ###
cmake_policy(SET CMP0069 NEW)
include(CheckIPOSupported)
check_ipo_supported(RESULT result OUTPUT error)
if (result)
    message(STATUS "IPO / LTO enabled")
    set_target_properties(tfs PROPERTIES INTERPROCEDURAL_OPTIMIZATION True)
else ()
    message(STATUS "IPO / LTO not supported: <${error}>")
endif ()
### END INTERPROCEDURAL_OPTIMIZATION ###

### Git Version ###
# Define the two required variables before including
# the source code for watching a git repository.
option(SKIP_GIT "Skip checking for git updates" OFF)
if(NOT SKIP_GIT)
    set(PRE_CONFIGURE_FILE "cmake/gitmetadata.h.in")
    set(POST_CONFIGURE_FILE "${CMAKE_CURRENT_BINARY_DIR}/gitmetadata.h")
    include(git_watcher)
    if(Git_FOUND)
        add_dependencies(tfs check_git)
        target_include_directories(tfs PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
    endif()
endif()
### END  Git Version ###

# Precompiled header
# note: cotire() must be called last on a target
if (${CMAKE_VERSION} VERSION_GREATER "3.16.0")
    target_precompile_headers(tfs PUBLIC src/otpch.h)
else ()
    include(cotire)
    set_target_properties(tfs PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "src/otpch.h")
    set_target_properties(tfs PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
    cotire(tfs)
endif ()
 
@Jeyci

Atm below changes from @lursky worked for me to get compiled engine to 100%:
in spells.h line: 208
Change to:
C++:
void setGroup(SpellGroup_t g) {
    group = g;
}
and this

But after this i got stuck with running compiled tfs. which get insta killed after compilation:
Code:
x@Kamils-MBP build % ./tfs
zsh: killed     ./tfs
x@Kamils-MBP build % ./tfs
zsh: killed     ./tfs
x@Kamils-MBP build % sudo ./tfs
Password:
zsh: killed     sudo ./tfs
x@Kamils-MBP build % ./tfs
zsh: killed     ./tfs


I gave up to hosting locally tfs on mac OS. Im now configuring remote vps with Debian and im going to code in vs code with remote control
 
Sorry I didn't understand, my original code would be. like this

my tfs on windows works, but on unbutu it doesn't. This first problem appears and I have no idea why
remove this code:
1700429407162.png
You don't need this piece of code, and you do the same thing I told you
Only in your case you need to change: farmat_as to static_cast<int>
 
Back
Top