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

Build fails with Apple clang on macOS 14: error: ISO C++11 does not allow access declarations; use using declarations instead #117

Open
barracuda156 opened this issue Sep 29, 2024 · 1 comment

Comments

@barracuda156
Copy link
Contributor

+ /usr/bin/clang -arch arm64 -O2 -fno-strict-aliasing -fwrapv -pthread  -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64 -D_FILE_OFFSET_BITS=64 -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk   -c  -I /byterun -o src/networks/fasttrack/fst_crypt_ml.o -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64     -pthread -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64 -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -pthread  -I'/opt/local/lib/ocaml' 'src/networks/fasttrack/fst_crypt_ml.c'
clang: warning: -Wl,-headerpad_max_install_names: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/opt/local/lib' [-Wunused-command-line-argument]
src/networks/fasttrack/fst_crypt_ml.c:50:9: warning: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  char *s = String_val(s_v);
        ^   ~~~~~~~~~~~~~~~
src/networks/fasttrack/fst_crypt_ml.c:56:28: warning: passing 'char *' to parameter of type 'unsigned char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
  fst_cipher_crypt(cipher, s+pos, len);
                           ^~~~~
src/networks/fasttrack/fst_crypt.h:54:58: note: passing argument to parameter 'data' here
void fst_cipher_crypt (FSTCipher *cipher, unsigned char *data, int len);
                                                         ^
src/networks/fasttrack/fst_crypt_ml.c:86:9: warning: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  char *s = String_val(s_v);
        ^   ~~~~~~~~~~~~~~~
src/networks/fasttrack/fst_crypt_ml.c:140:9: warning: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  char *s = String_val(s_v);
        ^   ~~~~~~~~~~~~~~~
src/networks/fasttrack/fst_crypt_ml.c:161:9: warning: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  char *s = String_val(s_v);
        ^   ~~~~~~~~~~~~~~~
5 warnings generated.
ccache /usr/bin/clang++ -std=gnu++11 -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -o src/utils/lib/CryptoPP.o "-I/opt/local/lib/ocaml" -c src/utils/lib/CryptoPP.cc
In file included from src/utils/lib/CryptoPP.cc:85:
src/utils/lib/CryptoPP.h:3936:26: error: ISO C++11 does not allow access declarations; use using declarations instead
        BufferedTransformation::Get;
                                ^
        using 
src/utils/lib/CryptoPP.h:3937:26: error: ISO C++11 does not allow access declarations; use using declarations instead
        BufferedTransformation::Peek;
                                ^
        using 
src/utils/lib/CryptoPP.h:3938:26: error: ISO C++11 does not allow access declarations; use using declarations instead
        BufferedTransformation::TransferTo;
                                ^
        using 
src/utils/lib/CryptoPP.h:3939:26: error: ISO C++11 does not allow access declarations; use using declarations instead
        BufferedTransformation::CopyTo;
                                ^
        using 
src/utils/lib/CryptoPP.h:3940:26: error: ISO C++11 does not allow access declarations; use using declarations instead
        BufferedTransformation::CopyRangeTo;
                                ^
        using 
src/utils/lib/CryptoPP.h:3941:26: error: ISO C++11 does not allow access declarations; use using declarations instead
        BufferedTransformation::TransferMessagesTo;
                                ^
        using 
src/utils/lib/CryptoPP.h:3942:26: error: ISO C++11 does not allow access declarations; use using declarations instead
        BufferedTransformation::CopyMessagesTo;
                                ^
        using 
src/utils/lib/CryptoPP.h:3943:26: error: ISO C++11 does not allow access declarations; use using declarations instead
        BufferedTransformation::TransferAllTo;
                                ^
        using 
src/utils/lib/CryptoPP.h:3944:26: error: ISO C++11 does not allow access declarations; use using declarations instead
        BufferedTransformation::CopyAllTo;
                                ^
        using 
src/utils/lib/CryptoPP.cc:698:7: warning: 'auto_ptr<CryptoPP::PK_MessageAccumulator>' is deprecated [-Wdeprecated-declarations]
        std::auto_ptr<PK_MessageAccumulator> m(messageAccumulator);
             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__memory/auto_ptr.h:30:28: note: 'auto_ptr<CryptoPP::PK_MessageAccumulator>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
                           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1025:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#    define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1010:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
                                                ^
src/utils/lib/CryptoPP.cc:704:7: warning: 'auto_ptr<CryptoPP::PK_MessageAccumulator>' is deprecated [-Wdeprecated-declarations]
        std::auto_ptr<PK_MessageAccumulator> m(NewSignatureAccumulator(rng));
             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__memory/auto_ptr.h:30:28: note: 'auto_ptr<CryptoPP::PK_MessageAccumulator>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
                           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1025:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#    define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1010:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
                                                ^
src/utils/lib/CryptoPP.cc:712:7: warning: 'auto_ptr<CryptoPP::PK_MessageAccumulator>' is deprecated [-Wdeprecated-declarations]
        std::auto_ptr<PK_MessageAccumulator> m(NewSignatureAccumulator(rng));
             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__memory/auto_ptr.h:30:28: note: 'auto_ptr<CryptoPP::PK_MessageAccumulator>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
                           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1025:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#    define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1010:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
                                                ^
src/utils/lib/CryptoPP.cc:720:7: warning: 'auto_ptr<CryptoPP::PK_MessageAccumulator>' is deprecated [-Wdeprecated-declarations]
        std::auto_ptr<PK_MessageAccumulator> m(messageAccumulator);
             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__memory/auto_ptr.h:30:28: note: 'auto_ptr<CryptoPP::PK_MessageAccumulator>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
                           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1025:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#    define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1010:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
                                                ^
src/utils/lib/CryptoPP.cc:726:7: warning: 'auto_ptr<CryptoPP::PK_MessageAccumulator>' is deprecated [-Wdeprecated-declarations]
        std::auto_ptr<PK_MessageAccumulator> m(NewVerificationAccumulator());
             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__memory/auto_ptr.h:30:28: note: 'auto_ptr<CryptoPP::PK_MessageAccumulator>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
                           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1025:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#    define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1010:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
                                                ^
src/utils/lib/CryptoPP.cc:734:7: warning: 'auto_ptr<CryptoPP::PK_MessageAccumulator>' is deprecated [-Wdeprecated-declarations]
        std::auto_ptr<PK_MessageAccumulator> m(messageAccumulator);
             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__memory/auto_ptr.h:30:28: note: 'auto_ptr<CryptoPP::PK_MessageAccumulator>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
                           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1025:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#    define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1010:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
                                                ^
src/utils/lib/CryptoPP.cc:742:7: warning: 'auto_ptr<CryptoPP::PK_MessageAccumulator>' is deprecated [-Wdeprecated-declarations]
        std::auto_ptr<PK_MessageAccumulator> m(NewVerificationAccumulator());
             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__memory/auto_ptr.h:30:28: note: 'auto_ptr<CryptoPP::PK_MessageAccumulator>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
                           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1025:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#    define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1010:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
                                                ^
src/utils/lib/CryptoPP.cc:1047:8: warning: 'auto_ptr<std::vector<unsigned short>>' is deprecated [-Wdeprecated-declarations]
                std::auto_ptr<std::vector<word16> > pPrimeTable(new std::vector<word16>);
                     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__memory/auto_ptr.h:30:28: note: 'auto_ptr<std::vector<unsigned short>>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
                           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1025:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#    define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1010:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
                                                ^
src/utils/lib/CryptoPP.cc:6788:8: warning: 'auto_ptr<CryptoPP::OutputProxy>' is deprecated [-Wdeprecated-declarations]
                std::auto_ptr<OutputProxy> temp(proxy = new OutputProxy(*this, false));
                     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__memory/auto_ptr.h:30:28: note: 'auto_ptr<CryptoPP::OutputProxy>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
                           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1025:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#    define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:1010:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
                                                ^
In file included from src/utils/lib/CryptoPP.cc:85:
src/utils/lib/CryptoPP.h:4285:74: warning: binding dereferenced null pointer to reference has undefined behavior [-Wnull-dereference]
                        R value = Hack_DefaultValueFromConstReferenceType(reinterpret_cast<R>(*(int *)NULL));
                                                                                              ^~~~~~~~~~~~
src/utils/lib/CryptoPP.cc:7847:3: note: in instantiation of function template specialization 'CryptoPP::AssignFromHelperClass<CryptoPP::RSAFunction, CryptoPP::RSAFunction>::operator()<const CryptoPP::Integer &>' requested here
                CRYPTOPP_SET_FUNCTION_ENTRY(Modulus)
                ^
src/utils/lib/CryptoPP.h:4441:44: note: expanded from macro 'CRYPTOPP_SET_FUNCTION_ENTRY'
#define CRYPTOPP_SET_FUNCTION_ENTRY(name)               (Name::name(), &ThisClass::Set##name)
                                                        ^
src/utils/lib/CryptoPP.h:4285:74: warning: binding dereferenced null pointer to reference has undefined behavior [-Wnull-dereference]
                        R value = Hack_DefaultValueFromConstReferenceType(reinterpret_cast<R>(*(int *)NULL));
                                                                                              ^~~~~~~~~~~~
src/utils/lib/CryptoPP.cc:8029:3: note: in instantiation of function template specialization 'CryptoPP::AssignFromHelperClass<CryptoPP::InvertibleRSAFunction, CryptoPP::RSAFunction>::operator()<const CryptoPP::Integer &>' requested here
                CRYPTOPP_SET_FUNCTION_ENTRY(Prime1)
                ^
src/utils/lib/CryptoPP.h:4441:44: note: expanded from macro 'CRYPTOPP_SET_FUNCTION_ENTRY'
#define CRYPTOPP_SET_FUNCTION_ENTRY(name)               (Name::name(), &ThisClass::Set##name)
                                                        ^
11 warnings and 9 errors generated.
make: *** [src/utils/lib/CryptoPP.o] Error 1
@barracuda156
Copy link
Contributor Author

Ok, so it build with this added:

configure.cxxflags-append \
                    -std=c++98

However, perhaps, better to fix it properly, since who knows when support for archaic C++ gets dropped from Apple compilers (and they may do that).

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

1 participant