Skip to content
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

windows: OpenCV 4.3.0 build failing on generating vs_version.rc using mingw-w64 #16990

Closed
deadprogram opened this issue Apr 5, 2020 · 9 comments

Comments

@deadprogram
Copy link

System information (version)
  • OpenCV => 4.3.0
  • Operating System / Platform => Windows 64-bit
  • Compiler => mingw-w64 v7.3.0
Detailed description

Our current build script fails on our Appveyor CI build when we update to OpenCV 4.3.0. Not sure about the origin of this issue. Thanks for any help.

[ 43%] Building RC object modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj
gcc: error: long: No such file or directory
C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin\windres.exe: preprocessing failed.
mingw32-make[2]: *** [modules\core\CMakeFiles\opencv_core.dir\build.make:1265: modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj] Error 1
mingw32-make[2]: *** Waiting for unfinished jobs....
mingw32-make[1]: *** [CMakeFiles\Makefile2:3666: modules/core/CMakeFiles/opencv_core.dir/all] Error 2
mingw32-make: *** [Makefile:162: all] Error 2
Steps to reproduce

See https://ci.appveyor.com/project/deadprogram/gocv/builds/31965264#L1242

@dkurt
Copy link
Member

dkurt commented Apr 5, 2020

Please add full log including cmake step.

@alalek
Copy link
Member

alalek commented Apr 5, 2020

Please dump compiler command line options: make VERBOSE=1

Allocator metrics storage type: 'long long'

Perhaps this one is related (see #16786). Try to pass:

cmake -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE=int64_t ...

@deadprogram
Copy link
Author

@deadprogram
Copy link
Author

Hi @alalek adding the -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE=int64_t option to CMAKE allows the build to complete.

If this is covered by #16786 then should I close this issue?

@alalek
Copy link
Member

alalek commented Apr 5, 2020

Feel free to propose patch with default value for mingw here (to 3.4 branch).


CMake generator: MinGW Makefiles

Also it might that this CMake generator doesn't handle spaces in definitions well (this generator is used rarely with CMake).
Consider using "ninja" if it is supported by AppVeyor environment.

@deadprogram
Copy link
Author

OK, sounds good. I will look into if there is a coherent patch I could submit, or possibly switching to ninja.

Now closing this issue, thanks very much @alalek and @dkurt for quick response.

@charlescookey
Copy link

Hi @alalek adding the -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE=int64_t option to CMAKE allows the build to complete.

If this is covered by #16786 then should I close this issue?

@alalek when in the cmake-gui , to add the entry, which type should i select (BOOL or STRING ). And should i check the value box. Thanks

@yiyayiyau
Copy link

Hi, @alalek , i used mingw32-make to build opencv3.4 and contrib and have an error like oben:gcc error: No such file or directory and then i have added OPENCV_ALLOCATOR_STATS_COUNTER_TYPE = int64_t in cmake:
Aaron Swartz
and have another problem: Aaron Swartz
Could you tell me what happends hier and how to solve this problem? Thanks a lot.

@bknhatice
Copy link

Hi, @yiyayiyau i am getting the same errors. I could not find the solution. Can you share if you found the solution? Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants