QBoard » Statistical modeling » Stats - Conceptual » stat() unavailable in ios simulator?

stat() unavailable in ios simulator?

  • I've compiled and linked ios app that uses lib (libclang) that uses stat() with no errors. But i'm having runtime error:

    LLVM code which raises error is (/Unix/Path.inc):

    error_code status(const Twine &Path, file_status &Result) {
      SmallString<128> PathStorage;
      StringRef P = Path.toNullTerminatedStringRef(PathStorage);
    
      struct stat Status;
      int StatRet = ::stat(P.begin(), &Status); // failure here
      return fillStatus(StatRet, Status, Result);
    }

     

    How was i able to link the app without having stat() in symbols? How can i fix/walk-around it?

      July 27, 2021 2:09 PM IST
    0
  •  

    The issue is that you built libclang for OSX and linked it into an iOS executable. You need to build libclang for the correct platform.

    stat certainly is supported on iOS.

      July 27, 2021 4:21 PM IST
    0
  • was said stat is not supported on iOS.
      August 25, 2021 2:38 PM IST
    0
  • I’ve got some more information on this: When I right-click the devices in Window -> Devices, "Show in Run Destinations Menu" is checked on all the Simulators just like it is on my real devices, yet only the real devices show up.

    Also, I just tried creating a new iOS project from scratch, but there was no option to run anything at all. I don’t even know how to set this up, though, because I use Unity for creating Xcode projects. But I can confirm that this issue shows up on all the Projects that I am working on. So it doesn’t seem to be project-specific.

    Besides, when I updated to 6.2, the simulators still worked in 6.1. Only 6.2 was having this issue. Well, and then 6.3 and now 6.4.

      January 11, 2022 3:32 PM IST
    0