Opened 8 years ago

Closed 8 years ago

#10863 closed Bugs (fixed)

Geometry and asio includes cause compilation errors.

Reported by: tyss.k@… Owned by: Barend Gehrels
Milestone: Boost 1.58.0 Component: geometry
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

Including

#include <boost/asio.hpp>
#include <boost/geometry.hpp>

causes compilation errors. Everything is fine if includes are reordered:

#include <boost/geometry.hpp>
#include <boost/asio.hpp>

Error also ocurres in boost 1.56.0. Boost 1.55.0 is fine.

Attachments (3)

suse-gcc-4.8-boost-1.56.txt (15.4 KB ) - added by tyss.k@… 8 years ago.
arm-gcc-4.9-boost-1.56.txt (23.1 KB ) - added by tyss.k@… 8 years ago.
arm-gcc-4.9-boost-1.57.0.txt (24.8 KB ) - added by tyss.k@… 8 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by awulkiew, 8 years ago

It's surprising. Could you provide more information? What compiler are you using? Could you prepare some short but complete example of a failing code? Or at least paste the compiler output.

I can't reproduce the problem. My code is very simple though. It compiles in msvc10 and mingw4.9.1.

#include <boost/asio.hpp>
#include <boost/geometry.hpp>

#include <boost/geometry/geometries/point.hpp>

namespace bg = boost::geometry;

int main()
{
    boost::asio::io_service io_service;

    using boost::asio::ip::tcp;
    tcp::resolver resolver(io_service);
    tcp::resolver::query query(tcp::v4(), "127.0.0.1", "7");

    bg::model::point<double, 2, bg::cs::cartesian> p1, p2;
    bg::equals(p1, p2);
}

by tyss.k@…, 8 years ago

Attachment: suse-gcc-4.8-boost-1.56.txt added

by tyss.k@…, 8 years ago

Attachment: arm-gcc-4.9-boost-1.56.txt added

by tyss.k@…, 8 years ago

comment:2 by anonymous, 8 years ago

I compiled your example on my machine and attached my compiler output. I still get the error. I compiled your code with following configurations:

  • gcc 4.8.3 and boost 1.56 (suse-gcc-4.8-boost-1.56.txt)
  • cross gcc for arm 4.9.1 and boost 1.56 (arm-gcc-4.9-boost-1.56.txt)
  • cross gcc for arm 4.9.1 and boost 1.57.0 (arm-gcc-4.9-boost-1.57.0.txt)

However your code compiles if I use boost 1.55 with both compilers. I hope that helps.

comment:3 by tyss.k@…, 8 years ago

Sorry. Forgot to sign my comment. It was still me :)

comment:4 by anonymous, 8 years ago

Likely caused by POSIX termios.h which #defines B0 and similar constants.

comment:5 by awulkiew, 8 years ago

Milestone: To Be DeterminedBoost 1.58.0
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.