bincrafters / community

Central repository for issues and recipes
http://bincrafters.readthedocs.io/en/latest/
MIT License
218 stars 36 forks source link

Update date to 2.4.1 and fix Linux and OS X CI builds #420

Closed mbeach closed 6 years ago

mbeach commented 6 years ago

Description of Problem, Request, or Question

I've submitted pull request bincrafters/conan-date#2.

It updates to version 2.4.1 of the upstream https://github.com/HowardHinnant/date.

It also gets the CI builds going for Linux and OS X. To do this I've created a minimal zoneinfo database (by copying a single public domain file from beneath /usr/share/zoneinfo on Ubuntu Bionic). Note that I've also had to disable the CI builds for clang 5.0 on Linux, as the combination of compiler and libc++ versions on this Docker image confuses the build. I have an upstream pull request to fix this (HowardHinnant/date#376) so hopefully this build can be re-enabled in the near future.

I expect to get Windows builds working shortly, and will submit a further pull request.

uilianries commented 6 years ago

Hi @mbeach

I merged your changes into 2.4.1

uilianries commented 6 years ago

Looks like MSVC 12 does not support date:

c:\users\appveyor.conan\data\date\2.4.1\bincrafters\testing\build\e9e8e964aab887b50c81671ea783978ac6f4cb4b\source_folder\include\date\tz.h(1267): error C3646: 'noexcept' : unknown override specifier [C:\Users\appveyor.conan\data\date\2.4.1\bincrafters\testing\build\e9e8e964aab887b50c81671ea783978ac6f4cb4b\source_folder\tz.vcxproj]

unfortunately noexcept is not supported:

https://msdn.microsoft.com/en-us/library/hh567368.aspx?f=255&MSPPError=-2147217396#stl

uilianries commented 6 years ago

Both Linux and Macos are working:

https://travis-ci.org/bincrafters/conan-date/builds/424600985

acgetchell commented 6 years ago

Yes, I also cannot get date 2.4.0 to build on AppVeyor because it's not finding string_view.

Visual Studio 2015: https://ci.appveyor.com/project/acgetchell/cdt-plusplus/build/job/on7q0tcnslfbvsmg#L6468

Visual Studio 2017: https://ci.appveyor.com/project/acgetchell/cdt-plusplus/build/job/by7sovsh7m37rnuc#L6461

mbeach commented 6 years ago

@acgetchell I just had a look at those AppVeyor links, and they don't look to me like builds with VS 2015 or VC 2017. It looks like you're building with clang, but using libraries, headers etc from VS 2014. In this case, it's not surprising to me that the build tries and fails to find string_view -- it's not supported until VS 2017 15.7 (see https://blogs.msdn.microsoft.com/vcblog/2018/05/07/announcing-msvc-conforms-to-the-c-standard/) so the header will not be present in the include files you are using. However the clang version you're using does support C++17 (ie the language features), so when the date library tests __cplusplus it sees that C++17 should be supported it assumes that it can use string_view. Unfortunately, since you're using a C++17 compliant compiler with a non-compliant runtime, it assumes wrongly and the build dies horribly. I had a similar when trying to get date building with clang 5.0 on Linux; see my pull request https://github.com/HowardHinnant/date/pull/376 for more details.

uilianries commented 6 years ago

I just push date 2.4.1 on stable branch, but it does not support Windows yet.

This discussion is getting longer and Linux/Macos users could use conan-date without be affected by bad windows support on our side.

SSE4 commented 6 years ago

date/2.4.1 is available and builds for all supported platforms