Cmake fails while configuring OpenCV












1















I'm trying to buid OpenCV and use it in Qt. I have installed all required packages for OpenCV and Qt, after that I tried too run cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local /media/d/Install/opencv-2.4.8 but I got errors:



CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:189 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


-- The CXX compiler identification is GNU 4.8.2
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:185 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


-- The C compiler identification is GNU 4.8.2
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:186 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:71 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:78 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


CMake Error at CMakeLists.txt:70 (message):
CMake fails to deterimine the bitness of target platform.

Please check your CMake and compiler installation. If you are crosscompiling then ensure that your CMake toolchain file correctly sets the compiler details.


-- Configuring incomplete, errors occurred!


CMakeLists.txt:56 :



project(OpenCV CXX C)


/usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:189 :



configure_file(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeSystem.cmake
IMMEDIATE @ONLY)









share|improve this question




















  • 1





    Are you executing cmake from a build directory also on /media? If so, I suspect the problem is that it is on a filesystem such as NTFS that doesn't support Unix-style permission bits (or is mounted noexec). The compiler/ABI tests are likely trying to create and test minimal executables e.g. ./CMakeFiles/CompilerIdCXX/a.out or ./CMakeFiles/CMakeDetermineCompilerABI_C.bin and are failing if those don't execute.

    – steeldriver
    Jun 1 '14 at 13:38











  • @steeldriver I moved opencv directory to the ext4 partition, now it seems to be compiling correctly. make still in process, but I think everything will be fine. I used to build opencv from ntfs partition on another computer, so I did not even think that the filesystem can cause such problems

    – Ilia
    Jun 1 '14 at 14:17
















1















I'm trying to buid OpenCV and use it in Qt. I have installed all required packages for OpenCV and Qt, after that I tried too run cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local /media/d/Install/opencv-2.4.8 but I got errors:



CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:189 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


-- The CXX compiler identification is GNU 4.8.2
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:185 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


-- The C compiler identification is GNU 4.8.2
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:186 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:71 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:78 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


CMake Error at CMakeLists.txt:70 (message):
CMake fails to deterimine the bitness of target platform.

Please check your CMake and compiler installation. If you are crosscompiling then ensure that your CMake toolchain file correctly sets the compiler details.


-- Configuring incomplete, errors occurred!


CMakeLists.txt:56 :



project(OpenCV CXX C)


/usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:189 :



configure_file(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeSystem.cmake
IMMEDIATE @ONLY)









share|improve this question




















  • 1





    Are you executing cmake from a build directory also on /media? If so, I suspect the problem is that it is on a filesystem such as NTFS that doesn't support Unix-style permission bits (or is mounted noexec). The compiler/ABI tests are likely trying to create and test minimal executables e.g. ./CMakeFiles/CompilerIdCXX/a.out or ./CMakeFiles/CMakeDetermineCompilerABI_C.bin and are failing if those don't execute.

    – steeldriver
    Jun 1 '14 at 13:38











  • @steeldriver I moved opencv directory to the ext4 partition, now it seems to be compiling correctly. make still in process, but I think everything will be fine. I used to build opencv from ntfs partition on another computer, so I did not even think that the filesystem can cause such problems

    – Ilia
    Jun 1 '14 at 14:17














1












1








1








I'm trying to buid OpenCV and use it in Qt. I have installed all required packages for OpenCV and Qt, after that I tried too run cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local /media/d/Install/opencv-2.4.8 but I got errors:



CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:189 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


-- The CXX compiler identification is GNU 4.8.2
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:185 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


-- The C compiler identification is GNU 4.8.2
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:186 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:71 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:78 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


CMake Error at CMakeLists.txt:70 (message):
CMake fails to deterimine the bitness of target platform.

Please check your CMake and compiler installation. If you are crosscompiling then ensure that your CMake toolchain file correctly sets the compiler details.


-- Configuring incomplete, errors occurred!


CMakeLists.txt:56 :



project(OpenCV CXX C)


/usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:189 :



configure_file(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeSystem.cmake
IMMEDIATE @ONLY)









share|improve this question
















I'm trying to buid OpenCV and use it in Qt. I have installed all required packages for OpenCV and Qt, after that I tried too run cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local /media/d/Install/opencv-2.4.8 but I got errors:



CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:189 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


-- The CXX compiler identification is GNU 4.8.2
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:185 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


-- The C compiler identification is GNU 4.8.2
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:186 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:71 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:78 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:56 (project)


CMake Error at CMakeLists.txt:70 (message):
CMake fails to deterimine the bitness of target platform.

Please check your CMake and compiler installation. If you are crosscompiling then ensure that your CMake toolchain file correctly sets the compiler details.


-- Configuring incomplete, errors occurred!


CMakeLists.txt:56 :



project(OpenCV CXX C)


/usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:189 :



configure_file(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeSystem.cmake
IMMEDIATE @ONLY)






compiling c++ c cmake






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 1 '14 at 10:25







Ilia

















asked Jun 1 '14 at 9:49









IliaIlia

1113




1113








  • 1





    Are you executing cmake from a build directory also on /media? If so, I suspect the problem is that it is on a filesystem such as NTFS that doesn't support Unix-style permission bits (or is mounted noexec). The compiler/ABI tests are likely trying to create and test minimal executables e.g. ./CMakeFiles/CompilerIdCXX/a.out or ./CMakeFiles/CMakeDetermineCompilerABI_C.bin and are failing if those don't execute.

    – steeldriver
    Jun 1 '14 at 13:38











  • @steeldriver I moved opencv directory to the ext4 partition, now it seems to be compiling correctly. make still in process, but I think everything will be fine. I used to build opencv from ntfs partition on another computer, so I did not even think that the filesystem can cause such problems

    – Ilia
    Jun 1 '14 at 14:17














  • 1





    Are you executing cmake from a build directory also on /media? If so, I suspect the problem is that it is on a filesystem such as NTFS that doesn't support Unix-style permission bits (or is mounted noexec). The compiler/ABI tests are likely trying to create and test minimal executables e.g. ./CMakeFiles/CompilerIdCXX/a.out or ./CMakeFiles/CMakeDetermineCompilerABI_C.bin and are failing if those don't execute.

    – steeldriver
    Jun 1 '14 at 13:38











  • @steeldriver I moved opencv directory to the ext4 partition, now it seems to be compiling correctly. make still in process, but I think everything will be fine. I used to build opencv from ntfs partition on another computer, so I did not even think that the filesystem can cause such problems

    – Ilia
    Jun 1 '14 at 14:17








1




1





Are you executing cmake from a build directory also on /media? If so, I suspect the problem is that it is on a filesystem such as NTFS that doesn't support Unix-style permission bits (or is mounted noexec). The compiler/ABI tests are likely trying to create and test minimal executables e.g. ./CMakeFiles/CompilerIdCXX/a.out or ./CMakeFiles/CMakeDetermineCompilerABI_C.bin and are failing if those don't execute.

– steeldriver
Jun 1 '14 at 13:38





Are you executing cmake from a build directory also on /media? If so, I suspect the problem is that it is on a filesystem such as NTFS that doesn't support Unix-style permission bits (or is mounted noexec). The compiler/ABI tests are likely trying to create and test minimal executables e.g. ./CMakeFiles/CompilerIdCXX/a.out or ./CMakeFiles/CMakeDetermineCompilerABI_C.bin and are failing if those don't execute.

– steeldriver
Jun 1 '14 at 13:38













@steeldriver I moved opencv directory to the ext4 partition, now it seems to be compiling correctly. make still in process, but I think everything will be fine. I used to build opencv from ntfs partition on another computer, so I did not even think that the filesystem can cause such problems

– Ilia
Jun 1 '14 at 14:17





@steeldriver I moved opencv directory to the ext4 partition, now it seems to be compiling correctly. make still in process, but I think everything will be fine. I used to build opencv from ntfs partition on another computer, so I did not even think that the filesystem can cause such problems

– Ilia
Jun 1 '14 at 14:17










1 Answer
1






active

oldest

votes


















0














I solved it by removing the build folder in which I had previously started cmake but cancelled it during installation.
Now it works.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f475203%2fcmake-fails-while-configuring-opencv%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I solved it by removing the build folder in which I had previously started cmake but cancelled it during installation.
    Now it works.






    share|improve this answer




























      0














      I solved it by removing the build folder in which I had previously started cmake but cancelled it during installation.
      Now it works.






      share|improve this answer


























        0












        0








        0







        I solved it by removing the build folder in which I had previously started cmake but cancelled it during installation.
        Now it works.






        share|improve this answer













        I solved it by removing the build folder in which I had previously started cmake but cancelled it during installation.
        Now it works.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 26 '16 at 10:28









        Louis MLouis M

        1314




        1314






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f475203%2fcmake-fails-while-configuring-opencv%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Human spaceflight

            Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

            張江高科駅