Ask Your Question
0

gcc: error: long: No such file or directory

asked 2020-04-08 15:27:46 -0600

R0dan gravatar image

CMAKE 3.17 | OPENCV 4.3.0 | QT 5.14.2 | mingw-w64 8.1.0 |

I use

mingw32-make


  • GNU Make 4.2.1 Built for x86_64-w64-mingw32 Copyright (C) 1988-2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

GCC


  • gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ERROR((

[ 39%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/mean.avx2.cpp.obj
[ 39%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/merge.avx2.cpp.obj
[ 40%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/split.avx2.cpp.obj
[ 40%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/sum.avx2.cpp.obj
[ 40%] Building RC object modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj
gcc: error: long: No such file or directory
C:\PROGRA~1\MINGW-~1\X86_64~1.0-P\mingw64\bin\windres.exe: preprocessing failed.
mingw32-make[2]: *** [modules\core\CMakeFiles\opencv_core.dir\build.make:1492: modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj] Error 1
mingw32-make[2]: *** Waiting for unfinished jobs....
mingw32-make[1]: *** [CMakeFiles\Makefile2:1844: modules/core/CMakeFiles/opencv_core.dir/all] Error 2
mingw32-make: *** [Makefile:179: all] Error 2
edit retag flag offensive close merge delete

Comments

the windres.exe mingw uses cannot handle/escape "long long" given as a cmdline arg

berak gravatar imageberak ( 2020-04-08 16:11:37 -0600 )edit

Could you drop an article where you could find out about it? Now I do not quite understand what arguments I will need to write

Thank u

R0dan gravatar imageR0dan ( 2020-04-08 17:12:05 -0600 )edit

2 answers

Sort by » oldest newest most voted
2

answered 2020-04-08 17:38:53 -0600

berak gravatar image

updated 2020-05-21 03:27:32 -0600

have to use mingw, too :(

windres fails on opencv/build/modules/core/core/CMakeFiles/opencv_core.dir/flags.make

(have a look at what it generates now, then) try to:

cmake -DOPENCV_ENABLE_ALLOCATOR_STATS=OFF

again, the problem is the windres version deployed with mingw, g++ can handle the same cmdline arg correctly.

edit flag offensive delete link more

Comments

it works.

thaaaaanks)

R0dan gravatar imageR0dan ( 2020-04-10 12:09:46 -0600 )edit

I don't understand - does passing this define solve the problem for anyone? It didn't correct the error when I tried it.

leftwing gravatar imageleftwing ( 2020-04-17 14:06:29 -0600 )edit

@leftwing when in doubt, clean your build folder and start all over with cmake

berak gravatar imageberak ( 2020-04-18 04:23:21 -0600 )edit

In fact I deleted the build folder and created a new one. See also https://answers.opencv.org/question/2...

leftwing gravatar imageleftwing ( 2020-04-18 09:53:26 -0600 )edit
1

it seems the key is wrong, it should be OPENCV_ENABLE_ALLOCATOR_STATS=OFF

galchinsky gravatar imagegalchinsky ( 2020-04-19 15:15:46 -0600 )edit

@galchinsky -- thanks for the correction !

berak gravatar imageberak ( 2020-05-21 03:27:09 -0600 )edit

thanks @berak.

Mostafa Sataki gravatar imageMostafa Sataki ( 2020-12-02 13:27:06 -0600 )edit
0

answered 2020-12-03 01:48:15 -0600

or you can uncheck the box of OPENCV_ENABLE_ALLOCATOR_STATS in cmake-gui

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-04-08 15:27:46 -0600

Seen: 7,253 times

Last updated: May 21 '20