diff options
author | Lutz Bichler <Lutz.Bichler@bmw.de> | 2014-09-24 13:38:34 +0200 |
---|---|---|
committer | Lutz Bichler <Lutz.Bichler@bmw.de> | 2014-09-24 13:38:34 +0200 |
commit | 7671fffee2d20a66691c4eae3c615b557525be1b (patch) | |
tree | b889ef5056dda7c703edc57ee570cb874c3d3b2c | |
parent | 55279c993bc705c8e2a0024054d1425e3f22ba80 (diff) | |
download | vSomeIP-7671fffee2d20a66691c4eae3c615b557525be1b.tar.gz |
[PATCH 8/8] include iostream headers to build with boost 1.56.0
When building vsomeip against boost version 1.56.0, the build fails with:
Building CXX object CMakeFiles/vsomeip.dir/implementation/routing/src/routing_manager_stub.cpp.o
Building CXX object CMakeFiles/vsomeip.dir/implementation/runtime/src/application_impl.cpp.o
...
[...]/implementation/runtime/src/application_impl.cpp: In member function 'virtual void vsomeip::application_impl::on_error(vsomeip::error_code_e)':
[...]/implementation/runtime/src/application_impl.cpp:302:2: error: 'cerr' is not a member of 'std'
std::cerr << "ERROR " << (int) _error << std::endl;
^
[...]/implementation/routing/src/routing_manager_stub.cpp: In member function 'void vsomeip::routing_manager_stub::on_pong(vsomeip::client_t)':
[...]/implementation/routing/src/routing_manager_stub.cpp:331:3: error: 'cerr' is not a member of 'std'
std::cerr << "Received PONG from unregistered application!"
^
make[2]: *** [CMakeFiles/vsomeip.dir/implementation/routing/src/routing_manager_stub.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/vsomeip.dir/implementation/runtime/src/application_impl.cpp.o] Error 1
...
make[1]: *** [CMakeFiles/vsomeip.dir/all] Error 2
make: *** [all] Error 2
and similarly during the build of the configuration test:
[...]/test/configuration-test.cpp: In function 'int main(int, char**)':
[...]/test/configuration-test.cpp:77:3: error: 'cerr' is not a member of 'std'
std::cerr << "Usage: " << argv[0] << " --someip <path>" << std::endl;
^
make[2]: *** [CMakeFiles/configuration-test.dir/test/configuration-test.cpp.o] Error 1
make[1]: *** [CMakeFiles/configuration-test.dir/all] Error 2
make: *** [all] Error 2
The vsomeip build with the same build setup, namely the
bitbake/OpenEmbedded-Core tool chain, but with boost version 1.55.0
does not fail. Probably in version 1.55.0, the boost libraries that
vsomeip depends on include the iostream header, which defines the
std::cerr function, whereas in version 1.56.0, these boost
libraries do not include the header any longer.
Hence, this commit includes the iostream header in the three cpp
files that caused the build to fail. It was tested that when this
commit is applied, the vsomeip build succeeds with boost versions
1.55.0 and 1.56.0.
This issue was discovered while creating a bitbake/OpenEmbedded
recipe for vsomeip due to the PANDA project activities. Through
`git bisect` on the OpenEmbedded-Core repository, the build failure
with later versions of OpenEmbedded-Core could be tracked down to
the OpenEmbedded-Core commit
a6afd754290cecbe57392d13477557051b438817 (boost: Upgrade to 1.56.0),
which led to the speculation of the reason above.
Signed-off-by: Lukas Bulwahn, BMW Car IT GmbH <Lukas.Bulwahn@bmw.de>
-rw-r--r-- | implementation/routing/src/routing_manager_stub.cpp | 1 | ||||
-rw-r--r-- | implementation/runtime/src/application_impl.cpp | 1 | ||||
-rw-r--r-- | test/configuration-test.cpp | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/implementation/routing/src/routing_manager_stub.cpp b/implementation/routing/src/routing_manager_stub.cpp index 54efa1a..fe769d2 100644 --- a/implementation/routing/src/routing_manager_stub.cpp +++ b/implementation/routing/src/routing_manager_stub.cpp @@ -7,6 +7,7 @@ #include <chrono> #include <functional> #include <iomanip> +#include <iostream> #include <boost/system/error_code.hpp> diff --git a/implementation/runtime/src/application_impl.cpp b/implementation/runtime/src/application_impl.cpp index b6a9997..1416c36 100644 --- a/implementation/runtime/src/application_impl.cpp +++ b/implementation/runtime/src/application_impl.cpp @@ -5,6 +5,7 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include <thread> +#include <iostream> #include <vsomeip/configuration.hpp> #include <vsomeip/defines.hpp> diff --git a/test/configuration-test.cpp b/test/configuration-test.cpp index ba82ad6..03df48f 100644 --- a/test/configuration-test.cpp +++ b/test/configuration-test.cpp @@ -4,6 +4,8 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. +#include <iostream> + #include <vsomeip/configuration.hpp> #include <vsomeip/constants.hpp> #include <vsomeip/logger.hpp> |