Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++14. Let's do this. #1975

Closed
wants to merge 5 commits into from
Closed

C++14. Let's do this. #1975

wants to merge 5 commits into from

Conversation

daniel-j-h
Copy link
Member

Reference: mapbox/windows-builds#78

@BergWerkGIS there's no flag for Visual Studio, is there? The default will be good enough?

Let's see how both Appveyor and Travis like this.

@wilhelmberg
Copy link
Contributor

VS 2015 Update 2 is not yet available as RTM and will still take some time (cannot say how long) for all C++14 features to arrive.

Also, I haven't yet looked into this error:

C:\projects\osrm\src\engine\engine.cpp(90): error C2039: 'shared_lock': is not a member of 'boost'

https://ci.appveyor.com/project/DennisOSRM/osrm-backend/build/1.0.2564#L1705

Has anything related to boost changed in osrm-backend lately?

@daniel-j-h
Copy link
Member Author

Yes 3075f6c

@daniel-j-h
Copy link
Member Author

Disabled the OSX shared lib build. In addition to not finding libosrm, it had a single cucumber test failing: https://travis-ci.org/Project-OSRM/osrm-backend/jobs/108934582#L481

I could not reproduce it locally via

cucumber -p verify features/options/routed/invalid.feature

and all the other builds are fine, too.

@daniel-j-h
Copy link
Member Author

Travis gives okay!

Disclaimer: requires C++14 compiler and stdlib. That is, gcc<=4.8 is out. Also clang<=3.4 is out since it would require -std=c++1y and is probably not mature enough.

Let's require gcc>=4.9, clang>=3.5 and re-write the docs to simply install the gcc 5.3 ppa for older Ubuntus. gcc 4.9 is in Debian Jessie, so we're fine there.

@wilhelmberg
Copy link
Contributor

I got develop and this branch to compile locally with this change:

diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp
index c9fe44e..2949de1 100644
--- a/src/engine/engine.cpp
+++ b/src/engine/engine.cpp
@@ -22,6 +22,7 @@
 #include <boost/assert.hpp>
 #include <boost/interprocess/sync/named_condition.hpp>
 #include <boost/interprocess/sync/scoped_lock.hpp>
+#include <boost/thread/lock_types.hpp>

 #include <algorithm>
 #include <fstream>

Also had to patch boost as it disables some c++11 and c++14 features for Visual Studio by default:

e.g.:

BOOST_NO_CXX11_CONSTEXPR

Uploaded an updated binary deps package.


Tests are failing as it seems that algorithm-test.exe and datastructure-tests.exe don't get generated anymore.

@springmeyer
Copy link
Contributor

Lock types fix landed in #1994

@TheMarex
Copy link
Member

Urg looks like the auto merging f-ed up in this case after rebasing. We run against gcc 5.0 and gcc 4.9 now, right?

@daniel-j-h
Copy link
Member Author

Yes, packages are gcc-5 (which really is gcc 5.3) and gcc-4.9.

@TheMarex
Copy link
Member

@daniel-j-h
Copy link
Member Author

Rebased onto develop.

@TheMarex TheMarex added this to the 5.1.0 milestone Mar 9, 2016
@TheMarex
Copy link
Member

Please reopen the PR for master, develop is going away.

@TheMarex TheMarex closed this Apr 22, 2016
@daniel-j-h daniel-j-h deleted the c++14 branch February 22, 2017 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants