bugLordsAWar! - Bugs: bug #50853, Build failure after upgrade of...

 
 

bug #50853: Build failure after upgrade of cairomm from 1.10 to 1.12.

Submitter:  Koop Mast <kwm>
Submitted:  Sat 22 Apr 2017 04:24:49 PM UTC
   
 
Category:  building/compilation Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 11 Feb 2021 07:40:42 AM UTC, comment #4: 

Looks like I forgot to close this.
Running fedora 33; it has cairomm-1.12 by default and the compile still works.

Ben Asselstine <benasselstine>
Group administrator
Sun 14 May 2017 09:32:49 AM UTC, comment #3: 

Thanks Koop.

The src/bigmap.cpp file in git has changed in git, so your patch doesn't apply cleanly, but I applied it the best that I could.  Thanks for the help!

I hope you will try to compile against what's in git as it's almost ready for release.

Here's what the patch ended up looking like:

diff --git a/src/bigmap.cpp b/src/bigmap.cpp
index 223390d..d6cd522 100644
--- a/src/bigmap.cpp
+++ b/src/bigmap.cpp
@@ -70,7 +70,7 @@ BigMap::BigMap(bool headless)
 
 BigMap::~BigMap()
 {
-    if (buffer == true)
+    if (buffer)
       buffer.clear();
 
     delete d_renderer;
@@ -112,7 +112,7 @@ void BigMap::set_view(Rectangle new_view)
     // this represents a 1 tile border around the outside of the picture.
     // it gets rid of the black border.
 
-    if (buffer == true)
+    if (buffer)
       buffer.clear();
    
     buffer_view.dim = view.dim + Vector<int>(2, 2);
@@ -122,7 +122,7 @@ void BigMap::set_view(Rectangle new_view)
     buffer_gc = Cairo::Context::create(buffer);
 
     now create the part that will go out to the gtk::image
-    if (outgoing == true)
+    if (outgoing)
       outgoing.clear();
     outgoing = Cairo::Surface::create(buffer, Cairo::CONTENT_COLOR_ALPHA, image.get_width(), image.get_height());

Ben Asselstine <benasselstine>
Group administrator
Sun 14 May 2017 09:25:05 AM UTC, comment #2: 

That patch was just submitted is mine, it just that I'm not familiar with savannah's system that I didn't notice it wasn't logged in.

Koop Mast <kwm>
Sat 22 Apr 2017 04:30:59 PM UTC, comment #1: 

I compile against cairomm-1.12 in git head with gcc.

I suspect you're running into Clang problems, and for those errors you're on your own.  Sorry.

Btw the next release of lordsawar is really shaping up!

Ben Asselstine <benasselstine>
Group administrator
Sat 22 Apr 2017 04:24:49 PM UTC, original submission:  

Lordsawar 0.3.1 fails building on FreeBSD with the Clang compiler, when cairomm is updated from 1.10 to 1.12.2.

In file included from bigmap.cpp:40:
In file included from ./playerlist.h:29:
./game-parameters.h:120:5: warning: control may reach end of non-void function
      [-Wreturn-type]
    }
    ^
bigmap.cpp:70:16: error: invalid operands to binary expression
      ('Cairo::RefPtr<Cairo::Surface>' and 'int')
    if (buffer == true)
        ~~~~~~ ^  ~~~~
/usr/local/include/cairomm-1.0/cairomm/refptr.h:123:15: note: candidate function
      not viable: no known conversion from 'bool' to 'const
      RefPtr<Cairo::Surface>' for 1st argument
  inline bool operator==(const RefPtr<T_CppObject>& src) const noexcept;
              ^
./rectangle.h:50:13: note: candidate function not viable: no known conversion
      from 'Cairo::RefPtr<Cairo::Surface>' to 'const Rectangle' for 1st argument
inline bool operator==(const Rectangle &lhs, const Rectangle &rhs)
            ^
./vector.h:136:13: note: candidate template ignored: could not match 'Vector'
      against 'RefPtr'
inline bool operator ==(Vector<T> lhs, Vector<T> rhs)
            ^
bigmap.cpp:73:26: error: invalid operands to binary expression
      ('Cairo::RefPtr<Cairo::Surface>' and 'int')
    if (magnified_buffer == true)
        ~~~~~~~~~~~~~~~~ ^  ~~~~
/usr/local/include/cairomm-1.0/cairomm/refptr.h:123:15: note: candidate function
      not viable: no known conversion from 'bool' to 'const
      RefPtr<Cairo::Surface>' for 1st argument
  inline bool operator==(const RefPtr<T_CppObject>& src) const noexcept;
              ^
./rectangle.h:50:13: note: candidate function not viable: no known conversion
      from 'Cairo::RefPtr<Cairo::Surface>' to 'const Rectangle' for 1st argument
inline bool operator==(const Rectangle &lhs, const Rectangle &rhs)
            ^
./vector.h:136:13: note: candidate template ignored: could not match 'Vector'
      against 'RefPtr'
inline bool operator ==(Vector<T> lhs, Vector<T> rhs)
            ^
bigmap.cpp:115:16: error: invalid operands to binary expression
      ('Cairo::RefPtr<Cairo::Surface>' and 'int')
    if (buffer == true)
        ~~~~~~ ^  ~~~~
/usr/local/include/cairomm-1.0/cairomm/refptr.h:123:15: note: candidate function
      not viable: no known conversion from 'bool' to 'const
      RefPtr<Cairo::Surface>' for 1st argument
  inline bool operator==(const RefPtr<T_CppObject>& src) const noexcept;
              ^
./rectangle.h:50:13: note: candidate function not viable: no known conversion
      from 'Cairo::RefPtr<Cairo::Surface>' to 'const Rectangle' for 1st argument
inline bool operator==(const Rectangle &lhs, const Rectangle &rhs)
            ^
./vector.h:136:13: note: candidate template ignored: could not match 'Vector'
      against 'RefPtr'
inline bool operator ==(Vector<T> lhs, Vector<T> rhs)
            ^
bigmap.cpp:125:18: error: invalid operands to binary expression
      ('Cairo::RefPtr<Cairo::Surface>' and 'int')
    if (outgoing == true)
        ~~~~~~~~ ^  ~~~~
/usr/local/include/cairomm-1.0/cairomm/refptr.h:123:15: note: candidate function
      not viable: no known conversion from 'bool' to 'const
      RefPtr<Cairo::Surface>' for 1st argument
  inline bool operator==(const RefPtr<T_CppObject>& src) const noexcept;
              ^
./rectangle.h:50:13: note: candidate function not viable: no known conversion
      from 'Cairo::RefPtr<Cairo::Surface>' to 'const Rectangle' for 1st argument
inline bool operator==(const Rectangle &lhs, const Rectangle &rhs)
            ^
./vector.h:136:13: note: candidate template ignored: could not match 'Vector'
      against 'RefPtr'
inline bool operator ==(Vector<T> lhs, Vector<T> rhs)
            ^
bigmap.cpp:177:23: error: invalid operands to binary expression
      ('Cairo::RefPtr<Cairo::Surface>' and 'int')
        if (magnified_buffer == true)
            ~~~~~~~~~~~~~~~~ ^  ~~~~
/usr/local/include/cairomm-1.0/cairomm/refptr.h:123:15: note: candidate function
      not viable: no known conversion from 'bool' to 'const
      RefPtr<Cairo::Surface>' for 1st argument
  inline bool operator==(const RefPtr<T_CppObject>& src) const noexcept;
              ^
./rectangle.h:50:13: note: candidate function not viable: no known conversion
      from 'Cairo::RefPtr<Cairo::Surface>' to 'const Rectangle' for 1st argument
inline bool operator==(const Rectangle &lhs, const Rectangle &rhs)
            ^
./vector.h:136:13: note: candidate template ignored: could not match 'Vector'
      against 'RefPtr'
inline bool operator ==(Vector<T> lhs, Vector<T> rhs)
            ^
1 warning and 5 errors generated.

Koop Mast <kwm>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #40682:  patch-src_bigmap.cpp added by None (1KiB - application/octet-stream - Build fix for cairomm 1.12 and clang combination)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by benasselstine (Posted a comment)
  • -email is unavailable- added by kwm (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-02-11 benasselstine Open/ClosedOpen Closed
    2017-05-14 None Attached File- Added patch-src_bigmap.cpp, #40682

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code