justingardner / mgl

A suite of mex/m files for displaying psychophysics stimuli
http://justingardner.net/mgl
Other
18 stars 22 forks source link

some issues during compiling on 10.6.8 #19

Closed rtraghavan closed 2 years ago

rtraghavan commented 7 years ago

I'm having some issues recompiling MGL on 10.6.8 with Matlab 2012b

  1. The first is with mglPrivateSetSound, I get the following error message mex -f ./mexopts.10.6.sh mglPrivateSetSound.c mglPrivateSetSound.c: In function 'setSound': mglPrivateSetSound.c:91: warning: 'cString' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:367) mglPrivateSetSound.c: In function 'deviceIDs': mglPrivateSetSound.c:123: warning: 'AudioHardwareGetPropertyInfo' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:1098) mglPrivateSetSound.c:125: warning: 'AudioHardwareGetProperty' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:1119) mglPrivateSetSound.c:140: warning: 'AudioDeviceGetPropertyInfo' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2338) mglPrivateSetSound.c:142: warning: 'AudioDeviceGetProperty' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2367) mglPrivateSetSound.c:164: warning: 'AudioDeviceGetProperty' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2367) mglPrivateSetSound.c:165: warning: 'cString' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:367) mglPrivateSetSound.c:167: warning: 'AudioDeviceGetProperty' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2367) mglPrivateSetSound.c:168: warning: 'cString' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:367) mglPrivateSetSound.c:175: warning: 'AudioDeviceGetProperty' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2367) Undefined symbols: "_AudioDeviceGetPropertyInfo", referenced from: _deviceIDs in mglPrivateSetSound.o "_AudioDeviceGetProperty", referenced from: _deviceIDs in mglPrivateSetSound.o _deviceIDs in mglPrivateSetSound.o _deviceIDs in mglPrivateSetSound.o _deviceIDs in mglPrivateSetSound.o "_AudioHardwareGetPropertyInfo", referenced from: _deviceIDs in mglPrivateSetSound.o "_AudioHardwareGetProperty", referenced from: _deviceIDs in mglPrivateSetSound.o ld: symbol(s) not found collect2: ld returned 1 exit status mex: link of ' "mglPrivateSetSound.mexmaci64"' failed. Error compiling mglPrivateSetSound.c Error using mex (line 206) Unable to complete successfully. MATLAB:MEX:genericFailure

  2. The second is with mglPrivateDigIO here I get Invalid MEX-file '/users2/computer/user_name/mgl2.0/utils/readDigPort/mglPrivateDigIO.mexmaci64': dlopen(/users2/computer/user_name/mgl2.0/utils/readDigPort/mglPrivateDigIO.mexmaci64, 1): Library not loaded: /usr/lib/libc++.1.dylib Referenced from: /users2/computer/user_name/mgl2.0/utils/readDigPort/mglPrivateDigIO.mexmaci64 Reason: image not found

Is there a simple fix you can think of that would not require a different OS? I can upgrade Matlab, but upgrading XCode and Mac OS X 10.6.8 may be difficult. Or perhaps I'm missing something rather trivial. In any case, I appreciate any help.

justingardner commented 7 years ago

The first one seems to be because CoreAudio is not getting linked in - you'll need to fiddle with the mexopts file to make sure that it is specified - you can ignore the deprecated warnings.

The second one I'm not as sure - could be because you don't have the c++ dynamic link libraries on your machine - possibly because of the OS being 32 bit? Might surf the internet on that one to save if there is some Xcode install that will get you those libraries...

Justin

Sent from my iPad

On Jun 25, 2017, at 7:24 AM, rtraghavan notifications@github.com wrote:

I'm having some issues recompiling MGL on 10.6.8 with Matlab 2012b

The first is with mglPrivateSetSound, I get the following error message mex -f ./mexopts.10.6.sh mglPrivateSetSound.c mglPrivateSetSound.c: In function 'setSound': mglPrivateSetSound.c:91: warning: 'cString' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:367) mglPrivateSetSound.c: In function 'deviceIDs': mglPrivateSetSound.c:123: warning: 'AudioHardwareGetPropertyInfo' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:1098) mglPrivateSetSound.c:125: warning: 'AudioHardwareGetProperty' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:1119) mglPrivateSetSound.c:140: warning: 'AudioDeviceGetPropertyInfo' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2338) mglPrivateSetSound.c:142: warning: 'AudioDeviceGetProperty' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2367) mglPrivateSetSound.c:164: warning: 'AudioDeviceGetProperty' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2367) mglPrivateSetSound.c:165: warning: 'cString' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:367) mglPrivateSetSound.c:167: warning: 'AudioDeviceGetProperty' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2367) mglPrivateSetSound.c:168: warning: 'cString' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:367) mglPrivateSetSound.c:175: warning: 'AudioDeviceGetProperty' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2367) Undefined symbols: "_AudioDeviceGetPropertyInfo", referenced from: _deviceIDs in mglPrivateSetSound.o "_AudioDeviceGetProperty", referenced from: _deviceIDs in mglPrivateSetSound.o _deviceIDs in mglPrivateSetSound.o _deviceIDs in mglPrivateSetSound.o _deviceIDs in mglPrivateSetSound.o "_AudioHardwareGetPropertyInfo", referenced from: _deviceIDs in mglPrivateSetSound.o "_AudioHardwareGetProperty", referenced from: _deviceIDs in mglPrivateSetSound.o ld: symbol(s) not found collect2: ld returned 1 exit status mex: link of ' "mglPrivateSetSound.mexmaci64"' failed. Error compiling mglPrivateSetSound.c Error using mex (line 206) Unable to complete successfully. MATLAB:MEX:genericFailure

The second is with mglPrivateDigIO here I get Invalid MEX-file '/users2/computer/user_name/mgl2.0/utils/readDigPort/mglPrivateDigIO.mexmaci64': dlopen(/users2/computer/user_name/mgl2.0/utils/readDigPort/mglPrivateDigIO.mexmaci64, 1): Library not loaded: /usr/lib/libc++.1.dylib Referenced from: /users2/computer/user_name/mgl2.0/utils/readDigPort/mglPrivateDigIO.mexmaci64 Reason: image not found

Is there a simple fix you can think of that would not require a different OS? I can upgrade Matlab, but upgrading XCode and Mac OS X 10.6.8 may be difficult. Or perhaps I'm missing something rather trivial. In any case, I appreciate any help.

― You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

justingardner commented 2 years ago

Closing out - we are working on a new version of metal (based on metal) with new compilation scripts mglMakeMetal this will be the new default version of mgl for newer systems / matlab versions / OS versions