Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

get libllmr.a building for ARM architectures #12

Closed

Description

@incanus

The existing OS X libllmr.a gets linked ok for iOS simulator testing, but can't be tested on a real device.

Activity

  1. incanus commented on Jan 30, 2014

    @incanus
    ContributorAuthor

    Just going at this from the Xcode side, if I change the llmr target's build SDK from OS X to iOS, then build for "iOS Device", it just goes ahead and builds for ARM:

    armv7:

    Libtool xcode/src/llmr-ios.build/Debug-iphoneos/llmr.build/Objects-normal/armv7/libllmr.a normal armv7
    ...
    

    armv7s:

    Libtool xcode/src/llmr-ios.build/Debug-iphoneos/llmr.build/Objects-normal/armv7s/libllmr.a normal armv7s
    ...
    

    Then the universal binary:

    CreateUniversalBinary xcode/src/Debug-iphoneos/libllmr.a normal armv7\ armv7s
    ...
    

    But then building the actual app gives me:

    ld: library not found for -lllmr
    

    From running:

    Ld xcode/build/llmr-ios.build/Debug-iphoneos/ios.build/Objects-normal/arm64/ios normal arm64
        cd "/Users/incanus/Documents/Projects/Development Seed/MapBox/vector/llmr.native"
        setenv IPHONEOS_DEPLOYMENT_TARGET 7.0
        setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/incanus/bin:/Applications/Postgres.app/Contents/MacOS/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/MacGPG2/bin:/Users/incanus/.rvm/bin"
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -L/Users/incanus/Documents/Projects/Development\ Seed/MapBox/vector/llmr.native/xcode/build/Debug-iphoneos -F/Users/incanus/Documents/Projects/Development\ Seed/MapBox/vector/llmr.native/xcode/build/Debug-iphoneos -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/incanus/Documents/Projects/Development\ Seed/MapBox/vector/llmr.native/xcode/build/llmr-ios.build/Debug-iphoneos/ios.build/Objects-normal/arm64/ios.LinkFileList -dead_strip -stdlib=libc++ -Wl,-search_paths_first -Wl,-headerpad_max_install_names /Users/incanus/Documents/Projects/Development\ Seed/MapBox/vector/llmr.native/xcode/src/Debug/libllmr.a -fobjc-arc -fobjc-link-runtime -stdlib=libc++ -miphoneos-version-min=7.0 -lllmr -framework CoreGraphics -framework Foundation -framework GLKit -framework OpenGLES -framework UIKit -Xlinker -dependency_info -Xlinker /Users/incanus/Documents/Projects/Development\ Seed/MapBox/vector/llmr.native/xcode/build/llmr-ios.build/Debug-iphoneos/ios.build/Objects-normal/arm64/ios_dependency_info.dat -o /Users/incanus/Documents/Projects/Development\ Seed/MapBox/vector/llmr.native/xcode/build/llmr-ios.build/Debug-iphoneos/ios.build/Objects-normal/arm64/ios
    

    Still trying to figure out how to get it to link properly, but I think that's specific to my project.


    The relevant stuff changed in Xcode is adding a platforms directive:

    SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
    

    And one for SDKROOT:

     SDKROOT = iphoneos;
    

    So that it doesn't use the Xcode default of OS X for things. The "build all architectures including 64-bit" seems to carry over fine between platforms so that we get a 64-bit ARM build, too.

  2. incanus commented on Jan 30, 2014

    @incanus
    ContributorAuthor

    Eh, architectures does need some finagling:

    OS X:

    ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
    

    iOS:

    ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
    
  3. incanus commented on Jan 30, 2014

    @incanus
    ContributorAuthor

    Success on hardware! (With some hardcoded linking for now.) There are some specific gaps between tiles during rotation and some other glitchy artifacts, but for the most part, it's pretty solid. Also:

    2014-01-29 17:09:22.942 ios[4773:60b] FPS: 54.585692
    2014-01-29 17:09:23.942 ios[4773:60b] FPS: 59.997368
    2014-01-29 17:09:24.943 ios[4773:60b] FPS: 59.967602
    2014-01-29 17:09:25.943 ios[4773:60b] FPS: 59.991247
    2014-01-29 17:09:26.944 ios[4773:60b] FPS: 59.940478
    2014-01-29 17:09:27.944 ios[4773:60b] FPS: 59.996281
    2014-01-29 17:09:28.963 ios[4773:60b] FPS: 53.984018
    2014-01-29 17:09:29.976 ios[4773:60b] FPS: 57.206384
    2014-01-29 17:09:30.977 ios[4773:60b] FPS: 59.984940
    2014-01-29 17:09:31.977 ios[4773:60b] FPS: 59.980451
    2014-01-29 17:09:32.977 ios[4773:60b] FPS: 59.999399
    2014-01-29 17:09:33.977 ios[4773:60b] FPS: 59.969717
    2014-01-29 17:09:34.981 ios[4773:60b] FPS: 59.771732
    2014-01-29 17:09:35.982 ios[4773:60b] FPS: 59.961258
    2014-01-29 17:09:36.992 ios[4773:60b] FPS: 60.373864
    2014-01-29 17:09:37.994 ios[4773:60b] FPS: 59.895597
    2014-01-29 17:09:39.011 ios[4773:60b] FPS: 59.982165
    2014-01-29 17:09:40.027 ios[4773:60b] FPS: 60.030029
    2014-01-29 17:09:41.048 ios[4773:60b] FPS: 57.787285
    2014-01-29 17:09:42.060 ios[4773:60b] FPS: 57.314287
    2014-01-29 17:09:43.077 ios[4773:60b] FPS: 59.987059
    2014-01-29 17:09:44.078 ios[4773:60b] FPS: 59.968874
    2014-01-29 17:09:45.079 ios[4773:60b] FPS: 59.911995
    2014-01-29 17:09:46.094 ios[4773:60b] FPS: 60.072298
    2014-01-29 17:09:47.096 ios[4773:60b] FPS: 57.933148
    2014-01-29 17:09:48.111 ios[4773:60b] FPS: 60.069887
    2014-01-29 17:09:49.113 ios[4773:60b] FPS: 59.915633
    2014-01-29 17:09:50.113 ios[4773:60b] FPS: 59.972061
    2014-01-29 17:09:51.131 ios[4773:60b] FPS: 59.948027
    2014-01-29 17:09:52.145 ios[4773:60b] FPS: 60.122990
    2014-01-29 17:09:53.146 ios[4773:60b] FPS: 59.948260
    
  4. kkaefer commented on Jan 30, 2014

    @kkaefer
    Member

    Pretty awesome! Not sure why there would be gaps between tiles though, are these the debug lines?

  5. incanus commented on Jan 31, 2014

    @incanus
    ContributorAuthor

    This is a non-issue now -- builds fine. This will be ultimately solved by #21 so closing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions