skypjack / uvw

Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!
MIT License
1.84k stars 209 forks source link

When I #include <uvw.hpp> in any header file, xcode error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on iOS 11 or newer #244

Closed guanghui1987 closed 3 years ago

guanghui1987 commented 3 years ago
  1. error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on iOS 11 or newer
  2. xcode suggestion note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic
  3. but I don't know to implement my own aligned allocation functions!
  4. Please help me and thank you! Let's uvw run on more platforms!

Showing Recent Messages

Build target TestLibuv of project uv with configuration Debug

CompileC /Users/mark/Library/Developer/Xcode/DerivedData/uv-dbymxycpxbngawdtwiycfcglytwg/Build/Intermediates.noindex/uv.build/Debug-iphoneos/TestLibuv.build/Objects-normal/armv7/OCCFile.o /Users/mark/myresearch/libuv/out/TestLibuv/OCCFile.mm normal armv7 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'TestLibuv' from project 'uv') cd /Users/mark/myresearch/libuv export LANG\=en_US.US-ASCII /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c++ -target armv7-apple-ios9.0 -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=c++1z -stdlib\=libc++ -fobjc-arc -fobjc-weak -fmodules -gmodules -fmodules-cache-path\=/Users/mark/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/mark/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Wquoted-include-in-framework-header -Wno-implicit-atomic-properties -Werror\=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -Wno-c++11-extensions -DDEBUG\=1 -DOBJC_OLD_DISPATCH_PROTOTYPES\=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -g -fvisibility-inlines-hidden -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -fembed-bitcode-marker -index-store-path /Users/mark/Library/Developer/Xcode/DerivedData/uv-dbymxycpxbngawdtwiycfcglytwg/Index/DataStore -iquote /Users/mark/Library/Developer/Xcode/DerivedData/uv-dbymxycpxbngawdtwiycfcglytwg/Build/Intermediates.noindex/uv.build/Debug-iphoneos/TestLibuv.build/TestLibuv-generated-files.hmap -I/Users/mark/Library/Developer/Xcode/DerivedData/uv-dbymxycpxbngawdtwiycfcglytwg/Build/Intermediates.noindex/uv.build/Debug-iphoneos/TestLibuv.build/TestLibuv-own-target-headers.hmap -I/Users/mark/Library/Developer/Xcode/DerivedData/uv-dbymxycpxbngawdtwiycfcglytwg/Build/Intermediates.noindex/uv.build/Debug-iphoneos/TestLibuv.build/TestLibuv-all-target-headers.hmap -iquote /Users/mark/Library/Developer/Xcode/DerivedData/uv-dbymxycpxbngawdtwiycfcglytwg/Build/Intermediates.noindex/uv.build/Debug-iphoneos/TestLibuv.build/TestLibuv-project-headers.hmap -I/Users/mark/Library/Developer/Xcode/DerivedData/uv-dbymxycpxbngawdtwiycfcglytwg/Build/Products/Debug-iphoneos/include -I/Users/mark/myresearch/libuv/include -I/Users/mark/myresearch/libuv/third_party/uvw/src -I/Users/mark/Library/Developer/Xcode/DerivedData/uv-dbymxycpxbngawdtwiycfcglytwg/Build/Intermediates.noindex/uv.build/Debug-iphoneos/TestLibuv.build/DerivedSources-normal/armv7 -I/Users/mark/Library/Developer/Xcode/DerivedData/uv-dbymxycpxbngawdtwiycfcglytwg/Build/Intermediates.noindex/uv.build/Debug-iphoneos/TestLibuv.build/DerivedSources/armv7 -I/Users/mark/Library/Developer/Xcode/DerivedData/uv-dbymxycpxbngawdtwiycfcglytwg/Build/Intermediates.noindex/uv.build/Debug-iphoneos/TestLibuv.build/DerivedSources -F/Users/mark/Library/Developer/Xcode/DerivedData/uv-dbymxycpxbngawdtwiycfcglytwg/Build/Products/Debug-iphoneos -MMD -MT dependencies -MF /Users/mark/Library/Developer/Xcode/DerivedData/uv-dbymxycpxbngawdtwiycfcglytwg/Build/Intermediates.noindex/uv.build/Debug-iphoneos/TestLibuv.build/Objects-normal/armv7/OCCFile.d --serialize-diagnostics /Users/mark/Library/Developer/Xcode/DerivedData/uv-dbymxycpxbngawdtwiycfcglytwg/Build/Intermediates.noindex/uv.build/Debug-iphoneos/TestLibuv.build/Objects-normal/armv7/OCCFile.dia -c /Users/mark/myresearch/libuv/out/TestLibuv/OCCFile.mm -o /Users/mark/Library/Developer/Xcode/DerivedData/uv-dbymxycpxbngawdtwiycfcglytwg/Build/Intermediates.noindex/uv.build/Debug-iphoneos/TestLibuv.build/Objects-normal/armv7/OCCFile.o

In file included from /Users/mark/myresearch/libuv/out/TestLibuv/OCCFile.mm:5: In file included from /Users/mark/myresearch/libuv/out/TestLibuv/testuvw.hpp:13: In file included from /Users/mark/myresearch/libuv/third_party/uvw/src/uvw.hpp:19: /Users/mark/myresearch/libuv/third_party/uvw/src/uvw/signal.h:65:20: warning: empty paragraph passed to '@param' command [-Wdocumentation]

here is the testuvw.hpp file content

ifndef testuvw_hpp

define testuvw_hpp

include

include

include

namespace uvw { class TCPHandle; }

class Testuvw { public: Testuvw(); Testuvw(std::string version, int xx); // ~Testuvw() noexcept; void test(); private: std::shared_ptr tcpconn; };

endif / testuvw_hpp /

guanghui1987 commented 3 years ago

I hope that build and run success in iOS 9 and 10 !

skypjack commented 3 years ago

I don't even get what it means honestly. 😅 Have you investigated on the reasons of this error?

skypjack commented 3 years ago

The issue has been stuck for two weeks. I close it for inactivity. Feel free to continue the discussion here if needed.