graphhopper / graphhopper-ios

iOS Port of the GraphHopper road routing engine
https://www.graphhopper.com/open-source/
Apache License 2.0
69 stars 28 forks source link

Build for armv7s for iphone 5 #11

Closed ugochirico closed 8 years ago

ugochirico commented 8 years ago

When building my app for armv7s (i.e. iphone 5 device) I got the linker error: "file is universal (2 slices) but does not contain a(n) armv7s slice: xxx/build/libgraphhopper.a file 'xxx/build/libgraphhopper.a' for architecture armv7s clang: error: linker command failed with exit code 1 (use -v to see invocation)"

How can I build the library for armv7s?

ugochirico commented 8 years ago

Solved! Simply add in the graphhopper build settings the flag: ARCHS=arm64 armv7s armv7

clns commented 8 years ago

:+1:

randyhbh commented 7 years ago

I think this fix should be include in the project. Regards BTW: Where i can find the flag ARCHS, i shuold add it? Any help with this??

randyhbh commented 7 years ago

Build for armv7 for iphone 4S, this fix dosn't work, Any help?? This is the error in Xcode

ld: 'libs/graphhopper-ios/j2objc/lib/libjre_emul.a(SmallTest.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
randyhbh commented 7 years ago

I fixt it! Change in my project Target > Build Settings > Build Options > ENABLE_BITCODE from YES to NO

clns commented 7 years ago

Thanks for this info. We'll include it in the project.