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

libzbar recipe missing libiconv dependency #676

Closed
RobertFlatt opened this issue Mar 6, 2022 · 9 comments
Closed

libzbar recipe missing libiconv dependency #676

RobertFlatt opened this issue Mar 6, 2022 · 9 comments

Comments

@RobertFlatt
Copy link
Contributor

Versions

  • Python : 3.9.9
  • MacOS version : 11.6.3
  • XCode Version : 13.2.1
  • Cython version :0.29.28
  • kivy-ios : master

Describe the bug
The "play" step in Xcode fails with a link error.

To Reproduce

toolchain distclean
toolchain build python3 kivy
toolchain build libzbar
toolchain create xxx yyy
open xxx-ios/xxx.xcodeproj
"press play"

Expected behavior

The failed link apperars due to an unknown missing assembler library. This should be included in the xcodeproj files, as is the case for other library dependencies.

Logs

Undefined symbols for architecture x86_64:
  "_iconv", referenced from:
      _qr_code_data_list_extract_text in libzbar.a(libzbar_la-qrdectxt.o)
     (maybe you meant: _SDL_iconv_open, _SDL_iconv_close , _SDL_iconv_string , _SDL_iconv )
  "_iconv_close", referenced from:
      _qr_code_data_list_extract_text in libzbar.a(libzbar_la-qrdectxt.o)
     (maybe you meant: _SDL_iconv_close)
  "_iconv_open", referenced from:
      _qr_code_data_list_extract_text in libzbar.a(libzbar_la-qrdectxt.o)
     (maybe you meant: _SDL_iconv_open)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Additional context
A Google search suggests "adding Accelerate"
Looking in the project.pbxproj file we see Accelerate exists in the same group as libkivy.a
However the "Accelerate" option does not appear to exist on Xcode 13 UI.
Speculation : Perhaps the library name has changed?

@RobertFlatt RobertFlatt changed the title libzbar recipe does not link on Xcode 13 libzbar recipe missing libiconv dependency Mar 8, 2022
@RobertFlatt
Copy link
Contributor Author

Further investigation indicates a missing libzbar recipe dependency on libiconv which presumably accounts for the message Undefined symbols for architecture x86_64: "_iconv"

The dependency can be seen in the p4a recipe:

https://github.com/kivy/python-for-android/blob/develop/pythonforandroid/recipes/libzbar/__init__.py#L15 

But not in the kivy-ios recipe:

https://github.com/kivy/kivy-ios/blob/master/kivy_ios/recipes/libzbar/__init__.py#L12

There is no kivy-ios libiconv recipe. So possibly the issue is a missing Xcode link flag?

@misl6
Copy link
Member

misl6 commented Mar 9, 2022

Did you try to add libiconv.tbd from "Frameworks, Libraries and Embedded Content" in Xcode?

PS: if this fixes the issue, please don't close the issue, cause kivy-ios should add by itself the library when creating/updating the Xcode project.

@RobertFlatt
Copy link
Contributor Author

Thank you, that linked.

@Neizvestnyj
Copy link
Contributor

Neizvestnyj commented Mar 25, 2022

Did you try to add libiconv.tbd from "Frameworks, Libraries and Embedded Content" in Xcode?

PS: if this fixes the issue, please don't close the issue, cause kivy-ios should add by itself the library when creating/updating the Xcode project.

A have the same issue on macOS 12.3. It does not work for me
Screenshot 2022-03-26 at 00 34 17

@RobertFlatt
Copy link
Contributor Author

I had to poke at xcode a few times to do what one press should have done :(

Also I saw this next #681

@Neizvestnyj
Copy link
Contributor

Is there any way to fix this bug now?

@RobertFlatt
Copy link
Contributor Author

The magic technique in Xcode is to search for libiconv.tbd , click on it to select it, then double click. It will then appear in the list. Do NOT click on add this does not work.

@Neizvestnyj
Copy link
Contributor

Neizvestnyj commented Apr 5, 2022

Ah, yes I fixed it: Build Phases > Link Binary With Libraries, then press plus, search ibiconv.tbd, double click on the element (a little reminder for those who come here).

But I get same error: https://stackoverflow.com/questions/71697480/error-in-libffi-when-building-project-in-xcode

Copy link

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have the means to take action. Please reach out if you have or find the answers we need so that we can investigate further.

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

3 participants