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

Build fails with: library not found for -lRNSVG-tvOS #544

Closed
jd20 opened this issue Dec 15, 2017 · 10 comments
Closed

Build fails with: library not found for -lRNSVG-tvOS #544

jd20 opened this issue Dec 15, 2017 · 10 comments

Comments

@jd20
Copy link

jd20 commented Dec 15, 2017

This looks like the same issue as #387, and was fixed in 5.3.1, but I'm seeing this build error even with newer versions of react-native-svg. Repo steps:

  1. Create a new project with react-native init
  2. Run yarn add react-native-svg
  3. Run react-native link react-native-svg
  4. Run react-native run-ios and observe the build error: ld: library not found for -lRNSVG-tvOS

My dependency versions from package.json are:

  "dependencies": {
    "react": "16.0.0",
    "react-native": "0.51.0",
    "react-native-svg": "^6.0.1-rc.1"
  },

If I open the XCode project and remove the RNSVG-tvOS.a library under "Recovered References" folder, then build succeeds.

@dusave
Copy link

dusave commented Dec 18, 2017

@jd20 did you run react-native link react-native-svg?

@jd20
Copy link
Author

jd20 commented Dec 19, 2017

Sorry, forgot to include that in the instructions above, yes I ran react-native link after adding the package. Actually, pretty sure it's the link command command which is adding the problematic RNSVG-tvOS.a reference to the XCode project. Just edited to include that step.

@aaronklaser
Copy link

+1 ... I am also having this issue -_-

@dhamdani666
Copy link

i think not support with react-native version 0.51.0

@jd20
Copy link
Author

jd20 commented Dec 29, 2017

The library seems to work fine with 0.51.0, just have to remove the RNSVG-tvOS.a reference. Maybe it'd make sense to make a note of this in the installation instructions, unless a fix is coming soon.

@vladinator1000
Copy link

Noob here, @jd20 how do you remove the reference?

@jd20
Copy link
Author

jd20 commented Jan 4, 2018

Open the XCode project form your project's ios folder, hit the Project Navigator button top left, and look for the folder "Recovered References". Select the item RNSVG-tvOS.a, and hit delete, it will be removed from the project. Then you can try to build again (either Cmd+B from XCode or react-native run-ios from command line), you might need to do a Build > Clean first if it's still not working (Cmd+K in XCode).

I don't have an exact screenshot, but here's something close:

screen shot 2018-01-03 at 7 19 51 pm

If you don't see the item under Recovered References, make sure you ran react-native link, that's what creates it.

@vladinator1000
Copy link

Removing it from here did the trick
screen shot 2018-01-04 at 3 34 59 am

@msand
Copy link
Collaborator

msand commented Jan 17, 2018

This is caused by a bug in react-native link, fix will be merged soon: facebook/react-native#13783

@phunkren
Copy link

@savovs 👋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants