Ubuntu compilation broked

Bug #1830612 reported by Hildo Guillardi Júnior
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
John Beard

Bug Description

Ubuntu 16 (Xenial) Nightly compilation is broken since two packages ago.
https://launchpad.net/~js-reynaud/+archive/ubuntu/ppa-kicad/+packages

Tags: packaging
Revision history for this message
Nick Østergaard (nickoe) wrote :

The build error is:
https://launchpadlibrarian.net/425499673/buildlog_ubuntu-xenial-amd64.kicad_201905270102+638ac38~86~ubuntu16.04.1_BUILDING.txt.gz

(long lines being warped here:)

6846 /usr/include/boost/test/utils/wrap_stringstream.hpp:66:19: error: no match for ‘operator<<’ (operand types are ‘boost::basic_wrap_stringstream<char>::wrapped_stream {aka std::__cxx11::basic_ostringstream<char>}’ and ‘const wxPoint’)

Changed in kicad:
milestone: none → 6.0.0-rc1
Revision history for this message
Jon Evans (craftyjon) wrote :

cc @John
The actual error is from qa/eeschema/test_sch_sheet.cpp:237

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

Is this a piece of code that just goes into the Ubuntu 16 compilation? Also Ubuntu 14 is not compiling since few weeks ago.

Revision history for this message
Jon Evans (craftyjon) wrote :

Ubuntu 14.04 will not be supported by KiCad v6 (including current nightlies) as it is end-of-life -- it has outdated libraries that no longer work and we don't have the resources to test and maintain support.

Ubuntu 16.04 is still supported; I'm guessing something about the boost version on Ubuntu 16.04 is triggering this bug.

Revision history for this message
John Beard (john-j-beard) wrote :

I see what's going on here:

* The definition of the operator<< for wxPoint is surrounded by #ifdef DEBUG
* The BOOST_CHECK_EQUAL_COLLECTIONS macro requires this operator in Boost 1.58 (print_log_value<wxPoint> is used in 1.59 and higher)

Thus, this breaks if there is a Release build with Boost 1.58 or lower. Which explains why Jenkins and my own 16.04 builds didn't see it: they are Debug builds.

My feeling is the best way to fix this is not to ifdef out the operator<< code in the first place, as having such functions silently disappear depending on defines is dangerous for exactly this reason. I assume they are ifdeffed out in some attempt at optimisation?

----

Ref: base_struct.h:41

#if defined(DEBUG)
#include <iostream> // needed for Show()

extern std::ostream& operator <<( std::ostream& out, const wxSize& size );

extern std::ostream& operator <<( std::ostream& out, const wxPoint& pt );
#endif

Revision history for this message
Jon Evans (craftyjon) wrote :

I'm on board with not ifdef'ing them out, that doesn't seem like a useful "optimization".

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

Will this fix be present in today's compilation? (Just asking because I am waiting the Nightly to test other fixes).

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 6b4b2d61f8af7f75710e57157a9d50ee07293bf0
https://git.launchpad.net/kicad/patch/?id=6b4b2d61f8af7f75710e57157a9d50ee07293bf0

Changed in kicad:
status: New → Fix Committed
assignee: nobody → John Beard (john-j-beard)
Revision history for this message
John Beard (john-j-beard) wrote :

I have just pushed a fix for this, which seems to work fine on Linux, MSVC and Msys2. I guess we'll see if the PPA build goes though. I don't know what time the build triggers.

Revision history for this message
Jean-Samuel Reynaud (js-reynaud) wrote :

Build are planed automatically by launchpad. Generally occur around 01h00 UTC.

Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.