Back to the main page.
Bug 3131 - ft_getopt.mexw64 missing
Status | CLOSED WORKSFORME |
Reported | 2016-05-27 09:44:00 +0200 |
Modified | 2019-08-10 12:32:49 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P5 normal |
Assigned to: | |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Stephen Whitmarsh - 2016-05-27 09:44:13 +0200
Hi there, I just updated my FT version (deleted older SVN, downloaded latest GitHub), and now I miss the following required MEX-file: "Invalid MEX-file 'D:\fieldtrip\utilities\ft_getopt.mexw64': The specified procedure could not be found." Nowhere else is this file to be found either. I am working on MATLAB 2015b, Windows 7, 64bit. Whelp! Stephen
Stephen Whitmarsh - 2016-05-27 09:54:22 +0200
Using MATLAB 2014b there is no problem!
Jan-Mathijs Schoffelen - 2016-05-29 18:17:06 +0200
Sounds like a platform-specific MATLAB version problem to me then. Did you try to recompile the mex files ? This can be done with ft_compile_mex. Also, if you remove the .mexw64 version of the file, the default (slow) matlab m-file will be used, circumventing the problem altogether
Robert Oostenveld - 2016-05-31 12:48:02 +0200
"The specified procedure could not be found" suggests that a shared library (*.dll) cannot be found. Please download the free http://www.dependencywalker.com and open ft_getopt.mexw64 in that small utility. It will show which dependencies it has and which ones are missing. It is normal that the MATLAB ones are missing (as those are provided at the moment that matlab is running).
Stephen Whitmarsh - 2016-06-08 09:41:03 +0200
Created attachment 796 dependencycrawler output
Stephen Whitmarsh - 2016-06-08 09:42:27 +0200
Indeed, dependencycrawler finds many issues, mostly missing Windows libraries though. See attachment (there are more than fit the screen) I will try to compile (need to install win64 compiler first). Thanks, Stephen
Robert Oostenveld - 2016-06-08 09:59:20 +0200
(In reply to Stephen Whitmarsh from comment #5) Conceptually a dll depends on dlls, which depend on dlls, ... KERNEL32 is present, and is not from Mathworks, nor from the compiler that I used for the mex file. The KERNEL32 depends on KERNELBASE, which depends other files that cannot be found. That (to me) suggests more a problem with your overall installation than a specific matlab/mexfile problem. I suspect that the EXT-MS-WIN-whatever dlls are not missing on disk, but that the path is not set correctly to allow them to be found. But it might also be that those dlls will be automatically added at execution time. Is there anything directly underneath FT_GETOPT (besides LIBMX and LIBMEX) that is missing? I cannot see the lower part of the tree.
Stephen Whitmarsh - 2016-06-08 10:33:46 +0200
Created attachment 797 lower part output 1
Stephen Whitmarsh - 2016-06-08 10:34:19 +0200
Forcing recompiling of mex files did again break at ft_getopt. See below. I also attached two more screenshots of the lower part of the output of the dependencycrawler. ... ... ... Compiling MEX file realtime/src/acquisition/siemens/src/sap2matlab ... Building with 'MinGW64 Compiler (C)'. MEX completed successfully. Compiling MEX file src/ft_getopt ... Building with 'MinGW64 Compiler (C)'. Error using mex C:\Users\Admin\AppData\Local\Temp\mex_2164854635375877_13784\ft_getopt.obj:ft_getopt.c:(.text+0x77): undefined reference to `mxErrMsgTxt' collect2.exe: error: ld returned 1 exit status Error in ft_compile_mex>compile_mex_list (line 219) eval(cmd); Error in ft_compile_mex (line 116) compile_mex_list(L, baseDir, force); -------------------
Stephen Whitmarsh - 2016-06-08 10:34:35 +0200
Created attachment 798 lower part output 2
Robert Oostenveld - 2016-06-08 11:20:01 +0200
(In reply to Stephen Whitmarsh from comment #8) > undefined reference to `mxErrMsgTxt' this suggests that you are using an old fieldtrip copy. It should be mexErrMsgTxt (as of a certain matlab version) and that has been changed in the code quite some time ago. Can you check the ft_getopt.c file to see whether it is mxErrMsgTxt or mexErrMsgTxt? On which matlab version are you now trying to compile? Is that specific version compatible with MinGW64?
Robert Oostenveld - 2016-06-08 11:22:46 +0200
(In reply to Robert Oostenveld from comment #10) > On which matlab version are you now trying to compile? Is that specific version > compatible with MinGW64? http://nl.mathworks.com/support/compilers/R2016a/index.html suggests that it should be fine, since mingw64 is also supported with the latest release.
Stephen Whitmarsh - 2016-07-21 09:20:31 +0200
After refreshing Fieldtrip, the problem disappeared.