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 error when adding mediapipe via cocoapods to the framework project (iOS) #5403

Open
kers97 opened this issue May 14, 2024 · 7 comments
Assignees
Labels
platform:ios MediaPipe IOS issues stat:awaiting googler Waiting for Google Engineer's Response task::all All tasks of MediaPipe type:build/install For Build and Installation issues

Comments

@kers97
Copy link

kers97 commented May 14, 2024

OS Platform and Distribution

macOs Sonoma 14.4.1, iOS 17.2, M1 MacBook Pro

Compiler version

No response

Programming Language and version

swift 5.9

Installed using virtualenv? pip? Conda?(if python)

No response

MediaPipe version

0.10.14

Bazel version

No response

XCode and Tulsi versions (if iOS)

XCode 15.3

Android SDK and NDK versions (if android)

No response

Android AAR (if android)

None

OpenCV version (if running on desktop)

No response

Describe the problem

Adding mediapipe as a dependency to a framework project

Complete Logs

Steps:
- Fresh "Framework" type project created via Xcode 15.3
- pod init
- pod install
- build with anything, arm64 device or any simulator; result is same
- 72 issues (undefined symbols)

You can re-create this error with this easy steps.
Extra info: There is no error when adding to an "App" type project.

My pod file:
# Uncomment the next line to define a global platform for your project
platform :ios, '16.0'
target 'DigitalKYC' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!
  pod 'MediaPipeTasksVision', '0.10.14'
  # Pods for DigitalKYC
end

Error logs: (I couldn't add them all because it exceeded the number of characters.)

Showing All Issues
Undefined symbol: _MTLCreateSystemDefaultDevice

Undefined symbol: _OBJC_CLASS_$_EAGLContext

Undefined symbol: _OBJC_CLASS_$_MTLCompileOptions

Undefined symbol: _OBJC_CLASS_$_MTLComputePipelineDescriptor

Undefined symbol: _OBJC_CLASS_$_MTLRenderPassDescriptor

Undefined symbol: _OBJC_CLASS_$_MTLRenderPipelineDescriptor

Undefined symbol: _OBJC_CLASS_$_MTLTextureDescriptor

Undefined symbol: _OBJC_CLASS_$_UIImage

Undefined symbol: _glActiveTexture

Undefined symbol: _glAttachShader

Undefined symbol: _glBindAttribLocation

Undefined symbol: _glBindBuffer

Undefined symbol: _glBindFramebuffer

Undefined symbol: _glBindTexture

Undefined symbol: _glBindVertexArray

Undefined symbol: _glBufferData

Undefined symbol: _glClear

Undefined symbol: _glClearColor

Undefined symbol: _glClientWaitSync

Undefined symbol: _glCompileShader

Undefined symbol: _glCopyTexSubImage2D

Undefined symbol: _glCreateProgram

Undefined symbol: _glCreateShader

Undefined symbol: _glDeleteBuffers

Undefined symbol: _glDeleteFramebuffers

Undefined symbol: _glDeleteProgram

Undefined symbol: _glDeleteShader

Undefined symbol: _glDeleteSync

Undefined symbol: _glDeleteTextures

Undefined symbol: _glDeleteVertexArrays

Undefined symbol: _glDetachShader

Undefined symbol: _glDisable

Undefined symbol: _glDisableVertexAttribArray

Undefined symbol: _glDrawArrays

Undefined symbol: _glEnableVertexAttribArray

Undefined symbol: _glFenceSync

Undefined symbol: _glFinish

Undefined symbol: _glFlush

Undefined symbol: _glFramebufferTexture2D

Undefined symbol: _glGenBuffers

Undefined symbol: _glGenFramebuffers

Undefined symbol: _glGenTextures

Undefined symbol: _glGenVertexArrays

Undefined symbol: _glGetError

Undefined symbol: _glGetIntegerv

Undefined symbol: _glGetProgramiv

Undefined symbol: _glGetShaderInfoLog

Undefined symbol: _glGetShaderiv

Undefined symbol: _glGetString

Undefined symbol: _glGetStringi

Undefined symbol: _glGetUniformLocation

Undefined symbol: _glLinkProgram

Undefined symbol: _glPixelStorei

Undefined symbol: _glReadPixels

Undefined symbol: _glShaderSource

Undefined symbol: _glTexImage2D

Undefined symbol: _glTexParameterf

Undefined symbol: _glTexParameteri

Undefined symbol: _glTexStorage2D

Undefined symbol: _glTexSubImage2D

Undefined symbol: _glUniform1f

Undefined symbol: _glUniform1i

Undefined symbol: _glUniform2f

Undefined symbol: _glUniform3f

Undefined symbol: _glUniform4fv

Undefined symbol: _glUniformMatrix4fv

Undefined symbol: _glUseProgram

Undefined symbol: _glValidateProgram

Undefined symbol: _glVertexAttribPointer

Undefined symbol: _glViewport

Undefined symbol: _glWaitSync

Linker command failed with exit code 1 (use -v to see invocation)
@kers97 kers97 added the type:build/install For Build and Installation issues label May 14, 2024
@kuaashish
Copy link
Collaborator

Hi @kers97,

We need few more details, Could you please provide the complete details from the documentation that you are following to help us reproduce and understand the issue better?

Thank you!!

@kers97
Copy link
Author

kers97 commented May 16, 2024

Hi @kers97,

We need few more details, Could you please provide the complete details from the documentation that you are following to help us reproduce and understand the issue better?

Thank you!!

Hi @kuaashish , actually I wrote all the steps in the beginning but let me try to write it more clear.
1- Open Xcode, File -> New -> Project
2- In the opened tab Select "Framework" for the type of the project and create an empty framework project.
3- Pod init to the project and add 'MediaPipeTasksVision', '0.10.14' to the pod file and pod install. ( I also provide the pod file in the Complete Logs part above)
4- And just build for the any simulator or any iOS Device (arm64) and it fails.

You can re-create it in 2 minutes.

@schmidt-sebastian
Copy link
Collaborator

Can you try to manually add MediaPipeTasksCore as a dependency?

@kuaashish kuaashish self-assigned this May 16, 2024
@kuaashish kuaashish added platform:ios MediaPipe IOS issues task::all All tasks of MediaPipe stat:awaiting response Waiting for user response labels May 16, 2024
@kers97
Copy link
Author

kers97 commented May 16, 2024

Can you try to manually add MediaPipeTasksCore as a dependency?

hi @schmidt-sebastian There is no dependency named MediaPipeTasksCore in Cocoapods or in downloaded dependencies.
MediaPipeTasksVision has dependency named MediaPipeTasksCommon. Could you please explain more ?

@schmidt-sebastian
Copy link
Collaborator

Sorry - I indeed meant MediaPipeTasksCommon.

@kers97
Copy link
Author

kers97 commented May 17, 2024

Sorry - I indeed meant MediaPipeTasksCommon.

@schmidt-sebastian I tried it nothing change ..

@kuaashish kuaashish removed the stat:awaiting response Waiting for user response label May 20, 2024
@kuaashish kuaashish added the stat:awaiting googler Waiting for Google Engineer's Response label May 20, 2024
@kers97
Copy link
Author

kers97 commented May 27, 2024

Any fixes / recommendations for this issue ? , I couldn't find anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:ios MediaPipe IOS issues stat:awaiting googler Waiting for Google Engineer's Response task::all All tasks of MediaPipe type:build/install For Build and Installation issues
Projects
None yet
Development

No branches or pull requests

3 participants