User avatar
stonstad
Topic Author
Posts: 136
Joined: 06 Jun 2016, 18:14
Location: Lesser Magellanic Cloud
Contact:

Unity + iOS Build Error in Xcode (Undef symbols for architecture arm64)

20 Oct 2020, 21:36

Hello!

When I create a build for iOS using Unity 2020.1.9f, I am seeing the following build error in Xcode:
Undefined symbols for architecture arm64:
"_glGenBuffers", referenced from:
l998 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glBufferData", referenced from:
l998 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glUniformMatrix4fv", referenced from:
l991 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glUniform4f", referenced from:
l991 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glVertexAttribPointer", referenced from:
l987 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glBufferSubData", referenced from:
l982 in libNoesis.a(libNoesis.a-arm64-master.o)
l985 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glResolveMultisampleFramebufferAPPLE", referenced from:
l977 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glDisableVertexAttribArray", referenced from:
l1003 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glDeleteRenderbuffers", referenced from:
l994 in libNoesis.a(libNoesis.a-arm64-master.o)
l1048 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glClearStencil", referenced from:
l968 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glClear", referenced from:
l968 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glBindBuffer", referenced from:
l979 in libNoesis.a(libNoesis.a-arm64-master.o)
l980 in libNoesis.a(libNoesis.a-arm64-master.o)
l982 in libNoesis.a(libNoesis.a-arm64-master.o)
l984 in libNoesis.a(libNoesis.a-arm64-master.o)
l985 in libNoesis.a(libNoesis.a-arm64-master.o)
l998 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glColorMask", referenced from:
l968 in libNoesis.a(libNoesis.a-arm64-master.o)
l989 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glViewport", referenced from:
l965 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glFramebufferRenderbuffer", referenced from:
l955 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glGenFramebuffers", referenced from:
l955 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glTexImage2D", referenced from:
l951 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glPixelStorei", referenced from:
l957 in libNoesis.a(libNoesis.a-arm64-master.o)
l959 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glGenRenderbuffers", referenced from:
l948 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glBindRenderbuffer", referenced from:
l948 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glClearColor", referenced from:
l968 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glRenderbufferStorage", referenced from:
l948 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glDeleteProgram", referenced from:
l939 in libNoesis.a(libNoesis.a-arm64-master.o)
l33912 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glUniform1fv", referenced from:
l991 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glCreateShader", referenced from:
l935 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glShaderSource", referenced from:
l935 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glCompileShader", referenced from:
l935 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glDeleteFramebuffers", referenced from:
l994 in libNoesis.a(libNoesis.a-arm64-master.o)
l1048 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glGetProgramiv", referenced from:
l935 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glUniform1i", referenced from:
l935 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glIsVertexArrayOES", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glGetUniformLocation", referenced from:
l935 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glUseProgram", referenced from:
l935 in libNoesis.a(libNoesis.a-arm64-master.o)
l979 in libNoesis.a(libNoesis.a-arm64-master.o)
l991 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glSamplerParameteri", referenced from:
l934 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glGetString", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glUnmapBuffer", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glGenSamplers", referenced from:
l934 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glBindFramebuffer", referenced from:
l955 in libNoesis.a(libNoesis.a-arm64-master.o)
l965 in libNoesis.a(libNoesis.a-arm64-master.o)
l977 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glBindTexture", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
l951 in libNoesis.a(libNoesis.a-arm64-master.o)
l957 in libNoesis.a(libNoesis.a-arm64-master.o)
l959 in libNoesis.a(libNoesis.a-arm64-master.o)
l979 in libNoesis.a(libNoesis.a-arm64-master.o)
l1030 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glGetIntegerv", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
l936 in libNoesis.a(libNoesis.a-arm64-master.o)
l949 in libNoesis.a(libNoesis.a-arm64-master.o)
l955 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glMapBufferRangeEXT", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glCreateProgram", referenced from:
l1012 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glFramebufferTexture2D", referenced from:
l955 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glTexStorage2D", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glGenVertexArrays", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glIsVertexArray", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glDrawElements", referenced from:
l986 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glBindSampler", referenced from:
l979 in libNoesis.a(libNoesis.a-arm64-master.o)
l1028 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glDeleteBuffers", referenced from:
l939 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glBindVertexArray", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glUniform4fv", referenced from:
l991 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glDeleteTextures", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
l1043 in libNoesis.a(libNoesis.a-arm64-master.o)
l1044 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glStencilFunc", referenced from:
l989 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glRenderbufferStorageMultisampleAPPLE", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glGetProgramInfoLog", referenced from:
l33912 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glStencilMask", referenced from:
l930 in libNoesis.a(libNoesis.a-arm64-master.o)
l963 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glPopGroupMarkerEXT", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glLinkProgram", referenced from:
l1012 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glDeleteShader", referenced from:
l935 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glDiscardFramebufferEXT", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glGetStringi", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glEnableVertexAttribArray", referenced from:
l1003 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glActiveTexture", referenced from:
l951 in libNoesis.a(libNoesis.a-arm64-master.o)
l957 in libNoesis.a(libNoesis.a-arm64-master.o)
l959 in libNoesis.a(libNoesis.a-arm64-master.o)
l979 in libNoesis.a(libNoesis.a-arm64-master.o)
l1030 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glBindVertexArrayOES", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glStencilOp", referenced from:
l989 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glInvalidateFramebuffer", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glAttachShader", referenced from:
l1012 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glDetachShader", referenced from:
l1012 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glTexStorage2DEXT", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glDeleteVertexArrays", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glDeleteVertexArraysOES", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glMapBufferRange", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glDisable", referenced from:
l930 in libNoesis.a(libNoesis.a-arm64-master.o)
l963 in libNoesis.a(libNoesis.a-arm64-master.o)
l989 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glGetError", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glDepthMask", referenced from:
l930 in libNoesis.a(libNoesis.a-arm64-master.o)
l963 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glEnable", referenced from:
l968 in libNoesis.a(libNoesis.a-arm64-master.o)
l977 in libNoesis.a(libNoesis.a-arm64-master.o)
l989 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glTexParameteri", referenced from:
l951 in libNoesis.a(libNoesis.a-arm64-master.o)
l1028 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glPushGroupMarkerEXT", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glGenVertexArraysOES", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glGenTextures", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
l951 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glUniform1f", referenced from:
l991 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glBlendFunc", referenced from:
l930 in libNoesis.a(libNoesis.a-arm64-master.o)
l963 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glTexSubImage2D", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
l957 in libNoesis.a(libNoesis.a-arm64-master.o)
l959 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glScissor", referenced from:
l968 in libNoesis.a(libNoesis.a-arm64-master.o)
l977 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glBlitFramebuffer", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glUnmapBufferOES", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glRenderbufferStorageMultisample", referenced from:
l932 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glBindAttribLocation", referenced from:
l1012 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glDeleteSamplers", referenced from:
l939 in libNoesis.a(libNoesis.a-arm64-master.o)
"_glBlendEquation", referenced from:
l930 in libNoesis.a(libNoesis.a-arm64-master.o)
l963 in libNoesis.a(libNoesis.a-arm64-master.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I disabled Bit Code in project settings. But other than this change (and adding certificates) I haven't changed anything. Should I be able to build?

Thanks,
Shaun
 
User avatar
jsantos
Site Admin
Posts: 2959
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity + iOS Build Error in Xcode (Undef symbols for architecture arm64)

21 Oct 2020, 19:27

Probably caused by the fact that Unity 2020 is no longer automatically including GL ES in "Auto Graphics" mode and not linking against GL libraries that Noesis library requires (even if GL is not used at all).

I will have a look at it soon, for now the workaround is manually enabling GL ES and Metal for iOS builds.
 
User avatar
stonstad
Topic Author
Posts: 136
Joined: 06 Jun 2016, 18:14
Location: Lesser Magellanic Cloud
Contact:

Re: Unity + iOS Build Error in Xcode (Undef symbols for architecture arm64)

22 Oct 2020, 15:45

OK -- I went to Unity -> Player Settings -> iOS Tab -> Other Settings. I added OpenGLES3 (Deprecated) to the list which already contains Metal. I then ordered OpenGLES3 first.

When I change this setting I receive the error, "Linear colorspace requires metal API only. Uncheck 'Automatic Graphics API' and remove OpenGL ES 2/3 APIs."

Our application requires linear color space, as these are the calibrated colors we use in desktop and WebGL builds. Assuming I made this change correctly, what is the next step?

Thanks,
Shaun
 
User avatar
jsantos
Site Admin
Posts: 2959
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity + iOS Build Error in Xcode (Undef symbols for architecture arm64)

22 Oct 2020, 18:14

When I change this setting I receive the error, "Linear colorspace requires metal API only. Uncheck 'Automatic Graphics API' and remove OpenGL ES 2/3 APIs."
I don't understand why Unity is requiring that, anyway, we will fix it. For now, the workaround is using Metal API only and manually adding the reference to OpenGL ES in the XCode project.
 
User avatar
stonstad
Topic Author
Posts: 136
Joined: 06 Jun 2016, 18:14
Location: Lesser Magellanic Cloud
Contact:

Re: Unity + iOS Build Error in Xcode (Undef symbols for architecture arm64)

23 Oct 2020, 15:25

I don't understand why Unity is requiring that, anyway, we will fix it. For now, the workaround is using Metal API only and manually adding the reference to OpenGL ES in the XCode project.
Thank you! I'll give this a try!
 
User avatar
jsantos
Site Admin
Posts: 2959
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity + iOS Build Error in Xcode (Undef symbols for architecture arm64)

25 Oct 2020, 17:46

I tried the workaround and it works (just go to the OpenGLES.framework and enable it in your target, same as Metal.framework).

Anyway, we fixed it for 3.0.7 (#1818).

Thanks for your feedback!

Who is online

Users browsing this forum: cancred and 9 guests