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

 
 

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

Submitted by:  Koop Mast <kwm>
Submitted on:  Sat 22 Apr 2017 04:24:49 PM UTC  
 
Category: building/compilationSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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>
Project 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 File(s):
   
   
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
  • -unavailable- added by benasselstine (Posted a comment)
  • -unavailable- added by kwm (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 14 May 2017 09:22:04 AM UTCNoneAttached File-=>Added patch-src_bigmap.cpp, #40682

    Back to the top


    Powered by Savane 3.1-cleanup1