Menu

error: ‘CAIRO_OPERATOR_*’ was not declared in this scope

Tony G
2015-10-27
2015-12-06
  • Tony G

    Tony G - 2015-10-27

    I'm trying to install Snowmix-0.5.0 on centos 6.7 64bit, the bootstrap/configure step seemed to go okay but when I run make I get this:

    video_shape.cpp:1437: error: ‘CAIRO_OPERATOR_MULTIPLY’ was not declared in this scope
    video_shape.cpp:1438: error: ‘CAIRO_OPERATOR_SCREEN’ was not declared in this scope
    video_shape.cpp:1439: error: ‘CAIRO_OPERATOR_OVERLAY’ was not declared in this scope
    video_shape.cpp:1440: error: ‘CAIRO_OPERATOR_DARKEN’ was not declared in this scope
    video_shape.cpp:1441: error: ‘CAIRO_OPERATOR_LIGHTEN’ was not declared in this scope
    video_shape.cpp:1442: error: ‘CAIRO_OPERATOR_COLOR_DODGE’ was not declared in this scope
    video_shape.cpp:1443: error: ‘CAIRO_OPERATOR_COLOR_BURN’ was not declared in this scope
    video_shape.cpp:1444: error: ‘CAIRO_OPERATOR_HARD_LIGHT’ was not declared in this scope
    video_shape.cpp:1445: error: ‘CAIRO_OPERATOR_SOFT_LIGHT’ was not declared in this scope
    video_shape.cpp:1446: error: ‘CAIRO_OPERATOR_DIFFERENCE’ was not declared in this scope
    video_shape.cpp:1447: error: ‘CAIRO_OPERATOR_EXCLUSION’ was not declared in this scope
    video_shape.cpp:1448: error: ‘CAIRO_OPERATOR_HSL_HUE’ was not declared in this scope
    video_shape.cpp:1449: error: ‘CAIRO_OPERATOR_HSL_SATURATION’ was not declared in this scope
    video_shape.cpp:1450: error: ‘CAIRO_OPERATOR_HSL_COLOR’ was not declared in this scope
    video_shape.cpp:1451: error: ‘CAIRO_OPERATOR_HSL_LUMINOSITY’ was not declared in this scope
    video_shape.cpp: In member function ‘int CVideoShape::set_shape_operator(controller_type*, const char*)’:
    video_shape.cpp:1590: error: ‘CAIRO_OPERATOR_MULTIPLY’ was not declared in this scope
    video_shape.cpp:1591: error: ‘CAIRO_OPERATOR_SCREEN’ was not declared in this scope
    video_shape.cpp:1592: error: ‘CAIRO_OPERATOR_OVERLAY’ was not declared in this scope
    video_shape.cpp:1593: error: ‘CAIRO_OPERATOR_DARKEN’ was not declared in this scope
    video_shape.cpp:1594: error: ‘CAIRO_OPERATOR_LIGHTEN’ was not declared in this scope
    video_shape.cpp:1595: error: ‘CAIRO_OPERATOR_COLOR_DODGE’ was not declared in this scope
    video_shape.cpp:1596: error: ‘CAIRO_OPERATOR_COLOR_BURN’ was not declared in this scope
    video_shape.cpp:1597: error: ‘CAIRO_OPERATOR_HARD_LIGHT’ was not declared in this scope
    video_shape.cpp:1598: error: ‘CAIRO_OPERATOR_SOFT_LIGHT’ was not declared in this scope
    video_shape.cpp:1599: error: ‘CAIRO_OPERATOR_DIFFERENCE’ was not declared in this scope
    video_shape.cpp:1600: error: ‘CAIRO_OPERATOR_EXCLUSION’ was not declared in this scope
    video_shape.cpp:1601: error: ‘CAIRO_OPERATOR_HSL_HUE’ was not declared in this scope
    video_shape.cpp:1602: error: ‘CAIRO_OPERATOR_HSL_SATURATION’ was not declared in this scope
    video_shape.cpp:1603: error: ‘CAIRO_OPERATOR_HSL_COLOR’ was not declared in this scope
    video_shape.cpp:1604: error: ‘CAIRO_OPERATOR_HSL_LUMINOSITY’ was not declared in this scope
    make[1]: *** [video_shape.lo] Error 1
    make[1]: Leaving directory `/home/packages/Snowmix-0.5.0/src'
    make: *** [all-recursive] Error 1
    

    I couldn;t find anything on this when searching google. Hope someone can point me to a solution here....?

     
    • Peter Maersk-Moller

      Hi Tony.

      The previous post by me had a formatting issue error. It missed a '*' Here is the correct version

      Hi Tony.

      It's a bit weird, if that is the only error. Do you have /usr/include/cairo/cairo.h ?

      What is the output of

          grep CAIRO_OPERATOR_SCREEN /usr/include/*/*.h
      

      Best regards
      Peter

       
    • Peter Maersk-Moller

      Hi Tony.

      Okay I installed CentOS 6.7 and found two minor issues. These are:

      1) CentOS 6.7 is not detected by the bootstrap script and it actually tells you that it is an unsupported OS. This is fine as it is not ... being old. CentOS 7 is supported.
      2) CentOS has a really old Cairo Graphics library older than version 1.10 where a lot of the Cairo operator modes are not supported.

      There are ways to fix this. First you may need to change the bootstrap script adding the following line to line 59 just above the line setting prefix to /usr/local

          osvariant=centos
      

      Then run the script strapboot and then run the script bootstrap. This time it is forced to detect centos and it will offer to update system and check for missing packages.

      The next thing to do is to uncomment the Cairo Operators not supported by the Cairo library on your CentOS 6.7. Here you have to edit the file src/video_shape.cpp and uncomment the sections starting in line 1590 and 1437:

          else if (!strncasecmp (str, "saturate ", 5))   c_operator = CAIRO_OPERATOR_SATURATE;
      #ifdef CAIRO_OPERATOR_MULTIPLY
          else if (!strncasecmp (str, "multiply ", 5))   c_operator = CAIRO_OPERATOR_MULTIPLY;
          else if (!strncasecmp (str, "screen ", 5))     c_operator = CAIRO_OPERATOR_SCREEN;
          else if (!strncasecmp (str, "overlay ", 5))    c_operator = CAIRO_OPERATOR_OVERLAY;
          else if (!strncasecmp (str, "darken ", 5))     c_operator = CAIRO_OPERATOR_DARKEN;
          else if (!strncasecmp (str, "lighten ", 5))    c_operator = CAIRO_OPERATOR_LIGHTEN;
          else if (!strncasecmp (str, "dodge ", 5))      c_operator = CAIRO_OPERATOR_COLOR_DODGE;
          else if (!strncasecmp (str, "burn ", 5))       c_operator = CAIRO_OPERATOR_COLOR_BURN;
          else if (!strncasecmp (str, "hard ", 5))       c_operator = CAIRO_OPERATOR_HARD_LIGHT;
          else if (!strncasecmp (str, "soft ", 5))       c_operator = CAIRO_OPERATOR_SOFT_LIGHT;
          else if (!strncasecmp (str, "difference ", 5)) c_operator = CAIRO_OPERATOR_DIFFERENCE;
          else if (!strncasecmp (str, "exclusion ", 5))  c_operator = CAIRO_OPERATOR_EXCLUSION;
          else if (!strncasecmp (str, "hsl_hue ", 5))    c_operator = CAIRO_OPERATOR_HSL_HUE;
          else if (!strncasecmp (str, "hsl_saturation ", 5)) c_operator = CAIRO_OPERATOR_HSL_SATURATION;
          else if (!strncasecmp (str, "hsl_color ", 5))  c_operator = CAIRO_OPERATOR_HSL_COLOR;
          else if (!strncasecmp (str, "hsl_luminosity ", 5)) c_operator = CAIRO_OPERATOR_HSL_LUMINOSITY;
       #endif
          else return -1;
      

      and

                                          pDraw->parameter == CAIRO_OPERATOR_SATURATE ? "saturate" :
          #ifdef CAIRO_OPERATOR_MULTIPLY
                                          pDraw->parameter == CAIRO_OPERATOR_MULTIPLY ? "multiply" :
                                          pDraw->parameter == CAIRO_OPERATOR_SCREEN ? "screen" :
                                          pDraw->parameter == CAIRO_OPERATOR_OVERLAY ? "overlay" :
                                          pDraw->parameter == CAIRO_OPERATOR_DARKEN ? "darken" :
                                          pDraw->parameter == CAIRO_OPERATOR_LIGHTEN ? "lighten" :
                                          pDraw->parameter == CAIRO_OPERATOR_COLOR_DODGE ? "dodge" :
                                          pDraw->parameter == CAIRO_OPERATOR_COLOR_BURN ? "burn" :
                                          pDraw->parameter == CAIRO_OPERATOR_HARD_LIGHT ? "hard" :
                                          pDraw->parameter == CAIRO_OPERATOR_SOFT_LIGHT ? "soft" :
                                          pDraw->parameter == CAIRO_OPERATOR_DIFFERENCE ? "difference" :
                                          pDraw->parameter == CAIRO_OPERATOR_EXCLUSION ? "exclusion" :
                                          pDraw->parameter == CAIRO_OPERATOR_HSL_HUE ? "hsl_hue" :
                                          pDraw->parameter == CAIRO_OPERATOR_HSL_SATURATION ? "hsl_saturation" :
                                          pDraw->parameter == CAIRO_OPERATOR_HSL_COLOR ? "hsl_color" :
                                          pDraw->parameter == CAIRO_OPERATOR_HSL_LUMINOSITY ? "hsl_luminosity" :
          #endif
                                          "unknown");
      

      Theoretically you also ought to remove the options listed in line 3177 where the operator options

          "multiply | screen | overlay | darken | lighten | dodge | burn | hard | soft | difference | exclusion | hsl_hue | hsl_saturation | hsl_color | hsl_luminosity"
      

      are listed and subsequently not available although this is a cosmetic step not strictly necessary.

      After these changes, you can now run the make command and compile Snowmix and install it. Please note the messages and instructions at the end of the bootstrap script.

      Let me know how it goes.

      Peter

       
  • Anonymous

    Anonymous - 2015-10-29

    thanks for your response. Yes I do have /usr/include/cairo/cairo.h.
    the command

        grep CAIRO_OPERATOR_SCREEN /usr/include/*/*.h
    

    does nothing, the cursor just drops to the next line.

     

    Last edit: Peter Maersk-Moller 2015-10-29
    • Peter Maersk-Moller

      Hi Tony.

      If possible, please post as 'logged in'. That way you also get a mail when I reply.

      I've got CentOS 7.15.03 installed here without the issue you are describing. Can take a look at CentOS 6.7. What Centos distro did you use? Was it LiveCD, LiveDVD, DVD, Minimal or netinstall?

      Are there any other warning/error messages from the configure and make process? Perhaps you can copy output into two files and attache them to a post here?

      Best regards

       
  • Tony G

    Tony G - 2015-10-31

    ok thanks for your help. I haven't yet tried the suggestions you made above but I think it might be better if I just do a clean install of centos 7 and try snowmix again, rather than struggle with something that's too old.

     
  • Tony G

    Tony G - 2015-11-09

    ok I installed a new contos 7 and snowmix 0.5.0 but now I'm stuck with a different problem, when I try 'bash demo' I get:
    'You need to se the environment variable SNOWMIX to the base of the Snowmix directory'
    I saw another post on this but the steps in there didn't work for me. I installed snowmix in /home/share/Snowmix-0.5.0 and in /root/.bashrc I have:export SNOWMIX=/home/share/Snowmix-0.5.0 but still the bash demo command will not work.

     
    • Peter Maersk-Moller

      Hi Tony.

      Running Snowmix as root is probably not a good idea although technically it is possible. That aside, what do you mean when you write "the bash demo command will not work." ?

      The demo script had some issues for version 0.5.0 described here with a fix included https://sourceforge.net/p/snowmix/discussion/Snowmix_Support_Forum/thread/551db9a7/

      Which terminals do you have available on your system (xfce4-terminal gnome-terminal lxterminal lxterm xterm) ? Some of the terminals as described in the link had some issues that can easily be fixed.

      best regards
      Peter

       

      Last edit: Peter Maersk-Moller 2015-11-09
  • Tony G

    Tony G - 2015-11-12

    I wiped centos 7 and reinstalled but now I'm getting a different error, this is the console output:

    $ bash demo
    demo: line 4: [: argument expected
    Looking for gnome-terminal.
    Found gnome-terminal.
    1751
        #################################
        1) basic_feeds
        2) text_tutorial
        3) tm65-virtual_feeds
        4) shape-test (test shape tab in snowcub. select shape place 4)
        5) sapphire-basis (test scene tab in snowcub)
        6) gl_test2 (Needs OpenGL support)
        Please select one of the demos (1/2/3/4/5/6/q) : 1
    basic_feeds
    continuing
    Starting Snowmix
    Error: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dexec_2derror_2dquark.Code8: Failed to execute child process "snowmix" (No such file or directory)
    /bin/gnome-terminal -e av_output2screen
    Error: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dexec_2derror_2dquark.Code8: Failed to execute child process "av_output2screen" (No such file or directory)
    [tony@localhost scripts]$ 1751
    Error: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dexec_2derror_2dquark.Code8: Failed to execute child process "input2feed" (No such file or directory)
    

    don't know what to do here.....

     
    • Peter Maersk-Moller

      Hi Tony.

      1) Did you install Snowmix ? You need to run 'sudo make install'
      2) What is the output of the command 'which snowmix' ?
      3) Have you set the environment variable SNOWMIX ?

      Please take a look at http://snowmix.sourceforge.net/Intro/compileandinstall.html
      Or see the output at the end of the command 'bootstrap'.

      Best regards
      Peter

       
  • Tony G

    Tony G - 2015-11-26

    hi I tried again using fedora 23 and this time I had 'some' success. It installed and I was able to run 'snowmix_demo' and saw something new. However at http://snowmix.sourceforge.net/Intro/compileandinstall.html it says:
    you can run Snowmix by executing the command
    snowmix ini/YOUR_INI_FILE

    what is 'YOUR_INI_FILE'?

     

    Last edit: Tony G 2015-11-26
    • Peter Maersk-Moller

      Hi Tony.

      YOUR_INI_FILE is as elusive as the hard-to-find key in the message "Press any key to continue" :-)

      Anyway YOUR_INI_FILE is a file containing your Snowmix cofiguration. You can find examples of Snowmix ini files in $SNOWMIX/ini/

      See http://snowmix.sourceforge.net/Examples/basic.html for basic ini file examples.

      An ini file is where you configure/specify how you want Snowmix to be configured initially. Here you setup geometry, frame rate, video feeds, audio feeds and elements etc. Typially you also load images and scripts.

      Assume you execute the following command

          snowmix ini/my_ini_file.ini
      

      Snowmix will the look for a file named my_ini_file.ini in the following places in the listed order:

          $SNOWMIX/ini/
          $HOME/ini/
          ./ini/
      

      If it find one, it will read the first file if finds that matches and execute the commands within it.

      best regards

       
  • Tony G

    Tony G - 2015-11-27

    so how would you get snowmix to work with a usb webcam? eg: /dev/video0

     
    • Peter Maersk-Moller

      Hi Tony.

      Please create a new thread when asking a new question unrelated to the thread.

      But to answer your question please see section GStreamer Input From a Web Camera.

      Best regards
      Peter Maersk-Moller

       
    • Peter Maersk-Moller

      Using the example in the link in previous mail, you can add properties. Something like

          gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,width=640,height=480,framerate=30/1' ! ...
      
       

Anonymous
Anonymous

Add attachments
Cancel