Running Sample code on device

23 views
Skip to first unread message

Dantes

unread,
Jun 26, 2010, 7:26:13 PM6/26/10
to Skyhook Local Faves


I've downloaded the cocktails sample code, and it seems to work ok in
the iphone simulator. However, when I try to run it on a device I get
the following error:


ld: duplicate symbol _OBJC_METACLASS_$_TTActivityLabel

Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/
gcc-4.2 failed with exit code 1


I've tried everything I can think of, and have not been able to figure
this one out. Has anyone else had any problems like this, or with
putting the sample code on an actual device?



George

unread,
Jun 27, 2010, 11:47:43 PM6/27/10
to Skyhook Local Faves
Hi Dantes,

What OS version are you compiling against?

Dantes

unread,
Jun 28, 2010, 12:58:43 PM6/28/10
to Skyhook Local Faves
George, thanks for getting back to me. I've been trying to get it to
compile on iOS 4.0. It does work in the simulator, but I haven't had
any luck trying to put it on the device itself. I do get some
warnings when building, most of which don't seem too bad, however,
there are several:

<built-in>:0:0 <built-in>:0: warning: -fobjc-gc not supported for
iPhone OS; ignoring.


Maybe this is the problem?

Assuming I start with an unmodified copy of the sample code, xcode
3.2.3, and the iOS 4.0, is there anything I should change or do to get
it to work on a device?

Thanks again for your time.

- Dantes


Chris

unread,
Jun 28, 2010, 1:27:43 PM6/28/10
to Skyhook Local Faves

George

unread,
Jun 30, 2010, 1:05:23 PM6/30/10
to Skyhook Local Faves
Thanks for the info guys - looks like an issue with the third party
Three20 library. Looking into this - stay tuned.

- George

On Jun 28, 1:27 pm, Chris <tkdhwar...@gmail.com> wrote:
> Hi there, I'm kind of having the same problem.  I've followed all the
> steps to add the local faves library to my project, and am using the
> OS 4.0 as well.  It compiles just fine with on the simulator, but when
> I try to compile it on the device, I get the same building error (2 of
> them)  along with 64 warnings.
>
> I've copied and pasted the build results from the debugger console
> below.  I hope this helps to figure out what I am doing wrong:
>
> CompileC build/Three20.build/Debug-iphoneos/Three20.build/Objects-
> normal/armv6/TTActivityLabel.o TTActivityLabel.m normal armv6
> objective-c com.apple.compilers.gcc.4_2
> cd "/Users/fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/
> src/external/three20/src"
> setenv LANG en_US.US-ASCII
> setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/
> Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
> /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -x
> objective-c -arch armv6 -fmessage-length=0 -pipe -std=c99 -Wno-
> trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -DDEBUG
> -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
> iPhoneOS4.0.sdk -gdwarf-2 -mthumb -miphoneos-version-min=4.0 -iquote "/
> Users/fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/src/
> external/three20/src/build/Three20.build/Debug-iphoneos/Three20.build/
> Three20-generated-files.hmap" "-I/Users/fishingtonstudios/Desktop/The
> Party Finder/local_faves_11-1/src/external/three20/src/build/
> Three20.build/Debug-iphoneos/Three20.build/Three20-own-target-
> headers.hmap" "-I/Users/fishingtonstudios/Desktop/The Party Finder/
> local_faves_11-1/src/external/three20/src/build/Three20.build/Debug-
> iphoneos/Three20.build/Three20-all-target-headers.hmap" -iquote "/
> Users/fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/src/
> external/three20/src/build/Three20.build/Debug-iphoneos/Three20.build/
> Three20-project-headers.hmap" "-F/Users/fishingtonstudios/Desktop/The
> Party Finder/local_faves_11-1/src/external/three20/src/build/Debug-
> iphoneos" "-I/Users/fishingtonstudios/Desktop/The Party Finder/
> local_faves_11-1/src/external/three20/src/build/Debug-iphoneos/
> include" -I. "-I/Users/fishingtonstudios/Desktop/The Party Finder/
> local_faves_11-1/src/external/three20/src/build/Three20.build/Debug-
> iphoneos/Three20.build/DerivedSources/armv6" "-I/Users/
> fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/src/
> external/three20/src/build/Three20.build/Debug-iphoneos/Three20.build/
> DerivedSources" -c "/Users/fishingtonstudios/Desktop/The Party Finder/
> local_faves_11-1/src/external/three20/src/TTActivityLabel.m" -o "/
> Users/fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/src/
> external/three20/src/build/Three20.build/Debug-iphoneos/Three20.build/
> Objects-normal/armv6/TTActivityLabel.o"
>
> CompileC build/Three20.build/Debug-iphoneos/Three20.build/Objects-
> normal/armv6/TTErrorView.o TTErrorView.m normal armv6 objective-c
> com.apple.compilers.gcc.4_2
> cd "/Users/fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/
> src/external/three20/src"
> setenv LANG en_US.US-ASCII
> setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/
> Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
> /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -x
> objective-c -arch armv6 -fmessage-length=0 -pipe -std=c99 -Wno-
> trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -DDEBUG
> -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
> iPhoneOS4.0.sdk -gdwarf-2 -mthumb -miphoneos-version-min=4.0 -iquote "/
> Users/fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/src/
> external/three20/src/build/Three20.build/Debug-iphoneos/Three20.build/
> Three20-generated-files.hmap" "-I/Users/fishingtonstudios/Desktop/The
> Party Finder/local_faves_11-1/src/external/three20/src/build/
> Three20.build/Debug-iphoneos/Three20.build/Three20-own-target-
> headers.hmap" "-I/Users/fishingtonstudios/Desktop/The Party Finder/
> local_faves_11-1/src/external/three20/src/build/Three20.build/Debug-
> iphoneos/Three20.build/Three20-all-target-headers.hmap" -iquote "/
> Users/fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/src/
> external/three20/src/build/Three20.build/Debug-iphoneos/Three20.build/
> Three20-project-headers.hmap" "-F/Users/fishingtonstudios/Desktop/The
> Party Finder/local_faves_11-1/src/external/three20/src/build/Debug-
> iphoneos" "-I/Users/fishingtonstudios/Desktop/The Party Finder/
> local_faves_11-1/src/external/three20/src/build/Debug-iphoneos/
> include" -I. "-I/Users/fishingtonstudios/Desktop/The Party Finder/
> local_faves_11-1/src/external/three20/src/build/Three20.build/Debug-
> iphoneos/Three20.build/DerivedSources/armv6" "-I/Users/
> fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/src/
> external/three20/src/build/Three20.build/Debug-iphoneos/Three20.build/
> DerivedSources" -c "/Users/fishingtonstudios/Desktop/The Party Finder/
> local_faves_11-1/src/external/three20/src/TTErrorView.m" -o "/Users/
> fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/src/
> external/three20/src/build/Three20.build/Debug-iphoneos/Three20.build/
> Objects-normal/armv6/TTErrorView.o"
>
> CompileC build/Three20.build/Debug-iphoneos/Three20.build/Objects-
> normal/armv6/TTImageView.o TTImageView.m normal armv6 objective-c
> com.apple.compilers.gcc.4_2
> cd "/Users/fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/
> src/external/three20/src"
> setenv LANG en_US.US-ASCII
> setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/
> Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
> /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -x
> objective-c -arch armv6 -fmessage-length=0 -pipe -std=c99 -Wno-
> trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -DDEBUG
> -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
> iPhoneOS4.0.sdk -gdwarf-2 -mthumb -miphoneos-version-min=4.0 -iquote "/
> Users/fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/src/
> external/three20/src/build/Three20.build/Debug-iphoneos/Three20.build/
> Three20-generated-files.hmap" "-I/Users/fishingtonstudios/Desktop/The
> Party Finder/local_faves_11-1/src/external/three20/src/build/
> Three20.build/Debug-iphoneos/Three20.build/Three20-own-target-
> headers.hmap" "-I/Users/fishingtonstudios/Desktop/The Party Finder/
> local_faves_11-1/src/external/three20/src/build/Three20.build/Debug-
> iphoneos/Three20.build/Three20-all-target-headers.hmap" -iquote "/
> Users/fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/src/
> external/three20/src/build/Three20.build/Debug-iphoneos/Three20.build/
> Three20-project-headers.hmap" "-F/Users/fishingtonstudios/Desktop/The
> Party Finder/local_faves_11-1/src/external/three20/src/build/Debug-
> iphoneos" "-I/Users/fishingtonstudios/Desktop/The Party Finder/
> local_faves_11-1/src/external/three20/src/build/Debug-iphoneos/
> include" -I. "-I/Users/fishingtonstudios/Desktop/The Party Finder/
> local_faves_11-1/src/external/three20/src/build/Three20.build/Debug-
> iphoneos/Three20.build/DerivedSources/armv6" "-I/Users/
> fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/src/
> external/three20/src/build/Three20.build/Debug-iphoneos/Three20.build/
> DerivedSources" -c "/Users/fishingtonstudios/Desktop/The Party Finder/
> local_faves_11-1/src/external/three20/src/TTImageView.m" -o "/Users/
> fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/src/
> external/three20/src/build/Three20.build/Debug-iphoneos/Three20.build/
> Objects-normal/armv6/TTImageView.o"
>
> CompileC build/Three20.build/Debug-iphoneos/Three20.build/Objects-
> normal/armv6/TTView.o TTView.m normal armv6 objective-c
> com.apple.compilers.gcc.4_2
> cd "/Users/fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/
> src/external/three20/src"
> setenv LANG en_US.US-ASCII
> setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/
> Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
> /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -x
> objective-c -arch armv6 -fmessage-length=0 -pipe -std=c99 -Wno-
> trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -DDEBUG
> -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
> iPhoneOS4.0.sdk -gdwarf-2 -mthumb -miphoneos-version-min=4.0 -iquote "/
> Users/fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/src/
> external/three20/src/build/Three20.build/Debug-iphoneos/Three20.build/
> Three20-generated-files.hmap" "-I/Users/fishingtonstudios/Desktop/The
> Party Finder/local_faves_11-1/src/external/three20/src/build/
> Three20.build/Debug-iphoneos/Three20.build/Three20-own-target-
> headers.hmap" "-I/Users/fishingtonstudios/Desktop/The Party Finder/
> local_faves_11-1/src/external/three20/src/build/Three20.build/Debug-
> iphoneos/Three20.build/Three20-all-target-headers.hmap" -iquote "/
> Users/fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/src/
> external/three20/src/build/Three20.build/Debug-iphoneos/Three20.build/
> Three20-project-headers.hmap" "-F/Users/fishingtonstudios/Desktop/The
> Party Finder/local_faves_11-1/src/external/three20/src/build/Debug-
> iphoneos" "-I/Users/fishingtonstudios/Desktop/The Party Finder/
> local_faves_11-1/src/external/three20/src/build/Debug-iphoneos/
> include" -I. "-I/Users/fishingtonstudios/Desktop/The Party Finder/
> local_faves_11-1/src/external/three20/src/build/Three20.build/Debug-
> iphoneos/Three20.build/DerivedSources/armv6" "-I/Users/
> fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/src/
> external/three20/src/build/Three20.build/Debug-iphoneos/Three20.build/
> DerivedSources" -c "/Users/fishingtonstudios/Desktop/The Party Finder/
> local_faves_11-1/src/external/three20/src/TTView.m" -o "/Users/
> fishingtonstudios/Desktop/The Party Finder/local_faves_11-1/src/
> external/three20/src/build/Three20.build/Debug-iphoneos/Three20.build/
> Objects-normal/armv6/TTView.o"
>
> CompileC ...
>
> read more »

Chris

unread,
Jul 14, 2010, 1:26:58 PM7/14/10
to Skyhook Local Faves
George,

Thanks for the reply. Have you had any luck with the Three20 library
issue?
> > iphoneos/Three20.build/DerivedSources/armv6" "-I/Users/...
>
> read more »

George

unread,
Jul 20, 2010, 11:29:43 AM7/20/10
to Skyhook Local Faves
Hi Chris,

The Three20 problem has been resolved, but other similar issues have
cropped up.
There is a bug in the latest XCode linker when generating universal
binaries - that is building for both armv6 (older iPhones) and armv7
(iPad and iPhone4). The linker includes the same symbols multiple
times within the same library, hence causing the duplicate symbol
errors. More details are here: http://blog.binaryfinery.com/?p=225

I am currently trying to develop a sane workaround - hopefully Apple
will fix this soon.

Stay tuned.
> ...
>
> read more »

Chris

unread,
Jul 23, 2010, 5:30:55 PM7/23/10
to Skyhook Local Faves
George,

Thanks again. As soon as a solution is found and I can build on a
device without it failing, I'll implement local faves into my
application.

George Polak

unread,
Jul 23, 2010, 6:09:40 PM7/23/10
to skyhook-l...@googlegroups.com, Skyhook Local Faves
Hi Chris,

The linker issue has been resolved. We will be releasing a new version early next week. I will post an update here when that happens.

Best,

George

Chris

unread,
Jul 26, 2010, 9:10:52 PM7/26/10
to Skyhook Local Faves
That sounds great. Thank you again.

- Chris

On Jul 23, 4:09 pm, George Polak <gpo...@skyhookwireless.com> wrote:
> Hi Chris,
>
> The linker issue has been resolved. We will be releasing a new version early next week. I will post an update here when that happens.
>
> Best,
>
> George
>
> >>>>> normal/armv6/TTView.o TTView.m normal armv6 objective-c...
>
> read more »

George

unread,
Jul 29, 2010, 2:11:20 PM7/29/10
to Skyhook Local Faves
Local Faves 1.1.2 is now available for download. Amongst other minor
fixes, it solves the duplicate symbol issue encountered when building
universal binaries with XCode 3.2.3 and above. The Local Faves
framework and the Cocktails sample app should now build without
issues.

- George
> ...
>
> read more »

neptune2000

unread,
Jul 30, 2010, 6:09:21 AM7/30/10
to Skyhook Local Faves
I clicked 'build" and it died immediately with:

Build FBPlatform of project FBConnect with configuration Debug

Check dependencies

[BEROR]error: There is no SDK with the name or path 'iphoneos4.1'

error: There is no SDK with the name or path 'iphoneos4.1'
> ...
>
> read more »

George

unread,
Jul 30, 2010, 9:58:57 AM7/30/10
to Skyhook Local Faves
Hi neptune,

Make sure you're compiling against the right SDK that's on your
system. Right-click on the project and choose Info, then in the Build
tab select the highest SDK present on your system in the Base SDK
parameter. Local Faves will compile with SDK 3.0 and above. Then Clean
All Targets and Build again. Try this with the sample project.

- George
> ...
>
> read more »

neptune2000

unread,
Jul 30, 2010, 11:54:47 AM7/30/10
to Skyhook Local Faves
Hi,

I did compile against the right Base SDK and target. Once I did a
Clean All Targets, and allows compile and link to succeed.
Unfortunately the downloading to the device reports a "Failed to
Upload cocktals.app" error. Actually the app is loaded properly on the
device, but the debugger fails to start. Could it be because I also
have iSwig on the device?

This is on an iPhone 4, running iOS 4.0.1.

Incidentally there are several warnings on linking:

PhaseScriptExecution "Strip Duplicate Symbols" /Users/marcopapa/
Documents/Builds/LocalFaves.build/Debug-iphoneos/LocalFaves.build/
Script-CEE9ADC511F6353F0030A967.sh

Rebuilding library as proper multiarch file
lipo: -remove armv7 specified but fat file: /Users/marcopapa/Documents/
Builds/LocalFaves.build/Debug-iphoneos/LocalFaves.build/Objects-normal/
armv6/libLocalFaves.a does not contain that architecture
lipo: -remove armv6 specified but fat file: /Users/marcopapa/Documents/
Builds/LocalFaves.build/Debug-iphoneos/LocalFaves.build/Objects-normal/
armv7/libLocalFaves.a does not contain that architecture
libtool: for architecture: armv6 file: /Users/marcopapa/Documents/
Builds/LocalFaves.build/Debug-iphoneos/LocalFaves.build/Objects-normal/
armv6/libLocalFaves.a(Three20.o) has no symbols
libtool: for architecture: armv6 file: /Users/marcopapa/Documents/
Builds/LocalFaves.build/Debug-iphoneos/LocalFaves.build/Objects-normal/
armv6/libLocalFaves.a(TTDebug.o) has no symbols
libtool: for architecture: armv7 file: /Users/marcopapa/Documents/
Builds/LocalFaves.build/Debug-iphoneos/LocalFaves.build/Objects-normal/
armv7/libLocalFaves.a(Three20.o) has no symbols
libtool: for architecture: armv7 file: /Users/marcopapa/Documents/
Builds/LocalFaves.build/Debug-iphoneos/LocalFaves.build/Objects-normal/
armv7/libLocalFaves.a(TTDebug.o) has no symbols

and this:

ld: warning: directory '/Users/marcopapa/Desktop/Skyhook Wireless/
local_faves_112/samples/Cocktails/../../../../../../Library/Frameworks/
JSON.framework/Versions/Current' following -L not found


The latter is due to a bogus reference in the Target Library search
path.
> ...
>
> read more »

neptune2000

unread,
Jul 30, 2010, 6:14:23 PM7/30/10
to Skyhook Local Faves
The failure to start the debugger in iPhone 4 wit iOS 4.0.1 was fixed
by a reboot of the iPhone 4. The remaining warnings do not seem to
impact the execution.
> ...
>
> read more »

George Polak

unread,
Jul 30, 2010, 10:18:42 PM7/30/10
to skyhook-l...@googlegroups.com, Skyhook Local Faves
Good to hear neptune. The majority of warnings are deprecation warnings - eliminating then would make Local Faves incompatible for all but the latest SDKs. Like you said, there is no impact on execution.
Reply all
Reply to author
Forward
0 new messages