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.
Post Reply
ilovezfs
Posts: 1
Joined: Wed Oct 05, 2016 2:03 pm

irrlicht 1.8.4 build failure on macOS

Post by ilovezfs »

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

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/388c53 ... a467d6a1d4

My workaround is

Code: Select all

    inreplace "source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm",
      "[NSApp setDelegate:(id<NSFileManagerDelegate>)",
      "[NSApp setDelegate:(id<NSApplicationDelegate>)"
 
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: irrlicht 1.8.4 build failure on macOS

Post by Nadro »

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
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: irrlicht 1.8.4 build failure on macOS

Post by LunaRebirth »

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
shybovycha
Posts: 13
Joined: Wed Jul 27, 2011 8:36 am
Contact:

Re: irrlicht 1.8.4 build failure on macOS

Post by shybovycha »

Created a patch to fix this problem.
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: irrlicht 1.8.4 build failure on macOS

Post by CuteAlien »

Thanks. I hope one of the MacOS maintainers can work on this (otherwise I have to apply this blindly).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply