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

macOS Monterey Build Failure #1142

Open
jmstacey opened this issue Dec 15, 2021 · 2 comments
Open

macOS Monterey Build Failure #1142

jmstacey opened this issue Dec 15, 2021 · 2 comments

Comments

@jmstacey
Copy link

Unable to compile on macOS Monterey 12.1 (21C52)

side note: instructions should probably be brew install gcc@9 instead of gcc@6 ?

Errors on make:

bash-3.2$ make

c++ -g -std=c++17 -fpic -DSQLITE_ENABLE_NORMALIZE -O2 -Wall -Werror -Wformat-security -I/Users/jon/Downloads/Bedrock -I/Users/jon/Downloads/Bedrock/mbedtls/include -MMD -MF .build/sqlitecluster/SQLite.d -MT .build/sqlitecluster/SQLite.o -o .build/sqlitecluster/SQLite.o -c sqlitecluster/SQLite.cpp
sqlitecluster/SQLite.cpp:3:10: fatal error: 'linux/limits.h' file not found
#include <linux/limits.h>
         ^~~~~~~~~~~~~~~~
1 error generated.
c++ -g -std=c++17 -fpic -DSQLITE_ENABLE_NORMALIZE -O2 -Wall -Werror -Wformat-security -I/Users/jon/Downloads/Bedrock -I/Users/jon/Downloads/Bedrock/mbedtls/include -MMD -MF .build/main.d -MT .build/main.o -DGIT_REVISION=137b1b2b51 -o .build/main.o -c main.cpp
In file included from main.cpp:12:
In file included from /Users/jon/Downloads/Bedrock/BedrockServer.h:3:
In file included from /Users/jon/Downloads/Bedrock/sqlitecluster/SQLiteNode.h:2:
/Users/jon/Downloads/Bedrock/libstuff/STCPNode.h:137:16: error: class 'STCPNode' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
        friend class STCPNode;
               ^
/Users/jon/Downloads/Bedrock/libstuff/STCPNode.h:46:8: note: previous use is here
struct STCPNode : public STCPServer {
       ^
In file included from main.cpp:12:
In file included from /Users/jon/Downloads/Bedrock/BedrockServer.h:5:
In file included from /Users/jon/Downloads/Bedrock/BedrockPlugin.h:2:
In file included from /Users/jon/Downloads/Bedrock/BedrockCommand.h:2:
In file included from /Users/jon/Downloads/Bedrock/libstuff/SHTTPSManager.h:3:
/Users/jon/Downloads/Bedrock/libstuff/SData.h:12:1: error: 'SData' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
struct SData {
^
/Users/jon/Downloads/Bedrock/libstuff/libstuff.h:27:1: note: did you mean struct here?
class SData;
^~~~~
struct
In file included from main.cpp:12:
In file included from /Users/jon/Downloads/Bedrock/BedrockServer.h:5:
In file included from /Users/jon/Downloads/Bedrock/BedrockPlugin.h:2:
In file included from /Users/jon/Downloads/Bedrock/BedrockCommand.h:2:
/Users/jon/Downloads/Bedrock/libstuff/SHTTPSManager.h:83:21: error: 'SHTTPSManager::NotLeading::what' hides overloaded virtual function [-Werror,-Woverloaded-virtual]
        const char* what() {
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:106:25: note: hidden overloaded virtual function 'std::exception::what' declared here: different qualifiers ('const' vs unqualified)
    virtual const char* what() const _NOEXCEPT;
                        ^
In file included from main.cpp:12:
In file included from /Users/jon/Downloads/Bedrock/BedrockServer.h:5:
In file included from /Users/jon/Downloads/Bedrock/BedrockPlugin.h:2:
In file included from /Users/jon/Downloads/Bedrock/BedrockCommand.h:3:
/Users/jon/Downloads/Bedrock/sqlitecluster/SQLiteCommand.h:81:20: error: explicitly defaulted move assignment operator is implicitly deleted [-Werror,-Wdefaulted-function-deleted]
    SQLiteCommand& operator=(SQLiteCommand&& from) = default;
                   ^
/Users/jon/Downloads/Bedrock/sqlitecluster/SQLiteCommand.h:20:18: note: move assignment operator of 'SQLiteCommand' is implicitly deleted because field 'request' is of reference type 'const SData &'
    const SData& request;
                 ^
In file included from main.cpp:12:
/Users/jon/Downloads/Bedrock/BedrockServer.h:173:30: error: private field '_owner' is not used [-Werror,-Wunused-private-field]
        const BedrockServer& _owner;
                             ^
5 errors generated.
make: *** [.build/main.o] Error 1
@senojsitruc
Copy link

There are also a number of other Linux-specific lines of code. I guess they gave up on multi-platform. I gave up when I got to sigtimedwait().

@lardinator
Copy link

I used <limits.h> on macOS Big Sur and it worked.
There are still errors but I think I solved that one.

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

3 participants