Realm-js: iOS Build Failed

Created on 14 Jul 2018  路  8Comments  路  Source: realm/realm-js

Goals

Install realm on my react-native app

Expected Results

realm installed and react-native app building with success

Actual Results

Build failed on iOS

In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:22:
In file included from ../../src/object-store/src/execution_context_id.hpp:30:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:96:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/chrono:303:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:60:9: error: no member named 'clock' in the global namespace; did you mean 'flock'?
using ::clock;
      ~~^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:19:
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:60:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:17:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/dispatch/dispatch.h:41:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/fcntl.h:23:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/sys/fcntl.h:528:5: note: 'flock' declared here
int     flock(int, int);
        ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:22:
In file included from ../../src/object-store/src/execution_context_id.hpp:30:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:96:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/chrono:303:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:61:9: error: no member named 'difftime' in the global namespace
using ::difftime;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:62:9: error: no member named 'mktime' in the global namespace; did you mean 'mktemp'?
using ::mktime;
      ~~^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:19:
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:60:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:17:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/dispatch/dispatch.h:39:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/unistd.h:678:7: note: 'mktemp' declared here
char    *mktemp(char *);
         ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:22:
In file included from ../../src/object-store/src/execution_context_id.hpp:30:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:96:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/chrono:303:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:63:9: error: no member named 'time' in the global namespace
using ::time;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:65:9: error: no member named 'asctime' in the global namespace
using ::asctime;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:66:9: error: no member named 'ctime' in the global namespace
using ::ctime;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:67:9: error: no member named 'gmtime' in the global namespace
using ::gmtime;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:68:9: error: no member named 'localtime' in the global namespace
using ::localtime;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:70:9: error: no member named 'strftime' in the global namespace
using ::strftime;
      ~~^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:22:
In file included from ../../src/object-store/src/execution_context_id.hpp:30:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:97:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__mutex_base:17:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__threading_support:374:11: error: use of undeclared identifier 'nanosleep'
   while (nanosleep(&__ts, &__ts) == -1 && errno == EINTR);
          ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:26:
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/../../vendor/realm-ios/include/realm/binary_data.hpp:28:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:140:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:2231:27: error: member access into incomplete type 'tm'
    __get_weekdayname(__tm->tm_wday, __b, __e, __err, __ct);
                          ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../.
./src/object-store/src/shared_realm.hpp:22:
In file included from ../../src/object-store/src/execution_context_id.hpp:30:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:89:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:90:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/wchar.h:119:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
            const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
                         ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:26:
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/../../vendor/realm-ios/include/realm/binary_data.hpp:28:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:140:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:2243:25: error: member access into incomplete type 'tm'
    __get_monthname(__tm->tm_mon, __b, __e, __err, __ct);
                        ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:22:
In file included from ../../src/object-store/src/execution_context_id.hpp:30:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:89:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:90:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/wchar.h:119:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
            const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
                         ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:26:
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/../../vendor/realm-ios/include/realm/binary_data.hpp:28:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:140:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:2255:20: error: member access into incomplete type 'tm'
    __get_year(__tm->tm_year, __b, __e, __err, __ct);
                   ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:22:
In file included from ../../src/object-store/src/execution_context_id.hpp:30:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:89:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:90:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/wchar.h:119:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
            const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
                         ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:26:
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/../../vendor/realm-ios/include/realm/binary_data.hpp:28:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:140:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:2272:31: error: member access into incomplete type 'tm'
        __get_weekdayname(__tm->tm_wday, __b, __e, __err, __ct);
                              ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:22:
In file included from ../../src/object-store/src/execution_context_id.hpp:30:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:89:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:90:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/wchar.h:119:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
            const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
                         ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:26:
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/../../vendor/realm-ios/include/realm/binary_data.hpp:28:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:140:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:2277:29: error: member access into incomplete type 'tm'
        __get_monthname(__tm->tm_mon, __b, __e, __err, __ct);
                            ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:22:
In file included from ../../src/object-store/src/execution_context_id.hpp:30:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:89:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:90:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/wchar.h:119:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
            const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
                         ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:26:
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/../../vendor/realm-ios/include/realm/binary_data.hpp:28:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:140:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:2287:23: error: member access into incomplete type 'tm'
        __get_day(__tm->tm_mday, __b, __e, __err, __ct);
                      ^
In file included from 
/Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:22:
In file included from ../../src/object-store/src/execution_context_id.hpp:30:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:89:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:90:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/wchar.h:119:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
            const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
                         ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:26:
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/../../vendor/realm-ios/include/realm/binary_data.hpp:28:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:140:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:2302:24: error: member access into incomplete type 'tm'
        __get_hour(__tm->tm_hour, __b, __e, __err, __ct);
                       ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:22:
In file included from ../../src/object-store/src/execution_context_id.hpp:30:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:89:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:90:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/wchar.h:119:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
            const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
                         ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:26:
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/../../vendor/realm-ios/include/realm/binary_data.hpp:28:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:140:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:2305:27: error: member access into incomplete type 'tm'
        __get_12_hour(__tm->tm_hour, __b, __e, __err, __ct);
                          ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:22:
In file included from ../../src/object-store/src/execution_context_id.hpp:30:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:89:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:90:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/wchar.h:119:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
            const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
                         ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:26:
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/../../vendor/realm-ios/include/realm/binary_data.hpp:28:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:140:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:2308:32: error: member access into incomplete type 'tm'
        __get_day_year_num(__tm->tm_yday, __b, __e, __err, __ct);
                               ^
In file included from /Users/joaom182/Projects/eipets/app/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:22:
In file included from ../../src/object-store/src/execution_context_id.hpp:30:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:89:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:90:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/wchar.h:119:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
            const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
                         ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.



** BUILD FAILED **


The following commands produced analyzer issues:
    Analyze /Users/joaom182/Projects/eipets/app/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp normal x86_64

    Analyze Base/RCTModuleMethod.mm normal x86_64
(2 commands with analyzer issues)

The following build commands failed:
    CompileC /Users/joaom182/Projects/eipets/app/ios/build/Build/Intermediates.noindex/RealmReact.build/Debug-iphonesimulator/RealmReact.build/Objects-normal/x86_64/RealmReact.o RealmReact/RealmReact.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Steps to Reproduce

npm install realm -g
react-native link realm
react-native run-ios

Version of Realm and Tooling

  • Realm JS SDK Version: 2.13.0
  • Node or React Native: 0.52.0
  • Client OS & Version: Mac Osx High Sierra 10.13.5
  • Which debugger for React Native: None
O-Community T-Help

Most helpful comment

I've found the solution:

Remove this Header Search Path from RealmReact.xcodeproj/project.pbxproj
"$(SRCROOT)/../../../../ios/Pods/Headers/Public/**"

All 8 comments

  • I've tried Clean & Build on XCode, but fails.
  • I've tried too delete my ios/build folder and react-native run-ios, but fails too.
  • Follow my node_modules/realm/vendor folder
    screen shot 2018-07-14 at 14 24 13

I've found the solution:

Remove this Header Search Path from RealmReact.xcodeproj/project.pbxproj
"$(SRCROOT)/../../../../ios/Pods/Headers/Public/**"

@joaom182 and @taylor-pringle

Please help me regarding this issue. I have tried your solution which doesn't work. Please check this issue.

https://github.com/realm/realm-js/issues/2085

To anyone else also seeing this problem, check if /usr/local/include/time.h exists on your system, remove it if it exists.

For React Native 0.61 and Realm 3.1.0
issue still occur after link.

For me, I fixed by adding this to RealmReact proj SearchHeaders

"$(SRCROOT)/../../../../ios/Pods/Headers/Public/React-Core"

how is this still an issue...

I'm not sure what i'm done. Seems like we need to totally clear all previous version of realm. Here the step:
1) "react-native unlink realm"
2) remove the "ios/Pods" folder
3) "npm uninstall realm"
4) At Iphone simulator, go to "Hardware" -> "Erase All Content and Settings"
5) Open "ios/[yourproject].xcworkspace" and goto "Product"->"Clean"
6) npm install realm --save
7) "cd ios && pod install && cd .."
8) 'npx react-native run-ios --simulator="iPhone 11"'

Then run see it works or not.

I using React native 0.61.5 and realm 3.6.5.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timanglade picture timanglade  路  3Comments

ugendrang picture ugendrang  路  3Comments

max-zu picture max-zu  路  3Comments

jmartindivmedianet picture jmartindivmedianet  路  3Comments

bdebout picture bdebout  路  3Comments