From 5f0425495b95171b0bcb9da667c2bee97ebafac3 Mon Sep 17 00:00:00 2001 From: Chase Geigle Date: Wed, 7 Jun 2017 13:49:52 -0500 Subject: [PATCH 1/7] Travis: update GCC version on OS X build. --- .travis.yml | 2 +- travis/install_osx.sh | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index b99e99d6f..ef8866c66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -111,7 +111,7 @@ matrix: osx_image: xcode8.2 env: COMPILER=clang - # OS X/GCC 6 + # OS X/GCC 7 - os: osx osx_image: xcode7.3 env: COMPILER=gcc diff --git a/travis/install_osx.sh b/travis/install_osx.sh index 72e22de67..95ccb831d 100755 --- a/travis/install_osx.sh +++ b/travis/install_osx.sh @@ -10,10 +10,9 @@ else fi if [ "$COMPILER" == "gcc" ]; then - brew tap homebrew/versions - brew install homebrew/versions/gcc6 - export CC=gcc-6 - export CXX=g++-6 + brew install gcc@7 + export CC=gcc-7 + export CXX=g++-7 fi if [ "$COMPILER" == "clang" ]; then From 778ab90d8aef83f2cd306ad343b4333296a856a8 Mon Sep 17 00:00:00 2001 From: Chase Geigle Date: Wed, 7 Jun 2017 16:54:19 -0500 Subject: [PATCH 2/7] AppVeyor: fix build error on upgrading gcc. --- .appveyor.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 35251ffc6..cbaa031d5 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -8,9 +8,11 @@ install: - set MSYSTEM=MINGW64 - bash -lc "" - bash -lc "pacman --noconfirm --needed -Sy bash pacman pacman-mirrors msys2-runtime msys2-runtime-devel" + # kludge for error: "mingw-w64-x86_64-gcc: /mingw64/etc/gdbinit exists in filesystem" + - bash -lc "rm -f /mingw64/etc/gdbinit" # we don't actually need ada, fortran, libgfortran, or objc, but in # order to update gcc we need to also update those packages as well... - - bash -lc "pacman --noconfirm -S mingw-w64-x86_64-{gcc,gcc-ada,gcc-fortran,gcc-libgfortran,gcc-objc,cmake,make,icu,jemalloc,zlib}" + - bash -lc "pacman --noconfirm --needed -S mingw-w64-x86_64-{gcc,gcc-ada,gcc-fortran,gcc-libgfortran,gcc-objc,cmake,make,icu,jemalloc,zlib}" before_build: - set MSYSTEM=MINGW64 - cd C:\projects\meta From 494b480ef6ea73f701c87506afe1a493df3025c4 Mon Sep 17 00:00:00 2001 From: Chase Geigle Date: Mon, 17 Jul 2017 20:50:03 -0500 Subject: [PATCH 3/7] Fix GCC 7.1.1 issue with MAKE_NUMERIC_IDENTIFIER. This is a *super bizarre* issue. This only appears if you use MAKE_NUMERIC_IDENTIFIER instead of MAKE_NUMERIC_IDENTIFIER_UDL, and only in some very specific circumstances. GCC seems to think that numeric_identifier is not copyable, but only in some cases, some of the time. See this Gist for an example: https://gist.github.com/skystrife/2e23a0f3fbc709b8d11d3a8c59c64e4a Change pretty much any one thing in the example and the error goes away. Make the constructor not a template? No error. Remove the increment line in the constructor? No error. Define a user defined literal after the definition of topic_id? No error. Put the each_seen_event() function call into the constructor and remove the non-template function? No error. I have no idea what is going on, other than that GCC 7.1.1 is just somehow very broken. --- include/meta/util/identifiers.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/meta/util/identifiers.h b/include/meta/util/identifiers.h index 3814713e0..da4417e52 100644 --- a/include/meta/util/identifiers.h +++ b/include/meta/util/identifiers.h @@ -185,6 +185,14 @@ struct numerical_identifier : public identifier, numeric using identifier::id_; using identifier::operator=; + // these shouldn't be needed, but GCC 7.1.1 is doing weird things when + // using MAKE_NUMERIC_IDENTIFIER instead of MAKE_NUMERIC_IDENTIFIER_UDL + // and explicitly defaulting these ctors/operators makes it go away... + numerical_identifier(const numerical_identifier&) = default; + numerical_identifier(numerical_identifier&&) = default; + numerical_identifier& operator=(const numerical_identifier&) = default; + numerical_identifier& operator=(numerical_identifier&&) = default; + /** * Prefix-increment. * @return the current identifier after being incremented From 925f739eb1f780386dd77aca04d43236622fda03 Mon Sep 17 00:00:00 2001 From: Chase Geigle Date: Mon, 17 Jul 2017 21:04:13 -0500 Subject: [PATCH 4/7] Silence GCC 7.1.1 implicit fallthrough warnings. --- include/meta/hashing/hashes/murmur_hash.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/meta/hashing/hashes/murmur_hash.h b/include/meta/hashing/hashes/murmur_hash.h index caa5472bc..2db1f1006 100644 --- a/include/meta/hashing/hashes/murmur_hash.h +++ b/include/meta/hashing/hashes/murmur_hash.h @@ -139,8 +139,10 @@ class murmur_hash<4> { case 3: k1 ^= static_cast(buf_[2]) << 16; + // fallthrough case 2: k1 ^= static_cast(buf_[1]) << 8; + // fallthrough case 1: k1 ^= buf_[0]; k1 *= c1; @@ -248,37 +250,51 @@ class murmur_hash<8> { case 15: k2 ^= static_cast(buf_[14]) << 48; + // fallthrough case 14: k2 ^= static_cast(buf_[13]) << 40; + // fallthrough case 13: k2 ^= static_cast(buf_[12]) << 32; + // fallthrough case 12: k2 ^= static_cast(buf_[11]) << 24; + // fallthrough case 11: k2 ^= static_cast(buf_[10]) << 16; + // fallthrough case 10: k2 ^= static_cast(buf_[9]) << 8; + // fallthrough case 9: k2 ^= static_cast(buf_[8]); k2 *= c2; k2 = murmur::rotl(k2, 33); k2 *= c1; h2_ ^= k2; + // fallthrough case 8: k1 ^= static_cast(buf_[7]) << 56; + // fallthrough case 7: k1 ^= static_cast(buf_[6]) << 48; + // fallthrough case 6: k1 ^= static_cast(buf_[5]) << 40; + // fallthrough case 5: k1 ^= static_cast(buf_[4]) << 32; + // fallthrough case 4: k1 ^= static_cast(buf_[3]) << 24; + // fallthrough case 3: k1 ^= static_cast(buf_[2]) << 16; + // fallthrough case 2: k1 ^= static_cast(buf_[1]) << 8; + // fallthrough case 1: k1 ^= static_cast(buf_[0]); k1 *= c1; From 4b6a514c13079ab810098e9d92838cf73cfd9500 Mon Sep 17 00:00:00 2001 From: Chase Geigle Date: Mon, 17 Jul 2017 21:15:30 -0500 Subject: [PATCH 5/7] Explicitly default the default ctor for numerical_identifier. --- include/meta/util/identifiers.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/meta/util/identifiers.h b/include/meta/util/identifiers.h index da4417e52..78689eb51 100644 --- a/include/meta/util/identifiers.h +++ b/include/meta/util/identifiers.h @@ -188,6 +188,7 @@ struct numerical_identifier : public identifier, numeric // these shouldn't be needed, but GCC 7.1.1 is doing weird things when // using MAKE_NUMERIC_IDENTIFIER instead of MAKE_NUMERIC_IDENTIFIER_UDL // and explicitly defaulting these ctors/operators makes it go away... + numerical_identifier() = default; numerical_identifier(const numerical_identifier&) = default; numerical_identifier(numerical_identifier&&) = default; numerical_identifier& operator=(const numerical_identifier&) = default; From 8fdc6b491a4126bc488b6ab7863d4a344aa24c6e Mon Sep 17 00:00:00 2001 From: Chase Geigle Date: Sat, 19 Aug 2017 17:48:38 -0500 Subject: [PATCH 6/7] [io]: build mman.c as a shared library on Windows This is a hack to work around additional implicit link libraries being generated by cmake 3.9.1-1 in MSYS2 for static libraries containing C code. This addition causes strange, difficult to debug, segmentation faults, and building mman.c as a shared library is a workaround currently. --- src/io/CMakeLists.txt | 8 +++++--- src/io/mman-win32/CMakeLists.txt | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 src/io/mman-win32/CMakeLists.txt diff --git a/src/io/CMakeLists.txt b/src/io/CMakeLists.txt index a44baf267..67f91d169 100644 --- a/src/io/CMakeLists.txt +++ b/src/io/CMakeLists.txt @@ -6,9 +6,6 @@ set(META_IO_SOURCES filesystem.cpp gzstream.cpp libsvm_parser.cpp mmap_file.cpp) -if (WIN32) - list(APPEND META_IO_SOURCES mman-win32/mman.c) -endif() if (META_HAS_LIBLZMA) list(APPEND META_IO_SOURCES xzstream.cpp) @@ -17,6 +14,11 @@ endif() add_library(meta-io ${META_IO_SOURCES}) target_link_libraries(meta-io meta-util ${ZLIB_LIBRARIES}) +if (WIN32) + add_subdirectory(mman-win32) + target_link_libraries(meta-io meta-mman-win32) +endif() + if (META_HAS_EXPERIMENTAL_FILESYSTEM) target_link_libraries(meta-io ${STD_EXPERIMENTAL_FILESYSTEM_LIBRARIES}) else() diff --git a/src/io/mman-win32/CMakeLists.txt b/src/io/mman-win32/CMakeLists.txt new file mode 100644 index 000000000..04d2ca984 --- /dev/null +++ b/src/io/mman-win32/CMakeLists.txt @@ -0,0 +1,16 @@ +project(meta-mman-win32) + +# The below is currently marked as SHARED because as of cmake 3.9.1-1 of +# MSYS2, linking against a static library that has C code in it adds +# "-lgcc_eh -lgcc_eh" to the linker line, which causes difficult-to-debug +# (due to corrupted stack frames) segmentation faults when attempting to +# create indexes. Marking it as a shared library and linking against that +# does *not* add the "-lgcc_eh -lgcc_eh" to the linker line, and the issues +# disappear. Since these lines weren't added prior to cmake 3.9.1-1, there +# were no problems with the previous approach before then. +add_library(meta-mman-win32 SHARED mman.c) +target_link_libraries(meta-mman-win32 meta-definitions) + +install(TARGETS meta-mman-win32 + EXPORT meta-exports + DESTINATION lib) From cabb6bdaa98663dd814f2e5c5a0ac0497069f9ce Mon Sep 17 00:00:00 2001 From: Chase Geigle Date: Sat, 19 Aug 2017 19:48:21 -0500 Subject: [PATCH 7/7] [release]: update CHANGELOG and bump version for v3.0.2 --- CHANGELOG.md | 12 +++++++++++- CMakeLists.txt | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c411600c9..e7174a51a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# [v3.0.2][3.0.2] +## Bug fixes +- Fix issues using `MAKE_NUMERIC_IDENTIFIER` instead of + `MAKE_NUMERIC_IDENTIFIER_UDL` on GCC 7.1.1. +- Work around (what we assume is) a bug on MSYS2 where `cmake` would link + in additional exception handling libraries that would cause a crash + during indexing by building the `mman-win32` library as shared. +- Silence fallthrough warnings on Clang from `murmur_hash`. + # [v3.0.1][3.0.1] ## New features - Add an optional `xz{i,o}fstream` to `meta::io` if compiled with liblzma @@ -628,7 +637,8 @@ # [v1.0][1.0] - Initial release. -[unreleased]: https://github.com/meta-toolkit/meta/compare/v3.0.1...develop +[unreleased]: https://github.com/meta-toolkit/meta/compare/v3.0.2...develop +[3.0.2]: https://github.com/meta-toolkit/meta/compare/v3.0.1...v3.0.2 [3.0.1]: https://github.com/meta-toolkit/meta/compare/v3.0.0...v3.0.1 [3.0.0]: https://github.com/meta-toolkit/meta/compare/v2.4.2...v3.0.0 [2.4.2]: https://github.com/meta-toolkit/meta/compare/v2.4.1...v2.4.2 diff --git a/CMakeLists.txt b/CMakeLists.txt index 69175d035..f6206ee1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS 1) set(MeTA_VERSION_MAJOR 3) set(MeTA_VERSION_MINOR 0) -set(MeTA_VERSION_PATCH 1) +set(MeTA_VERSION_PATCH 2) set(MeTA_VERSION "${MeTA_VERSION_MAJOR}.${MeTA_VERSION_MINOR}.${MeTA_VERSION_PATCH}")