Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linker warnings building with 1.0.2 framework ("unable to open object file") #460

Closed
yury opened this issue Sep 18, 2014 · 20 comments
Closed
Assignees
Milestone

Comments

@yury
Copy link

yury commented Sep 18, 2014

warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBLChangeTracker_Tests.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBLDatabase+Internal.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBLModel+Properties.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/DDData.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBLView+Internal.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBL_Body.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBLJSONReader.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBL_Revision.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBL_Server.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBLCollateJSON.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBL_Replicator.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBL_Puller.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBL_Pusher.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBLChangeTracker.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBLBase64.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBL_BlobStore.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBLRemoteRequest.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBLBatcher.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBLDatabase+Attachments.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBLDatabase+Insertion.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBLDatabase+Replication.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBLDatabase+LocalDocs.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBLMisc.o unable to open object file
warning: (arm64) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-community/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphoneos/CBL iOS library.build/Objects-normal/arm64/CBLMultipartReader.o unable to open object file
@snej
Copy link
Contributor

snej commented Sep 19, 2014

This has been discussed on the mailing list — I can go look up the threads, but IIRC the warnings happen while generating the debugging symbols for the app, and changing the style of symbols (using a dSYM? Not using a dSYM?) makes the warnings go away.

@snej
Copy link
Contributor

snej commented Sep 19, 2014

Here's the mailing list thread.

I can hide the warnings by switching the Build Setting Debug Information Format from "DWARF with dSYM file" to "DWARF"

It was also noted that doing so will interfere with using the Crashlytics service.

@snej
Copy link
Contributor

snej commented Sep 19, 2014

I've tried changing CBL's build settings, trying both debug information formats and stripping options, but haven't been able to make the warnings go away.

I've just posted a question to Apple's xcode-users mailing list.

@snej snej changed the title pod v 1.0.2 generates 160 warnings :( Linker warnings building with 1.0.2 framework ("unable to open object file") Sep 19, 2014
@snej snej self-assigned this Sep 19, 2014
@snej snej mentioned this issue Sep 22, 2014
@semireg
Copy link

semireg commented Sep 22, 2014

Thank you for looking into it, @snej.

@msmollin
Copy link

msmollin commented Oct 3, 2014

Just wanted to +1 this and add my own info. I encountered it trying to build the ToDoLite app for iOS using the enterprise version as well.

warning: (i386) /Users/jenkins/jenkins/workspace/build_cblite_ios_102-enterprise/couchbase-lite-ios/build/CouchbaseLite.build/Release-iphonesimulator/CBL iOS library.build/Objects-normal/i386/CBLChangeTracker_Tests.o unable to open object file

@snej
Copy link
Contributor

snej commented Oct 17, 2014

I think that I'm going to back out the build-setting change that introduced this problem.

@vfleurima
Copy link

Just wanted to comment that I observed this issue right out of the gate by simply adding 1.0.3 to my project using Cocoapods.

@simonmaddox
Copy link

Is there a fix for this when building 1.0.3 from Cocoapods? I've tried setting Debug Information Format on the Pods-couchbase-lite-ios target to Dwarf rather than Dwarf with dSYM File, but that hasn't helped.

The warnings are gone if I set this on my application's target, but I'd like to build with symbols enabled. I can't see any recent commits that would fix this issue in master either.

@davidquon
Copy link

@snej - Do you have any idea when a release will be made with a fix for this?

@ataranlen
Copy link

This is generating 139 warnings when using 1.0.3 in xCode 6.1

@coppercash
Copy link

Have you tried set Generate Debug Symbols = "NO" in your build settings when you build your framework?
It works fine on our library, all warnings disappear after I did that.
But your product is .framework files, while ours is .a file. I don't if there are differences. But there is no harm to try.

@snej
Copy link
Contributor

snej commented Jan 9, 2015

We want debugging symbols, though. Without them it's much harder to interpret stack traces, which makes debugging a pain.

@coppercash
Copy link

You mean you want or your want your users have debugging symbols?
I suppose you mean the first, coz your uses can only get warnings even if you don't turn it off.

You can have 2 schemes, let us say release and debug.
When you develop, you build with debug, and you get the symbols.
But when you archive your product, you use release, which turns off the field Generate Debug Symbols, and free your uses from the warnings.

@snej
Copy link
Contributor

snej commented Jan 9, 2015

I think by "users" you mean "developers", right? We want developers to have our debugging symbols in their apps, so that when their app crashes the backtrace has meaningful information in it. So the library we build, that they link against, needs to have debugging symbols in it.

I'm not sure you're understanding that what we produce is a static library, not an app or an OS X style dylib framework.

@spritesun
Copy link

What's the current recommend fix for this issue. Why it's closed. Should my team wait until 1.1.0?

@pasin
Copy link
Contributor

pasin commented Feb 9, 2015

The issue was fixed in fe092a9, but that was not included in v1.0.4 which is waiting for an official release either. To get the fix now, you will need to build the framework from the master branch. Sorry for the inconvenience.

@spritesun
Copy link

Thanks so much. We are using the master now.

Long Sun
Kind Regards

On Monday, 9 February 2015 at 2:06 pm, Pasin Suriyentrakorn wrote:

The issue was fixed in fe092a9 (fe092a9), but that was not included in v1.0.4 which is waiting for an official release either. To get the fix now, you will need to build the framework from the master branch. Sorry for the inconvenience.


Reply to this email directly or view it on GitHub (#460 (comment)).

@snej
Copy link
Contributor

snej commented Feb 9, 2015

@spritesun The master branch is currently in an unstable state, as major features just got merged into it. I wouldn't recommend switching to it right now.

Is there a reason the linker warnings are a serious issue for you? I know they're annoying, but they should not be breaking your build.

@snej
Copy link
Contributor

snej commented Feb 9, 2015

If you really want the fix now, I would recommend updating to commit aeb996a (tagged forestdb_merge_before) but no further.

@spritesun
Copy link

@snej Cheers. Then we use aeb996a

davidquon pushed a commit to amco/couchbase-lite-ios that referenced this issue Jul 5, 2016
Good news: this will get rid of the 100+ link warnings when building an
  iOS app using Couchbase Lite.
Bad news: It reopens couchbase#413, the problem that internal symbols are exposed
  in the library, which can cause duplicate-symbol errors when building
  an app using libraries (like yajl) that CBL also uses.
Fixes couchbase#460

(cherry picked from commit fe092a9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests