New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vl_compilenn Errors Associated with imread_gdiplus/imread_helpers #303
Comments
I'm having the same problem and I'm stuck. Google didn't help and I tried four different versions of MinGW: The standard one (4.9.2), which comes as the MatLab add on, and the same, the latest (5.2.0) and an older version by using the mexopts.bat. Always the same error. I also tried using the Visual Studio 2013 compiler, but it seems mex needs MinGW. I'm running Matlab 2015b on Windows 10 64-Bit. I really need this library, so any help would be greatly appreciated!
|
Hi, I never copied using MinGW so I am not sure how well that would work. However, this is clearly a blunder on my part (goto statements cannot cross variable initializations) that is tolerated by Visual C++. (we sparingly use goto to exit a function when errors are encountered). You could try adding the “-fpermissive” option to the compile flag and see if that works. I would be interested to know if MinGW works. Having said that, MEX definitely works with Visual Studio (you might have problems with some free of charge 32 bit version of the latter however).
|
I'm having the same problem. Error in vl_compilenn>mex_compile (line 438) Error in vl_compilenn (line 400) |
I have exactly the same problem. I don't know how to add "-fpermissive" flag. Just in case, I'm trying to install on windows. Any idea? Thanks in advance. |
Hi, the easiest would be really to compile it with the Visual Studio (for example any of the community editions which are for free), which should work... |
Consider using Microsoft Windows SDK compiler (Free). It works for me. |
You're right. Thank you! I have already solved this problem :D |
Hi! I'm new to this kind of installation. What does it mean to use Microsoft Windows SDK compiler (or Visual Studio)? What are the steps involved in using those softwares? |
Windows SDK includes C/C++ compiler that is compatible with Matlab MEX. You have to download it from https://www.microsoft.com/en-us/download/details.aspx?id=8279 and install it on your computer. After the installation Matlab should recognize the compiler and you can run matlab command However, it seems to me the Windows SDK C/C++ cannot compile the GPU enabled compilation which is fine in my case. |
Thanks! I figured it out. |
Hi! I met a problem that when compiling vl_complienn, ''Microsoft Complier Driver C/C++ stopped working''. Is there anyone met the same problem with me and anyone has any idea about how to solve it? |
Hi, thanks for the feedback. We had to modify heavily the build script to implement a work-around for a bug in MATLAB 2016a, but it is not unlikely that this broke something else. Could you please report your output?
|
Hi Vedaldi, I'm having the same problem when following the steps in the quick start guide. I'm using Windows 10 64 bit and MATLAB R2016a (9.0.0.341360) 64-bit Fed/11/2016. I'm getting the following error when I build with MinGW64 Building with 'MinGW64 Compiler (C++)'.
C:\MATLAB\SupportPackages\R2016a\MW_MinGW_4_9\bin\g++ -c -DNDEBUG -DENABLE_DOUBLE -D__SSSE3__ -m64 -DMATLAB_MEX_FILE -I"C:\Program Files\MATLAB\R2016a/extern/include" -I"C:\Program Files\MATLAB\R2016a/simulink/include" -fexceptions -fno-omit-frame-pointer -O -DNDEBUG C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\src\bits\impl\imread_gdiplus.cpp -o C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\impl\imread_gdiplus.obj
Error using mex
In file included from C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\src\bits\impl\imread_helpers.hpp:18:0,
from C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\src\bits\impl\imread_gdiplus.cpp:14:
C:/MATLAB/SupportPackages/R2016a/MW_MinGW_4_9/lib/gcc/x86_64-w64-mingw32/4.9.2/include/tmmintrin.h: In function '__m128i
_mm_hadd_epi16(__m128i, __m128i)':
C:/MATLAB/SupportPackages/R2016a/MW_MinGW_4_9/lib/gcc/x86_64-w64-mingw32/4.9.2/include/tmmintrin.h:42:70: error:
'__builtin_ia32_phaddw128' was not declared in this scope
return (__m128i) __builtin_ia32_phaddw128 ((__v8hi)__X, (__v8hi)__Y); ^
.
.
.
Error in vl_compilenn>mex_compile (line 510)
mex(mopts{:}) ;
Error in vl_compilenn (line 471)
mex_compile(opts, srcs{i}, objfile, flags.mexcc) ;
Error in run (line 96)
evalin('caller', [script ';']); And the following error when I build with Microsoft Visual C++ 2015 Professional Building with 'MinGW64 Compiler (C)'.
C:\MATLAB\SupportPackages\R2016a\MW_MinGW_4_9\bin\gcc -m64 -Wl,--no-undefined -shared -s -Wl,"C:\Program Files\MATLAB\R2016a/extern/lib/win64/mingw64/mexFunction.def" C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\vl_nnconv.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\data.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\datamex.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\nnconv.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\nnfullyconnected.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\nnsubsample.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\nnpooling.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\nnnormalize.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\nnbnorm.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\nnbias.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\nnbilinearsampler.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\impl\im2row_cpu.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\impl\subsample_cpu.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\impl\copy_cpu.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\impl\pooling_cpu.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\impl\normalize_cpu.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\impl\bnorm_cpu.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\impl\tinythread.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\impl\bilinearsampler_cpu.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\imread.obj C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\.build\bits\impl\imread_gdiplus.obj -llibmwblas -L"C:\Program Files\MATLAB\R2016a\extern\lib\win64\mingw64" -llibmx -llibmex -llibmat -lm -llibmwlapack -llibmwblas gdiplus.lib -o C:\Users\humam\Documents\MATLAB\matconvnet-1.0-beta20\matlab\mex\vl_nnconv.mexw64
Error using mex
gcc: error: gdiplus.lib: No such file or directory
Error in vl_compilenn>mex_link (line 528)
mex(mopts{:}) ;
Error in vl_compilenn (line 479)
mex_link(opts, objs, mex_dir, flags.mexlink) ;
Error in run (line 96)
evalin('caller', [script ';']); Thank you in advance. |
I have tried to download Windows SDK includes C/C++ compiler and run matlab command mex -setup to configure. Building with 'MinGW64 Compiler (C++)'. Can any one help me? |
@vedaldi Error in vl_compilenn>mex_compile (line 524) Error in vl_compilenn (line 485) Can you please help me out.I am using R2016b version of MATLAB and VS for compiling in C/C++. |
Hi all Error using mex Error in vl_compilenn>mex_link (line 547) Error in vl_compilenn (line 498) Error in run (line 96) Error in CNN_Run (line 8) has anyone found a solution? I've changed the MathConvNet release. same thing happens. |
I am stuck by the exactly same problem when trying to compile MatConvNet by using Visual Studio 2010, Matlab R2012b on Windows 7 64-Bit. Since I have already found Microsoft Windows SDK v6.0A installed in my PC, do I need install Windows SDK 7.1 to solve the problem? Can any one help me? Thank you in advance. |
try this, you might need to set your compiler: % Install and compile MatConvNet (needed once). ... rest of your code let me know if it works for you |
try this, you might need to set your compiler: % Install and compile MatConvNet (needed once). ... rest of your code let me know if it works for you On Mon, Oct 31, 2016 at 11:18 PM, wennyICT notifications@github.com wrote:
Masoud Ghodrati, PhD Student, Department of Physiology, E-mails: masoud.ghodrati@monash.edu |
I am using Windows 10, MATLAB 2016b and MS Visual Studio 2015 Community.
I tried beta 23 (latest) to beta 20, it still happened. And I tried the method by @masi96 . It works, and I received a bell pepper image figure after successfully compiled and downloaded pre-trained network of ImageNet. Thanks, @masi96 ! |
I am using Windows 10, MATLAB 2016b and MS Visual Studio 14.0, and when I tried installing MatConvNet on my system the compilation step gives error, this is the link I used for installation http://www.vlfeat.org/matconvnet/install/. Error in vl_compilenn>mex_compile (line 529) Error in vl_compilenn (line 490) I tried "vl_compilenn('verbose', 1)" this also, the given error is the following; vl_compilenn: CUDA: MEX config file: 'C:\MATLAB\R2016b\toolbox\distcomp\gpu\extern\src\mex\win64\mex_CUDA_win64.xml' Error in vl_compilenn>mex_compile (line 529) Error in vl_compilenn (line 490) I have installed MING-64 compiler separately and tried the above mentioned methods also and it is still giving error like this. |
Do the following steps:
>> mex -setup MEX configured to use 'Microsoft Visual C++ 2013 Professional (C)' for C language compilation. To choose a different C compiler, select one from the following: To choose a different language, select one from the following: To choose a different C++ compiler, select one from the following: >> mex -setup:'C:\Program Files\MATLAB\R2016b\bin\win64\mexopts\msvcpp2013.xml' C++ MEX configured to use 'Microsoft Visual C++ 2013 Professional' for C++ language compilation. vl_compilenn: CUDA: MEX config file: 'C:\Program Files\MATLAB\R2016b\toolbox\distcomp\gpu\extern\src\mex\win64\mex_CUDA_win64.xml' |
The problem comes from the compiler for c++, "MinGW64 Compiler (C++)" does not work.
to see the compiler options. |
Configure: Win 10; VS 2015 community; matconvnet-1.0-beta25 In my test , I used "Microsoft Visual C++ 2015 Professional" and "Microsoft Visual C++ 2015 Professional (C)" to compile. And the YourC++Path is "C:\Users\Cun\AppData\Roaming\MathWorks\MATLAB\R2016a\mex_C++_win64.xml" You can find this path by using command "mex -setup C++" and " mex -setup C" Hopeful can help u. |
I have the same problem, how to fix it `Error using mex Error in vl_compilenn>mex_compile (line 583) Error in vl_compilenn (line 492) |
For me it worked my changing both C++ and C compilers to Microsoft Visual C++ 2015. Type mex -setup c++ and select Microsoft Visual C++ 2015. Do the same for C by typing mex -setup. You should get something like this after doing it (similarly for C++):
|
I can attest that a similar approach with Matlab R2018b 64-bit on Windows 10 64-bit worked for me after installing Visual Studio 2017 Community Edition with C++/C components. The commands I used with mex are as follows: mex -setup:'C:\Program Files\MATLAB\R2018b\bin\win64\mexopts\msvc2017.xml' C -v I also had to modify Visual Studio through Visual Studio Installer as C/C++ compilation is not directly supported out of the box and Matlab is not able to find the compiler even if the correct xml configuration file is selected. I had to install the components
as shown on stackoverflow. Furthermore, compiling matconvnet with GCC 6.3.0 on Windows was not possible. Both C and C++ compilers should be from VS. I tried with GCC first as I had MinGW installed on my computer. |
Dear MatConvNet community,
I am exploring MatConvNet and trying to compile using MinGW-w64 C/C++. I am getting the following errors when I run, "vl_compilenn('verbose', 2)"
Any suggestions would be greatly appreciated!
Thank you!
...
The text was updated successfully, but these errors were encountered: