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

ld: library not found for -lnsync #4

Closed
michaelhuman opened this issue Dec 20, 2017 · 8 comments
Closed

ld: library not found for -lnsync #4

michaelhuman opened this issue Dec 20, 2017 · 8 comments
Assignees

Comments

@michaelhuman
Copy link

michaelhuman commented Dec 20, 2017

Hi! I integrated the pod (1.4.1) like this:
pod 'TensorflowPod', :podspec => 'https://raw.githubusercontent.com/rainbean/TensorflowPod/master/TensorflowPod.podspec',
then did pod install. But unfortunately it cannot be compiled.
Xcode 9.2 (high sierra 10.13) during my proj compilation (linking) says:
ld: library not found for -lnsync
clang: error: linker command failed with exit code 1 (use -v to see invocation).
Any ideas how to fix it? Thank you.

@rainbean
Copy link
Owner

rainbean commented Dec 21, 2017

Fix in commit 5a5985f, repack as hotfix at v1.4.1

@michaelhuman
Copy link
Author

I updated pod, but now a bunch of errors (hundreds) appears:
Undefined symbols for architecture x86_64:
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::insert(unsigned long, unsigned long, char)", referenced from:
google::protobuf::operator<<(std::__1::basic_ostream<char, std::__1::char_traits >&, google::protobuf::uint128 const&) in libprotobuf.a(int128.o)
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::at(unsigned long) const", referenced from:
google::protobuf::io::Tokenizer::IsIdentifier(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in libprotobuf.a(tokenizer.o)
...

@rainbean rainbean self-assigned this Dec 21, 2017
@rainbean
Copy link
Owner

Reopen the issue due to missing podspec update

@rainbean rainbean reopened this Dec 21, 2017
@rainbean
Copy link
Owner

@michaelhuman, see if latest commit e70fdc30 helps, local environment/projects work fine. You might need to update pod specs

### close xcode

$ cd PROJECT_FOLDER
$ pod update  

# reopen xcode and build

@michaelhuman
Copy link
Author

michaelhuman commented Dec 21, 2017

no luck :(. I tried to clean everything I could: pod clean, derrived data clean etc. I created new XCode proj, but got same complitaion errors.
The local podspec has your change inside: "lib/libnsync.a"

@rainbean
Copy link
Owner

@michaelhuman in order to narrow down the root cause, could you reference previous release v1.3.1 instead?

In your project Podfile

pod 'TensorflowPod', :podspec => 'https://raw.githubusercontent.com/rainbean/TensorflowPod/v1.3.1/TensorflowPod.podspec'

@michaelhuman
Copy link
Author

damn, I fixed it: I just added .mm file to project and it switched the compiler to the correct (C++?) mode. Now everything is ok while compiling with v.1.4.1!
Thanks for help!

@rainbean
Copy link
Owner

Nice to hear that!

There are more than few undocumented pitfalls on the path to integrate with TensorFlow :)

First tip is to rename objective-c code as C++ (*.mm), another is to create bridge header for Swift project.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants