{"action":"created","issue":{"url":"https://api.github.com/repos/jeffsp/matleap/issues/4","labels_url":"https://api.github.com/repos/jeffsp/matleap/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/jeffsp/matleap/issues/4/comments","events_url":"https://api.github.com/repos/jeffsp/matleap/issues/4/events","html_url":"https://github.com/jeffsp/matleap/issues/4","id":50463943,"number":4,"title":"Building .mex file fails for SDK 2.2.0 on Linux","user":{"login":"iliis","id":933300,"avatar_url":"https://avatars.githubusercontent.com/u/933300?v=3","gravatar_id":"","url":"https://api.github.com/users/iliis","html_url":"https://github.com/iliis","followers_url":"https://api.github.com/users/iliis/followers","following_url":"https://api.github.com/users/iliis/following{/other_user}","gists_url":"https://api.github.com/users/iliis/gists{/gist_id}","starred_url":"https://api.github.com/users/iliis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iliis/subscriptions","organizations_url":"https://api.github.com/users/iliis/orgs","repos_url":"https://api.github.com/users/iliis/repos","events_url":"https://api.github.com/users/iliis/events{/privacy}","received_events_url":"https://api.github.com/users/iliis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jeffsp/matleap/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2014-11-30T17:20:56Z","updated_at":"2015-11-04T09:38:31Z","closed_at":"2014-11-30T18:36:56Z","body":"I'm using the Leap SDK 2.2.0+23475 on Linux (Fedora 20, x86_64) with Matlab 2014b and get the following error when trying to compile the mex file:\r\n\r\n```\r\n>> build\r\nCompiling matleap.cpp\r\nEvaluating \"mex -I./LeapSDK/include -L./LeapSDK/lib/x64 -lLeap matleap.cpp\"\r\nBuilding with 'g++'.\r\nWarning: You are using gcc version '4.8.3-7)'. The version of gcc is not supported. The version currently supported with MEX\r\nis '4.7.x'. For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release. \r\n> In build at 37 \r\nWarning: You are using gcc version '4.8.3'. The version of gcc is not supported. The version currently supported with MEX is\r\n'4.7.x'. For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release. \r\n> In build at 37 \r\nError using mex\r\n[$HOME]/leapmotion/matleap/matleap.cpp: In function ‘void mexFunction(int, mxArray**,\r\nint, const mxArray**)’:\r\n[$HOME]/leapmotion/matleap/matleap.cpp:164:69: error: invalid conversion from ‘int’ to\r\n‘mxComplexity’ [-fpermissive]\r\n         plhs[0] = mxCreateNumericMatrix (1, 2, mxDOUBLE_CLASS, 0);\r\n                                                    n                 ^\r\nIn file included from [$HOME]/MATLAB/R2014b/extern/include/mex.h:57:0,\r\n                 from [$HOME]/leapmotion/matleap/matleap.h:14,\r\n                 from [$HOME]/leapmotion/matleap/matleap.cpp:7:\r\n[$HOME]/MATLAB/R2014b/extern/include/matrix.h:780:21: error:   initializing argument 4 of\r\n‘mxArray* mxCreateNumericMatrix_700(int, int, mxClassID, mxComplexity)’ [-fpermissive]\r\n LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateNumericMatrix_700(int m, int n, mxClassID classid, mxComplexity flag);\r\n                     ^\r\n\r\n\r\nError in build (line 37)\r\neval(cmd)\r\n```\r\n\r\nI don't think the gcc version causes this, other C/C++ code runs fine with Matlab.\r\n\r\nCheers,\r\nSam"},"comment":{"url":"https://api.github.com/repos/jeffsp/matleap/issues/comments/153660279","html_url":"https://github.com/jeffsp/matleap/issues/4#issuecomment-153660279","issue_url":"https://api.github.com/repos/jeffsp/matleap/issues/4","id":153660279,"user":{"login":"MartijnZ","id":5837106,"avatar_url":"https://avatars.githubusercontent.com/u/5837106?v=3","gravatar_id":"","url":"https://api.github.com/users/MartijnZ","html_url":"https://github.com/MartijnZ","followers_url":"https://api.github.com/users/MartijnZ/followers","following_url":"https://api.github.com/users/MartijnZ/following{/other_user}","gists_url":"https://api.github.com/users/MartijnZ/gists{/gist_id}","starred_url":"https://api.github.com/users/MartijnZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartijnZ/subscriptions","organizations_url":"https://api.github.com/users/MartijnZ/orgs","repos_url":"https://api.github.com/users/MartijnZ/repos","events_url":"https://api.github.com/users/MartijnZ/events{/privacy}","received_events_url":"https://api.github.com/users/MartijnZ/received_events","type":"User","site_admin":false},"created_at":"2015-11-04T09:38:31Z","updated_at":"2015-11-04T09:38:31Z","body":"Hi Jeff,\r\n\r\nThanks for your quick reply. I didn't play around yet with different versions of Matlab/SDK I will try that later today.  The combination I use is:\r\nUbuntu 14.10\r\nLeapSDK 2.3.1\r\nMatlab 2015b\r\n\r\nThe Matlab error report:\r\n```\r\nConfiguration:\r\n  Crash Decoding      : Disabled\r\n  Crash Mode          : continue (default)\r\n  Current Graphics Driver: Unknown hardware \r\n  Current Visual      : 0x20 (class 4, depth 24)\r\n  Default Encoding    : UTF-8\r\n  GNU C Library       : 2.19 stable\r\n  MATLAB Architecture : glnxa64\r\n  MATLAB Root         : /usr/local/MATLAB/R2015b\r\n  MATLAB Version      : 8.6.0.267246 (R2015b)\r\n  OpenGL              : hardware\r\n  Operating System    : Linux 3.19.0-30-generic #34~14.04.1-Ubuntu SMP Fri Oct 2 22:09:39 UTC 2015 x86_64\r\n  Processor ID        : x86 Family 6 Model 69 Stepping 1, GenuineIntel\r\n  Virtual Machine     : Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode\r\n  Window System       : The X.Org Foundation (11701000), display :0\r\n\r\nFault Count: 1\r\n\r\n\r\nAbnormal termination:\r\nSegmentation violation\r\n\r\nRegister State (from fault):\r\n  RAX = 00007f3663d6de50  RBX = 00007f3663d6de50\r\n  RCX = 000000000000269a  RDX = 000008fcff972d6e\r\n  RSP = 00007f3647ffc490  RBP = 00007f3647ffc520\r\n  RSI = 00007f3647ffc490  RDI = 0000000000000001\r\n\r\n   R8 = 00007f3663d87110   R9 = 00007f3663d6ccd0\r\n  R10 = 00007f3647ffc250  R11 = 00007f366308c910\r\n  R12 = 00007f3647ffc500  R13 = 00007f3642a29a08\r\n  R14 = 00007f3647ffc510  R15 = 00007f3647fff700\r\n\r\n  RIP = 00007f365d580908  EFL = 0000000000010202\r\n\r\n   CS = 0033   FS = 0000   GS = 0000\r\n\r\nStack Trace (from fault):\r\n[  0] 0x00007f365d580908 /usr/local/MATLAB/R2015b/bin/glnxa64/libboost_chrono.so.1.49.0+00014600 _ZN5boost6chrono12steady_clock3nowEv+00000040\r\n[  1] 0x00007f35934a3349                                /usr/lib/libLeap.so+00848713\r\n[  2] 0x00007f3593491fb5                                /usr/lib/libLeap.so+00778165\r\n[  3] 0x00007f359343e4eb                                /usr/lib/libLeap.so+00435435\r\n[  4] 0x00007f3593437117                                /usr/lib/libLeap.so+00405783\r\n[  5] 0x00007f359341c33b                                /usr/lib/libLeap.so+00295739\r\n[  6] 0x00007f3593417708                                /usr/lib/libLeap.so+00276232\r\n[  7] 0x00007f3593417d3e                                /usr/lib/libLeap.so+00277822 _ZN4Leap10ControllerC1Ev+00000030\r\n[  8] 0x00007f3598de416e               /home/martijn/matleap/matleap.mexa64+00008558 mexFunction+00000078\r\n[  9] 0x00007f3655b53c4a     /usr/local/MATLAB/R2015b/bin/glnxa64/libmex.so+00142410 mexRunMexFile+00000090\r\n[ 10] 0x00007f3655b50244     /usr/local/MATLAB/R2015b/bin/glnxa64/libmex.so+00127556\r\n[ 11] 0x00007f3655b50de4     /usr/local/MATLAB/R2015b/bin/glnxa64/libmex.so+00130532\r\n[ 12] 0x00007f365a0f2dbd /usr/local/MATLAB/R2015b/bin/glnxa64/libmwm_dispatcher.so+00724413 _ZN8Mfh_file16dispatch_fh_implEMS_FviPP11mxArray_tagiS2_EiS2_iS2_+00001549\r\n[ 13] 0x00007f365a0f3250 /usr/local/MATLAB/R2015b/bin/glnxa64/libmwm_dispatcher.so+00725584 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00000032\r\n[ 14] 0x00007f365476d8af /usr/local/MATLAB/R2015b/bin/glnxa64/libmwm_lxe.so+08612015\r\n[ 15] 0x00007f36548917ff /usr/local/MATLAB/R2015b/bin/glnxa64/libmwm_lxe.so+09807871\r\n[ 16] 0x00007f3654887254 /usr/local/MATLAB/R2015b/bin/glnxa64/libmwm_lxe.so+09765460\r\n[ 17] 0x00007f3654854901 /usr/local/MATLAB/R2015b/bin/glnxa64/libmwm_lxe.so+09558273\r\n[ 18] 0x00007f36544b6d6c /usr/local/MATLAB/R2015b/bin/glnxa64/libmwm_lxe.so+05766508\r\n[ 19] 0x00007f36544a14c1 /usr/local/MATLAB/R2015b/bin/glnxa64/libmwm_lxe.so+05678273\r\n[ 20] 0x00007f36544b0075 /usr/local/MATLAB/R2015b/bin/glnxa64/libmwm_lxe.so+05738613\r\n[ 21] 0x00007f3654681033 /usr/local/MATLAB/R2015b/bin/glnxa64/libmwm_lxe.so+07643187\r\n[ 22] 0x00007f3654648c40 /usr/local/MATLAB/R2015b/bin/glnxa64/libmwm_lxe.so+07412800\r\n[ 23] 0x00007f365464b078 /usr/local/MATLAB/R2015b/bin/glnxa64/libmwm_lxe.so+07422072\r\n[ 24] 0x00007f365464b140 /usr/local/MATLAB/R2015b/bin/glnxa64/libmwm_lxe.so+07422272\r\n[ 25] 0x00007f36546c26bc /usr/local/MATLAB/R2015b/bin/glnxa64/libmwm_lxe.so+07911100\r\n[ 26] 0x00007f36546c2b42 /usr/local/MATLAB/R2015b/bin/glnxa64/libmwm_lxe.so+07912258\r\n[ 27] 0x00007f3655d872bc /usr/local/MATLAB/R2015b/bin/glnxa64/libmwbridge.so+00168636\r\n[ 28] 0x00007f3655d87ef7 /usr/local/MATLAB/R2015b/bin/glnxa64/libmwbridge.so+00171767 _Z8mnParserv+00000823\r\n[ 29] 0x00007f365a3d9b4f   /usr/local/MATLAB/R2015b/bin/glnxa64/libmwmcr.so+00686927 _ZN11mcrInstance30mnParser_on_interpreter_threadEv+00000031\r\n[ 30] 0x00007f365a3c6443   /usr/local/MATLAB/R2015b/bin/glnxa64/libmwmcr.so+00607299\r\n[ 31] 0x00007f365a3c6a39   /usr/local/MATLAB/R2015b/bin/glnxa64/libmwmcr.so+00608825 _ZN5boost6detail11task_objectIvNS_3_bi6bind_tIvPFvRKNS_8functionIFvvEEEENS2_5list1INS2_5valueIS6_EEEEEEE6do_runEv+00000025\r\n[ 32] 0x00007f365a3c7f47   /usr/local/MATLAB/R2015b/bin/glnxa64/libmwmcr.so+00614215 _ZN5boost6detail9task_baseIvE3runEv+00000071\r\n[ 33] 0x00007f365a3c7fa7   /usr/local/MATLAB/R2015b/bin/glnxa64/libmwmcr.so+00614311\r\n[ 34] 0x00007f365a3c32fa   /usr/local/MATLAB/R2015b/bin/glnxa64/libmwmcr.so+00594682\r\n[ 35] 0x00007f364dd896b6   /usr/local/MATLAB/R2015b/bin/glnxa64/libmwuix.so+00313014\r\n[ 36] 0x00007f364dd6f862   /usr/local/MATLAB/R2015b/bin/glnxa64/libmwuix.so+00206946\r\n[ 37] 0x00007f365ad590df /usr/local/MATLAB/R2015b/bin/glnxa64/libmwservices.so+03002591\r\n[ 38] 0x00007f365ad5924c /usr/local/MATLAB/R2015b/bin/glnxa64/libmwservices.so+03002956\r\n[ 39] 0x00007f365ad5ad9f /usr/local/MATLAB/R2015b/bin/glnxa64/libmwservices.so+03009951\r\n[ 40] 0x00007f365ad5b84c /usr/local/MATLAB/R2015b/bin/glnxa64/libmwservices.so+03012684 _Z25svWS_ProcessPendingEventsiib+00000092\r\n[ 41] 0x00007f365a3c39b8   /usr/local/MATLAB/R2015b/bin/glnxa64/libmwmcr.so+00596408\r\n[ 42] 0x00007f365a3c3cd4   /usr/local/MATLAB/R2015b/bin/glnxa64/libmwmcr.so+00597204\r\n[ 43] 0x00007f365a3affed   /usr/local/MATLAB/R2015b/bin/glnxa64/libmwmcr.so+00516077\r\n[ 44] 0x00007f3663351182              /lib/x86_64-linux-gnu/libpthread.so.0+00033154\r\n[ 45] 0x00007f366307e47d                    /lib/x86_64-linux-gnu/libc.so.6+01025149 clone+00000109\r\n[ 46] 0x0000000000000000                                   <unknown-module>+00000000\r\n\r\n\r\nThis error was detected while a MEX-file was running. If the MEX-file\r\nis not an official MathWorks function, please examine its source code\r\nfor errors. Please consult the External Interfaces Guide for information\r\non debugging MEX-files.\r\n\r\nIf this problem is reproducible, please submit a Service Request via:\r\n    http://www.mathworks.com/support/contact_us/\r\n\r\nA technical support engineer might contact you with further information.\r\n\r\nThank you for your help.** This crash report has been saved to disk as /home/martijn/matlab_crash_dump.10023-1 **\r\n```"}}