-
Notifications
You must be signed in to change notification settings - Fork 744
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
Update Wiki Build Environments (VS 2015, MSYS2 changes) #298
Comments
Okay, so I found the cause of the cmake issue - when using Visual Studio Community 2015, the cppbuild.sh scripts need to be updated to point to Visual Studio 2015:
Still having issues running "mvn clean install -Djavacpp.platform=windows-x86_64", but hopefully if I get that working too, I can write up instructions on setting up a build environment on Windows 10, with Visual Studio 2015 and MSYS2 |
Thanks for testing this out! If you could check that everything works with Visual Studio 2015, that would be great. If there is anything that doesn't work, we can still download old versions here: |
Thanks Samuel - I didn't realise that the older builds of Visual Studio were still available for free. These are my notes from attempting to build javacpp-presets on a fresh install of Windows using Visual Studio 2015 and the latest build of msys2. Looking at the results, I think the main problem is actually the way I've set up msys2, though I have no idea what's wrong with Maven trying to build the presets for OpenCV. I don't really have much more time to look into it deeper right now, but hopefully these notes save someone some time in the future. Environment setup (in the listed order):
Packages in msys2
Misc Changes
|
Thanks! MSYS2 not installing properly, that's strange. Let me know if you figure out why this is happening. This is the first time I hear anyone having problems installing MSYS2. |
Hey FWIW, I can give a bit more info on some of these.. The unresolved symbol for GetProcessMemoryInfo is weird, it needs psapi.lib to supply this. For some reason, calling the cppbuild.sh gets this dependency OK, but with the mvn build trying the same it doesn't. It could be added in as explicit dependencies I think, but I'm thinking of using the flags for the mvn build to say don't do the cppbuild part in mvn. The errors to do with gzopen_w - have you install zlib? That might fix those. There's something strange with ffmpeg, libvpx seems to have a bug on version 1.6 with gcc 6.2, if you go back to 1.5 it seems to build OK. And then the last few error platform not supported are OK - the mvn install step will just create empty jars. With that, there might only be the odd one or two not building. I think I'm using the latest msys2, but I have deviated a bit from the wiki instructions. At the last check the one I'm stuck on is still CUDA, but lets see now I've figured out the ffmpeg problem :) |
That's great! OpenCV and ffmpeg were the ones I was most concerned about, so knowing what's causing the issues for those is really helpful. I had installed zlib via "pacman -S zlib", after seeing that gzopen_w message, but it doesn't/didn't change the output or the error message, so it's probably some other supporting library/package that's missing. (Unless there's another version-specific bug with one of the current packages) |
…f Visual Studio (issue bytedeco/javacpp-presets#298)
So it looks like we need to link with |
I can confirm the current msys version (msys2-i686-20160921.exe) needs the This is a bug which is already fixed in the next msys version. |
I was able to build and install openblas for maven with the following step. This is a clean installation.
|
The important part is
@wongjoel you might wanna try to change the version. |
Another problem. Installing Visual Studio 2013 before or alongside Visual Studio 2015 will corrupt the default values (e.g. VCTargetsPath) used for MSBuild in the Windows registry. This will lead to I've tried @saudet I would like to replace the current Building-on-Windows wiki with my new version and also remove all windows related steps from the general installation guide. Is that okey for you? |
Cool! Looks like openblas works for me now. Did you change ffmpeg to use an older version of libvpx or did it just work for you? Also, did hdf5 build? |
@vb216 Sorry I only looked at openblas and opencv in order to build mxnet. After adding a PR for mxnet tomorrow, I will have a look at ffmpeg. |
No problem.. looks pretty promising I think.. I double checked ffmpeg, still an issue with libvpx, maybe it'll be fixed in next version but for now I just downgrade to 1.5 and all is good. And from a recent commit, it looks like I need to download hdf5 for windows before trying the build. Apart from that, everything built fine, I'll try hdf5 fix and then it should all just build from a simple mvn install.. |
There is a new msys2 version (msys2-x86_64-20161025.exe) which does not have the mingw problems. |
Visual Studio 2015It is possible to build the projects (e.g. opencv) with Visual Studio 2015 and like @wongjoel mentioned one have to edit the opencv\cppbuild.sh file {"$CMAKE" -G "Visual Studio 14 2015 Win64"} and {cp -r ../x64/vc14/lib ..} and {cp -r ../x64/vc14/bin ..}. Depending on the update version of the studio it might be necessary to add some more include and library directories. Execute these commands before running the build process. You might have to change the version "10.0.10240.0"
I got some |
@vb216 HDF5 works for me I've installed https://support.hdfgroup.org/HDF5/release/obtain5110.html and run the steps I've described yesterday. |
Yeah looks good to me too. Just libvpx in ffmpeg that has an issue, I think that might be their code tho, latest from their git repo built fine and the 1.5 earlier version too, so maybe some bug introduced and then fixed. Seems a pretty straightforward way to get a build env up and running now! |
True libvpx makes problems:
This seems to be a problem with GCC6 and is fixed with: |
@Neiko2002 Please do update the wiki page, but do not replace it entirely:
That said, thank you very much your contributions! |
I've finally updated the wiki page for Visual Studio 2015 and the latest of MSYS2. I've also reinstalled MSYS2 from scratch, but have not encountered any of the issues described here. As noted by @wongjoel, I had to update a few things as per the commit above, but that's it. @Neiko2002 Please feel free to update https://github.com/bytedeco/javacpp-presets/wiki/Building-on-Windows in any way you wish, but do not remove the general guidelines from https://github.com/bytedeco/javacpp-presets/wiki/Build-Environments. Thank you all for all the information and the great feedback! |
Thanks you saudet. I've extended the "Building on Windows" wiki page and solved a problem ("stdio.h": No such file or directory) that often occurred to me because of the missing ucrt directory in the Windows Kit. Precautionally installing the Windows SDK prevents such problems in the future for any other user who might want to use javacpp under Windows. |
@Neiko2002 Thanks! Although for me the installer of Visual Studio 2015 automatically installs Windows 10 SDK too. |
I have VS2013 and VS2015 installed. Using the newer one, the include variable always pointed to this directory "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0". Which does not have any ucrt libs. Otherwise the 10.0.10240.0 folder of VS2013 and the 10.0.15063.0 folder of the Windows 10 SDK contains the ucrt files. Microsoft might have some problems when updating and installing multiple versions. |
Great, thanks! Added a link at the bottom here: |
Following the wiki instructions on "Build Environments" (Windows section) no longer appears to work.
I attempted to build javacpp-presets according to the instructions at https://github.com/bytedeco/javacpp-presets/wiki/Build-Environments, but it failed to compile successfully, and many of the steps did not work as written (at least for me).
I had hoped to submit an update to the wiki myself, but I have so far failed to get a working build environment.
For the Windows section:
currently I can run the bash cppbuild.sh script, but I get a cmake issue, and can't work out if the issue is with my Visual Studio install, or my MSYS2 install:
-- The CXX compiler identification is unknown
-- The C compiler identification is unknown
Sorry if that's too many things put into one issue, the main concern I have here is that there doesn't seem to be a working set of instructions on how configure a clean install of windows to be able to build javacpp-presets.
The text was updated successfully, but these errors were encountered: