Uploaded image for project: 'Snowstorm'
  1. Snowstorm
  2. STORM-938

Failure to load UI textures from disk when viewer is built against the Mac OS X 10.6 SDK



    • Type: Defect
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: Viewer 2.6.0
    • Labels:
    • Environment:
      Mac OS X 10.6.1
      Xcode 3.2 (Base SDK Mac OS X 10.6)


      When the viewer is built using the 10.6 SDK, all UI textures fail to load. Some investigation tracked this down to a problem with the apr_finfo_t struct in the Apache Portable Runtime; the wrong element of the struct is getting returned instead of size when trying to read the file.

      apr_finfo_t contains a member inode of type apr_ino_t. However, apr_ino_t is defined by APR to be the system type ino_t which was by default 32-bit with the 10.4 and 10.5 SDKs, but in 10.6 is now 64-bit. This means the ABI of the APR library is broken when using a lib built on 10.4 or 10.5, with the 10.6 SDK, as the APR headers will size apr_ino_t and hence apr_finfo_t using the current system ino_t (64-bit) which does not match the Linden supplied libapr-1.a which is built for 10.4 (32-bit ino_t). This results in any element of the struct that comes after the inode being returned incorrectly.

      This is not due to be fixed officially until APR-2, as it means a change in the ABI. However, in our case we could fix it by using a separate copy of APR itself buiit with the 10.6 SDK ( however we then have the opposite problem, in that it won't work against the 10.4 and 10.5 SDKs)

      OR ...

      Instead of juggling multiple versions of the library for each SDK, we can build a single version of APR with the type of apr_ino_t defined as apr_int64_t (i.e. long long) instead of using the system ino_t. This results in an APR lib and header files that will work for all of 10.4, 10.5 and 10.6 SDKs.

      Hope that makes some sense




            Unassigned Unassigned
            aimee.trescothick Aimee Trescothick
            7 Start watching this issue