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

ios build fails: library not found for -lRNSVG-tvOS #366

Closed
whiskeyseven opened this issue Jun 13, 2017 · 11 comments
Closed

ios build fails: library not found for -lRNSVG-tvOS #366

whiskeyseven opened this issue Jun 13, 2017 · 11 comments

Comments

@whiskeyseven
Copy link

Build is failing for ios only, configuration seems to work fine on android.

There seems to be a failed ref to RNSVG-tvOS.

React Native v 0.45.1

My installation steps were:
npm install react-native-svg --save
react-native link
react-native run-ios

react-native link output looked successful. when i re-run, the output is:

rnpm-install info Android module react-native-svg is already linked 
rnpm-install info iOS module react-native-svg is already linked 

build fails mid-way, result is:

ld: library not found for -lRNSVG-tvOS
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@aleksandr-senichev
Copy link

aleksandr-senichev commented Jun 15, 2017

I have the same issue! After the error "linker is failed" I get the error ":CFBundleIdentifier", Does Not Exist. But Android works fine.

Also I even create a new pure react-native project with react-native init .. .It works well, but when I add a react-native-svg package to package.json and link it I get the same error.

@vccabral
Copy link

I just received this error. I was re-linking my app this morning from a fresh install. It is possible this was introduced in the past couple of days.

@whiskeyseven
Copy link
Author

whiskeyseven commented Jun 15, 2017

If it helps anyone, I was able to get the build to work by removing the reference to RNSVG-tvOS, found in the last line of the PBXBuildFile section of my project.pbxproj file (ios/projectname/projectname.xcodeproj/project.pbxproj)

Once I removed that line, the build worked as normal.

Not the ideal fix, but a workaround if anyone is blocked by this issue.

@aleksandr-senichev
Copy link

Downgrade my react-native app and react-native-svg works for me

@yspychala
Copy link

I also removed the reference to RNSVG-tvOS in the project.pbxproj and it worked (react-native@0.45.1), thanks @whiskeyseven!

@mcavaliere
Copy link

I tried @whiskeyseven's approach, but for me it didn't work until I removed all references to libRNSVG in the project.pbxproj file. That got the build to succeed.

@wung-s
Copy link

wung-s commented Jun 25, 2017

Tried @whiskeyseven's solution and while the build was successful, I ended up with this error ReactNative: 0.44.3
I tried the suggested solution that comes with the error message, but that has helped.

screen shot 2017-06-25 at 9 49 37 pm

@wung-s
Copy link

wung-s commented Jun 26, 2017

Ah ! Never mind, I got it working finally. Turns out I had installed mismatching version of react-native, react and react-native-svg

I've got the following
"react-native-svg": "^5.1.8"
"react": "16.0.0-alpha.6",
"react-native": "0.44.3",
and it's all good now

@AlanFoster
Copy link

Confirming that the above approach worked as expected

There's further details on the react-native-svg readme

  • react-native-svg >= 3.2.0 only supports react-native >= 0.29.0
  • react-native-svg >= 4.2.0 only supports react-native >= 0.32.0
  • react-native-svg >= 4.3.0 only supports react-native >= 0.33.0
  • react-native-svg >= 4.4.0 only supports react-native >= 0.38.0 and react >= 15.4.0
  • react-native-svg >= 4.5.0 only supports react-native >= 0.40.0 and react >= 15.4.0
  • react-native-svg >= 5.1.8 only supports react-native >= 0.44.0 and react == 16.0.0-alpha.6
  • react-native-svg >= 5.2.0 only supports react-native >= 0.45.0 and react == 16.0.0-alpha.12
  • react-native-svg >= 5.3.0 only supports react-native >= 0.46.0 and react == 16.0.0-alpha.12

@magicismight
Copy link
Collaborator

duplicated with: #387

@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

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

9 participants