Results 1 to 10 of 10

Thread: OpenCV wont make?

  1. #1
    Join Date
    Nov 2009
    Location
    UK
    Beans
    33
    Distro
    Ubuntu 11.04 Natty Narwhal

    Red face OpenCV wont make?

    (assuming this is accessibility as its controling the cursor withought the mouse)

    yeah i've been trying to install OpenCV yet it wont make...it comes up with this line of code in the terminal

    Code:
    make  all-recursive
    make[1]: Entering directory `/usr/local/src/opencv-1.0.0'
    Making all in cxcore
    make[2]: Entering directory `/usr/local/src/opencv-1.0.0/cxcore'
    Making all in src
    make[3]: Entering directory `/usr/local/src/opencv-1.0.0/cxcore/src'
    if /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I../../cxcore/include -I../..  -DNDEBUG   -Wall -fno-rtti -pipe -O3 -g -march=i686 -ffast-math -fomit-frame-pointer -fno-strict-aliasing -MT cxalloc.lo -MD -MP -MF ".deps/cxalloc.Tpo" -c -o cxalloc.lo cxalloc.cpp; \
        then mv -f ".deps/cxalloc.Tpo" ".deps/cxalloc.Plo"; else rm -f ".deps/cxalloc.Tpo"; exit 1; fi
     g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -g -march=i686 -ffast-math -fomit-frame-pointer -fno-strict-aliasing -MT cxalloc.lo -MD -MP -MF .deps/cxalloc.Tpo -c cxalloc.cpp  -fPIC -DPIC -o .libs/cxalloc.o
    In file included from _cxcore.h:60,
                     from cxalloc.cpp:42:
    ../../cxcore/include/cxmisc.h:133:6: error: #elif with no expression
    make[3]: *** [cxalloc.lo] Error 1
    make[3]: Leaving directory `/usr/local/src/opencv-1.0.0/cxcore/src'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/usr/local/src/opencv-1.0.0/cxcore'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/usr/local/src/opencv-1.0.0'
    make: *** [all] Error 2
    Thanks in advance if u can help

  2. #2
    Join Date
    Jan 2010
    Beans
    2

    Re: OpenCV wont make?

    Did u get the solution. I'm facing the same problem.
    Please do help....

  3. #3

    Re: OpenCV wont make?

    Have either of you checked the OpenCV wiki?
    Learning is not attained by chance, it must be sought for with ardor and attended to with diligence. Abigail Adams ( 1744 - 1818 ), 1780;

    My blog Poetry and More Free Ubuntu Magazine

  4. #4
    Join Date
    Sep 2006
    Location
    Germany
    Beans
    403
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: OpenCV wont make?

    OpenCV 2.x does build using the recipe from the OpenCV wiki. http://opencv.willowgarage.com/wiki/InstallGuide_Linux. The samples run. I don't have a webcam. Some of the samples require webcam.

    Two things:

    I wished I had used check install instead of make install to gain package removal.

    the ubuntu repositories for OpenCV 1.0 make you remove one of the codec libs used by video programs, but that doesn't seem to affect ffmpeg.

    Everyone seems overly-eager to make Face Recognition with OpenCV and a webcam. I want Object Recognition from a file graphic. So now, I'm trying to link OpenCV - Java - Processing. I have a link issue, Processing wants OpenCV 1.0. I may push on and try [shudder] JNI to use the OpenCV 2.0 libs.
    "You don't do art because you want to, no, you do art because you have to." -- M. Buonarroti

  5. #5
    Join Date
    Jan 2007
    Location
    Amsterdam
    Beans
    2
    Distro
    Kubuntu 6.10 Edgy

    Re: OpenCV wont make?

    For all the people finding this topic through google (like me): I 'solved' this problem by commenting out the line cxcore/include/cxmisc.h:133 + 134. Make went fine after that. I am now at the stage of compiling against the lib but i think this does not change the functionality.

    This is how the part now looks:
    Code:
    #elif defined HAVE_ALLOCA
        #include <stdlib.h>
    //#elif
    //    #error
    #endif
    Last edited by Frizzle; March 29th, 2011 at 09:13 PM.

  6. #6
    Join Date
    Apr 2011
    Beans
    1

    Re: OpenCV wont make?

    Apparently a newer version of GCC changes the pre-processor, so this command elif without any expression will result in a compilation error.

    http://gcc.gnu.org/gcc-4.4/porting_to.html

    So, to fix this change the elif to else, and it compiles functionally.

  7. #7
    Join Date
    Sep 2010
    Beans
    15

    Re: OpenCV wont make?

    Quote Originally Posted by Frizzle View Post
    For all the people finding this topic through google (like me): I 'solved' this problem by commenting out the line cxcore/include/cxmisc.h:133 + 134. Make went fine after that. I am now at the stage of compiling against the lib but i think this does not change the functionality.

    This is how the part now looks:
    Code:
    #elif defined HAVE_ALLOCA
        #include <stdlib.h>
    //#elif
    //    #error
    #endif
    instead of commenting out line 133-134, you should change "#elif" to "#else". that is the proper way to do it. but i am not sure if it makes a difference...

  8. #8
    Join Date
    Jan 2010
    Beans
    3

    Re: OpenCV wont make?

    Are you aware that openCV is in the repositories? It is called libcv though.

  9. #9
    Join Date
    Jul 2010
    Beans
    9

    Re: OpenCV wont make?

    Quote Originally Posted by The End of The World View Post
    (assuming this is accessibility as its controling the cursor withought the mouse)

    yeah i've been trying to install OpenCV yet it wont make...it comes up with this line of code in the terminal

    Code:
    make  all-recursive
    make[1]: Entering directory `/usr/local/src/opencv-1.0.0'
    Making all in cxcore
    make[2]: Entering directory `/usr/local/src/opencv-1.0.0/cxcore'
    Making all in src
    make[3]: Entering directory `/usr/local/src/opencv-1.0.0/cxcore/src'
    if /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I../../cxcore/include -I../..  -DNDEBUG   -Wall -fno-rtti -pipe -O3 -g -march=i686 -ffast-math -fomit-frame-pointer -fno-strict-aliasing -MT cxalloc.lo -MD -MP -MF ".deps/cxalloc.Tpo" -c -o cxalloc.lo cxalloc.cpp; \
        then mv -f ".deps/cxalloc.Tpo" ".deps/cxalloc.Plo"; else rm -f ".deps/cxalloc.Tpo"; exit 1; fi
     g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -g -march=i686 -ffast-math -fomit-frame-pointer -fno-strict-aliasing -MT cxalloc.lo -MD -MP -MF .deps/cxalloc.Tpo -c cxalloc.cpp  -fPIC -DPIC -o .libs/cxalloc.o
    In file included from _cxcore.h:60,
                     from cxalloc.cpp:42:
    ../../cxcore/include/cxmisc.h:133:6: error: #elif with no expression
    make[3]: *** [cxalloc.lo] Error 1
    make[3]: Leaving directory `/usr/local/src/opencv-1.0.0/cxcore/src'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/usr/local/src/opencv-1.0.0/cxcore'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/usr/local/src/opencv-1.0.0'
    make: *** [all] Error 2
    Thanks in advance if u can help

    http://stackoverflow.com/questions/1...r-debian-lenny

  10. #10
    Join Date
    Feb 2007
    Beans
    24,961
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: OpenCV wont make?


    From the Ubuntu Forums Code of Conduct.
    If a post is older than a year or so and hasn't had a new reply in that time, instead of replying to it, create a new thread. In the software world, a lot can change in a very short time, and doing things this way makes it more likely that you will find the best information. You may link to the original discussion in the new thread if you think it may be helpful.
    Thread closed.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •