glew icon indicating copy to clipboard operation
glew copied to clipboard

dyld[23765]: Library not loaded: /opt/homebrew/opt/glew/lib

Open maheshj01 opened this issue 3 years ago • 6 comments
trafficstars

I am trying to import glew in my opengl project, The build succeeds but there is a run time error

dyld[1206]: Library not loaded: /opt/homebrew/opt/glew/lib/libGLEW.2.2.dylib
Referenced from: /Users/mahesh/Library/Developer/Xcode/DerivedData/shaders_tutorial-dmpbkihfzacdojeludtugemxgahg/Build/Products/Debug/shaders_tutorial
 Reason: tried: '/Users/mahesh/Library/Developer/Xcode/DerivedData/shaders_tutorial-dmpbkihfzacdojeludtugemxgahg/Build/Products/Debug/libGLEW.2.2.dylib' (no such file), 
'/usr/lib/system/introspection/libGLEW.2.2.dylib' (no such file), '/opt/homebrew/opt/glew/lib/libGLEW.2.2.dylib' (code signature in
 <5B17918D-3F6B-34E1-AB68-489FA9ECB892> '/opt/homebrew/Cellar/glew/2.2.0_1/lib/libGLEW.2.2.0.dylib' not valid for use in
 process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)),
 '/usr/local/lib/libGLEW.2.2.dylib' (no such file), '/usr/lib/libGLEW.2.2.dylib' (no such file),
 '/Users/mahesh/Library/Developer/Xcode/DerivedData/shaders_tutorial-dmpbkihfzacdojeludtugemxgahg/Build/Products/Debug/libGLEW.2.2.0.dylib' (no such file),
'/usr/lib/system/introspection/libGLEW.2.2.0.dylib' (no such file), '/opt/homebrew/Cellar/glew/2.2.0_1/lib/libGLEW.2.2.0.dylib' (code signature in <5B17918D-3F6B-34E1-AB68-489FA9ECB892> '/opt/homebrew/Cellar/glew/2.2.0_1/lib/libGLEW.2.2.0.dylib' not valid
 for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), 
'/usr/local/lib/libGLEW.2.2.0.dylib' (no such file), '/usr/lib/libGLEW.2.2.0.dylib' (no such file)
(lldb) 

I have linked the following binaries in Xcode

image

I have also included the GL libraries in my incliude folder which is added to headers search Path in xcode

image

I am using a m1 mac,

Let me know if you need any further info

maheshj01 avatar May 23 '22 04:05 maheshj01

Appears to be a Mac security feature? https://developer.apple.com/forums/thread/695481

-- Nigel

nigels-com avatar May 23 '22 05:05 nigels-com

thanks for your response @nigels-com. Is there a way to deal with this issue?

maheshj01 avatar May 23 '22 05:05 maheshj01

Might be worth updating your homebrew install. https://github.com/Homebrew/brew/issues/9082

nigels-com avatar May 23 '22 05:05 nigels-com

I have the same issue in Xcode configured Opencv 4.5.5_2.

eccentric13 avatar May 29 '22 10:05 eccentric13

Unfortunately, upgrading homebrew did not make a difference and the issue persists.

maheshj01 avatar Jun 01 '22 09:06 maheshj01

There is some troubleshooting information on the Homebrew discussions: https://github.com/Homebrew/discussions/discussions/3124

I'm not able to reproduce this, my Mac is not as recent.

nigels-com avatar Jun 04 '22 01:06 nigels-com