irrlicht 1.8.4 build failure on macOS

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.

irrlicht 1.8.4 build failure on macOS

Postby ilovezfs » Wed Oct 05, 2016 2:14 pm

error: cannot initialize a parameter of type 'id<NSApplicationDelegate> _Nullable' with an rvalue of type 'id<NSFileManagerDelegate>'

cpp Code: Select all
CompileC build/MacOSX.build/Release/libIrrlicht.a.build/Objects-normal/x86_64/CIrrDeviceMacOSX.o CIrrDeviceMacOSX.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
    cd /tmp/irrlicht-20161005-33773-gj64qh/irrlicht-1.8.4/source/Irrlicht/MacOSX
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -Wno-trigraphs -fpascal-strings -O3 -mdynamic-no-pic -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -Wno-c++11-extensions -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.12 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -I/tmp/irrlicht-20161005-33773-gj64qh/irrlicht-1.8.4/source/Irrlicht/MacOSX/build/MacOSX.build/Release/libIrrlicht.a.build/Irrlicht.hmap -I/tmp/irrlicht-20161005-33773-gj64qh/irrlicht-1.8.4/source/Irrlicht/MacOSX/build/Release/include -I../../../include -I/tmp/irrlicht-20161005-33773-gj64qh/irrlicht-1.8.4/source/Irrlicht/MacOSX/build/MacOSX.build/Release/libIrrlicht.a.build/DerivedSources/x86_64 -I/tmp/irrlicht-20161005-33773-gj64qh/irrlicht-1.8.4/source/Irrlicht/MacOSX/build/MacOSX.build/Release/libIrrlicht.a.build/DerivedSources -F/tmp/irrlicht-20161005-33773-gj64qh/irrlicht-1.8.4/source/Irrlicht/MacOSX/build/Release -DMACOSX -include /tmp/irrlicht-20161005-33773-gj64qh/irrlicht-1.8.4/source/Irrlicht/MacOSX/MacOSX_Prefix.pch -MMD -MT dependencies -MF /tmp/irrlicht-20161005-33773-gj64qh/irrlicht-1.8.4/source/Irrlicht/MacOSX/build/MacOSX.build/Release/libIrrlicht.a.build/Objects-normal/x86_64/CIrrDeviceMacOSX.d --serialize-diagnostics /tmp/irrlicht-20161005-33773-gj64qh/irrlicht-1.8.4/source/Irrlicht/MacOSX/build/MacOSX.build/Release/libIrrlicht.a.build/Objects-normal/x86_64/CIrrDeviceMacOSX.dia -c /tmp/irrlicht-20161005-33773-gj64qh/irrlicht-1.8.4/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm -o /tmp/irrlicht-20161005-33773-gj64qh/irrlicht-1.8.4/source/Irrlicht/MacOSX/build/MacOSX.build/Release/libIrrlicht.a.build/Objects-normal/x86_64/CIrrDeviceMacOSX.o
/tmp/irrlicht-20161005-33773-gj64qh/irrlicht-1.8.4/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm:499:23: error: cannot initialize a parameter of type 'id<NSApplicationDelegate> _Nullable' with an rvalue of type 'id<NSFileManagerDelegate>'
                        [NSApp setDelegate:(id<NSFileManagerDelegate>)[[[AppDelegate alloc] initWithDevice:this] autorelease]];
 


Full build log here: https://gist.github.com/ilovezfs/388c53df589e2bd969d8b5a467d6a1d4

My workaround is

cpp Code: Select all
    inreplace "source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm",
      "[NSApp setDelegate:(id<NSFileManagerDelegate>)",
      "[NSApp setDelegate:(id<NSApplicationDelegate>)"
 
ilovezfs
 
Posts: 1
Joined: Wed Oct 05, 2016 2:03 pm

Re: irrlicht 1.8.4 build failure on macOS

Postby Nadro » Wed Oct 05, 2016 7:15 pm

On macOS please use trunk instead of 1.8.x.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Nadro
 
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: irrlicht 1.8.4 build failure on macOS

Postby LunaRebirth » Fri May 18, 2018 10:06 pm

Thanks for this solution, it worked fine.

Just an FYI in case it was missed in the trunk, I am getting this error still in 1.9
LunaRebirth
 
Posts: 330
Joined: Sun May 11, 2014 12:13 am


Return to Bug reports

Who is online

Users browsing this forum: No registered users and 1 guest