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

Building exiv2 0.27.xxx on MSYS2 #1102

Closed
gaaned92 opened this issue Feb 15, 2020 · 17 comments
Closed

Building exiv2 0.27.xxx on MSYS2 #1102

gaaned92 opened this issue Feb 15, 2020 · 17 comments
Assignees
Labels
CMake Configuration issues related with CMake windows Windows Specific issues
Milestone

Comments

@gaaned92
Copy link

Context:
see https://discuss.pixls.us/t/art-v1-0-is-out/16103/155
"the official exiv2 version in Mingw seems broken, or at least miscompiled. it seems libexiv2.dll doesn’t properly raise exceptions on error. if I compile it myself, everything works"

The tag 0.27.2 builds ok on Mingw64 even if I get warnings.

As it is rather old, I tried to build 0.27.-maintenance branch commit hash 5360d82, hoping to benefit from last updates in metadata decoding.
Unfortunately I get errors.

cmake step:

-- The CXX compiler identification is GNU 9.2.0
-- The C compiler identification is GNU 9.2.0
-- Check for working CXX compiler: C:/msys64/mingw64/bin/g++.exe
-- Check for working CXX compiler: C:/msys64/mingw64/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found ZLIB: C:/msys64/mingw64/lib/libz.dll.a (found version "1.2.11")
-- Found EXPAT: C:/msys64/mingw64/lib/libexpat.dll.a (found version "2.2.9")
-- Found Iconv: C:/msys64/mingw64/lib/libiconv.dll.a
-- ICONV_INCLUDE_DIR : C:/msys64/mingw64/include
-- ICONV_LIBRARIES : C:/msys64/mingw64/lib/libiconv.dll.a
-- Looking for gmtime_r
-- Looking for gmtime_r - not found
-- Looking for mmap
-- Looking for mmap - not found
-- Looking for munmap
-- Looking for munmap - not found
-- Looking for strerror_r
-- Looking for strerror_r - not found
-- Performing Test EXV_STRERROR_R_CHAR_P
-- Performing Test EXV_STRERROR_R_CHAR_P - Failed
-- Looking for C++ include memory.h
-- Looking for C++ include memory.h - found
-- Looking for C++ include process.h
-- Looking for C++ include process.h - found
-- Looking for C++ include stdbool.h
-- Looking for C++ include stdbool.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for C++ include strings.h
-- Looking for C++ include strings.h - found
-- Looking for C++ include sys/stat.h
-- Looking for C++ include sys/stat.h - found
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include inttypes.h
-- Looking for C++ include inttypes.h - found
-- Looking for C++ include unistd.h
-- Looking for C++ include unistd.h - found
-- Looking for C++ include sys/mman.h
-- Looking for C++ include sys/mman.h - not found
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Install prefix:    D:/PROGRAMMES/exiv2source/install64
-- ------------------------------------------------------------------
-- CMake Generator:   MSYS Makefiles
-- CMAKE_BUILD_TYPE:  Release
-- Compiler info: GNU (C:/msys64/mingw64/bin/g++.exe) ; version: 9.2.0
--  --- Compiler flags ---
-- General:
         -Wp,-D_GLIBCXX_ASSERTIONS
         -Wp,-D_FORTIFY_SOURCE=2
         -Wall
         -Wcast-align
         -Wpointer-arith
         -Wformat-security
         -Wmissing-format-attribute
         -Woverloaded-virtual
         -W
-- Extra:
-- Debug:             -g3 -gstrict-dwarf -O0
-- Release:           -O3 -DNDEBUG
-- RelWithDebInfo:    -O2 -g -DNDEBUG
-- MinSizeRel:        -Os -DNDEBUG
--  --- Linker flags ---
-- General:
-- Debug:
-- Release:
-- RelWithDebInfo:
-- MinSizeRel:
--
-- Compiler Options
-- Warnings as errors:                 NO
-- Use extra compiler warning flags:   NO
--
-- ------------------------------------------------------------------
-- Building shared library:            YES
-- Building PNG support:               YES
-- XMP metadata support:               YES
-- Native language support:            NO
-- Conversion of Windows XP tags:      YES
-- Nikon lens database:                YES
-- Building video support:             NO
-- Building webready support:          NO
-- Dynamic runtime override:           YES
-- Unicode paths (wstring):            NO
-- Building exiv2 command:             YES
-- Building samples:                   YES
-- Building PO files:                  NO
-- Building unit tests:                NO
-- Building doc:                       NO
-- Building with coverage flags:       NO
-- Using ccache:                       NO
-- ------------------------------------------------------------------
--  WARNING: Deprecated features: EPS, Video, Ssh
-- ------------------------------------------------------------------
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    WITH_MYFILE_MMAP

Errors:

[ 48%] Linking CXX shared library ../bin/libexiv2.dll
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(iptc.cpp.obj):iptc.cpp:(.text+0x20f1): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(jpgimage.cpp.obj):jpgimage.cpp:(.text+0x2c1b): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(jpgimage.cpp.obj):jpgimage.cpp:(.text+0x3df6): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(value.cpp.obj):value.cpp:(.text+0x5a1): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(value.cpp.obj):value.cpp:(.text+0x28c1): undefined reference to `__memcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(localtime.c.obj):localtime.c:(.text+0xa2e): undefined reference to `__memcpy_chk'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/exiv2lib.dir/build.make:692 : bin/libexiv2.dll] Erreur 1
make[2] : on quitte le répertoire « /d/programmes/exiv2source/build »
make[1]: *** [CMakeFiles/Makefile2:281 : src/CMakeFiles/exiv2lib.dir/all] Erreur 2
make[1] : on quitte le répertoire « /d/programmes/exiv2source/build »
make: *** [Makefile:130 : all] Erreur 2
make[1] : on entre dans le répertoire « /d/programmes/exiv2source/build »
make[2] : on entre dans le répertoire « /d/programmes/exiv2source/build »
make[2] : on entre dans le répertoire « /d/programmes/exiv2source/build »
make[2] : on quitte le répertoire « /d/programmes/exiv2source/build »
make[2] : on quitte le répertoire « /d/programmes/exiv2source/build »
[ 10%] Built target exiv2-xmp
[ 24%] Built target exiv2lib_int
make[2] : on entre dans le répertoire « /d/programmes/exiv2source/build »
make[2] : on quitte le répertoire « /d/programmes/exiv2source/build »
make[2] : on entre dans le répertoire « /d/programmes/exiv2source/build »
[ 25%] Linking CXX shared library ../bin/libexiv2.dll
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(iptc.cpp.obj):iptc.cpp:(.text+0x20f1): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(jpgimage.cpp.obj):jpgimage.cpp:(.text+0x2c1b): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(jpgimage.cpp.obj):jpgimage.cpp:(.text+0x3df6): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(value.cpp.obj):value.cpp:(.text+0x5a1): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(value.cpp.obj):value.cpp:(.text+0x28c1): undefined reference to `__memcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(localtime.c.obj):localtime.c:(.text+0xa2e): undefined reference to `__memcpy_chk'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/exiv2lib.dir/build.make:692 : bin/libexiv2.dll] Erreur 1
make[2] : on quitte le répertoire « /d/programmes/exiv2source/build »
make[1]: *** [CMakeFiles/Makefile2:281 : src/CMakeFiles/exiv2lib.dir/all] Erreur 2
make[1] : on quitte le répertoire « /d/programmes/exiv2source/build »
make: *** [Makefile:130 : all] Erreur 2

Master branch cannot be built either due to other errors, but I understand that API change compared to 0.27 so it is not a concern now.

@gaaned92 gaaned92 added the bug label Feb 15, 2020
@clanmills
Copy link
Collaborator

Thanks for reporting this. I have a couple of points of good news for you concerning 0.27.2 and 0.27-maintenance.

  1. I've pulled down and successfully built a fresh clone of 0.27-maintenance on msys/2 with GCC 7.3.0 and cmake 3.10.2

  2. Yesterday, a user reported getting the "official" 0.27.2 MinGW build to work with Qt Cannot link exiv2 prebuilt binaries in Qt project #1101

My suspicion is the toolchain for GCC 9.2.0.

I don't have any comment to make concerning 'master' on MinGW. It sounds as though you don't want to use it at this time, so let's not bother with that and focus on

  1. getting 0.27.2 to build for you
  2. using the pre-built 0.27.2 binaries.

@gaaned92
Copy link
Author

Thanks for answer.

  • the dll of 0.27.2 shipped with MINW64 seems broken
  • as I wrote i my first post, 0.27.2 builds ok and the dll links and works ok with ART
  • I tried to build 0.27-maintenance ( to benefit from last updates in decoding) and it fails.

So I think there was some commit between 0.27.2 and 0.27-maintenance that broke the build process

@clanmills
Copy link
Collaborator

I built a fresh clone of 0.27-maintenance with GCC 7.3.0 today. I'm more suspicious of GCC 9.2.0.

Yesterday, a user reported successfully linking the 0.27.2 MinGW build with Qt, so there can't be much wrong. However, it was built with GCC 7.3.0 and it's possible that it cannot link with applications built with GCC 9.2.0

Can you try using GCC 7.3.0?

@gaaned92
Copy link
Author

Ah! something broke in my msys2 installation after downgrading. Don't know if it is linked!

@clanmills clanmills added windows Windows Specific issues and removed bug labels Feb 17, 2020
@gaaned92
Copy link
Author

gaaned92 commented Feb 17, 2020

Downgrading GCC breaks Cmake. So not very possible.

It doesn't seem a Windows problem but a exiv2 problem as some commits from 2.7.2 to 2.7- maintenance hinder the possibility to build with MSYS2/MINGW64/GCC9.2. Or perhaps it is a MINGW64 problem.
About GCC9.2.0, I can build Rawtherapee, ART, Darktable, Lensfun, exiv2 2.7.2, HDRMERGE, SIRIL, LuminanceHDR.
I am not sure this bug is related to windows, but more certainly to incompatibility with up to date MINGW64 chaintool, compiler, linker.. So to say, no specific Windows knowledge (API...) seems required to solve the issue.

@clanmills
Copy link
Collaborator

It built OK for me with CMake 3.10.2 and GCC 7.3.0.

The 0.27-maintenance branch is for development and doesn't promise to build every platform for every commit.

The matrix of branches/releases/tools is infinite. No release (such as 0.27.2 or even 0.27) can promise to build with every future tool-set.

@gaaned92
Copy link
Author

  • 0.27.2 builds with gcc 9.2

  • The offending commit is 1fa5839. after that commit the branch cannot be built with 9.2.

It built OK for me with CMake 3.10.2 and GCC 7.3.0.
So all is good!

@clanmills clanmills added the CMake Configuration issues related with CMake label Feb 19, 2020
@clanmills
Copy link
Collaborator

Thanks @gaaned92. I'm very pleased to hear that this is fixed. I'm going to reopen this and ask @piponazo (who is Team Exiv2's CMake/Maestro) to comment on this.

@clanmills clanmills reopened this Feb 19, 2020
@clanmills
Copy link
Collaborator

No response from Luis (piponazo). I'm going to close this.

@gaaned92 I'm working on Exiv2 v0.27.3 The schedule is to have a release candidate in early June and GM at the end of June.

@clanmills clanmills added this to the v0.27.3 milestone Mar 30, 2020
@clanmills clanmills assigned clanmills and unassigned piponazo Mar 30, 2020
@gaaned92
Copy link
Author

Trying to build on W10 Msys2 the last 0.27-maintenance branch, I get these errors:

[ 48%] Linking CXX shared library ../bin/libexiv2.dll
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(iptc.cpp.obj):iptc.cpp:(.text+0x20f1): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(jpgimage.cpp.obj):jpgimage.cpp:(.text+0x2c1b): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(jpgimage.cpp.obj):jpgimage.cpp:(.text+0x3df6): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(value.cpp.obj):value.cpp:(.text+0x5a1): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(value.cpp.obj):value.cpp:(.text+0x28c1): undefined reference to `__memcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(localtime.c.obj):localtime.c:(.text+0xa2e): undefined reference to `__memcpy_chk'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/exiv2lib.dir/build.make:692 : bin/libexiv2.dll] Erreur 1
make[2] : on quitte le répertoire « /d/programmes/exiv2source/build »
make[1]: *** [CMakeFiles/Makefile2:365 : src/CMakeFiles/exiv2lib.dir/all] Erreur 2
make[1] : on quitte le répertoire « /d/programmes/exiv2source/build »
make: *** [Makefile:130 : all] Erreur 2
make[1] : on entre dans le répertoire « /d/programmes/exiv2source/build »
make[2] : on entre dans le répertoire « /d/programmes/exiv2source/build »
make[2] : on quitte le répertoire « /d/programmes/exiv2source/build »
[ 10%] Built target exiv2-xmp
make[2] : on entre dans le répertoire « /d/programmes/exiv2source/build »
make[2] : on quitte le répertoire « /d/programmes/exiv2source/build »
[ 24%] Built target exiv2lib_int
make[2] : on entre dans le répertoire « /d/programmes/exiv2source/build »
make[2] : on quitte le répertoire « /d/programmes/exiv2source/build »
make[2] : on entre dans le répertoire « /d/programmes/exiv2source/build »
[ 25%] Linking CXX shared library ../bin/libexiv2.dll
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(iptc.cpp.obj):iptc.cpp:(.text+0x20f1): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(jpgimage.cpp.obj):jpgimage.cpp:(.text+0x2c1b): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(jpgimage.cpp.obj):jpgimage.cpp:(.text+0x3df6): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(value.cpp.obj):value.cpp:(.text+0x5a1): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(value.cpp.obj):value.cpp:(.text+0x28c1): undefined reference to `__memcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/exiv2lib.dir/objects.a(localtime.c.obj):localtime.c:(.text+0xa2e): undefined reference to `__memcpy_chk'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/exiv2lib.dir/build.make:692 : bin/libexiv2.dll] Erreur 1
make[2] : on quitte le répertoire « /d/programmes/exiv2source/build »
make[1]: *** [CMakeFiles/Makefile2:365 : src/CMakeFiles/exiv2lib.dir/all] Erreur 2
make[1] : on quitte le répertoire « /d/programmes/exiv2source/build »
make: *** [Makefile:130 : all] Erreur 2

@clanmills
Copy link
Collaborator

Ah yes. GCC 9.3.0 doesn't build our code. I'm using GCC 7.4.0 which is provided in: http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20190524.exe

We've also had trouble with GCC 8.2.0 which was thoroughly investigated #421 The user reported a bug to GCC and I've heard nothing about it. I don't believe it's in the Exiv2 code, so regretfully, I can't do anything else about this. I recommend you install and build with GCC 7.4.0 If you need GCC 9.3.0 for your own purposes, you can build Exiv2 with 7.4.0 and install it. When you compile your code with 9.3.0, it will link to Exiv2/7.4.0

@D4N
Copy link
Member

D4N commented Apr 23, 2020 via email

@clanmills
Copy link
Collaborator

@D4N Great insight. The msys2 build sets (from the output of CMake/msys2)

-- General:
         -fstack-protector-strong
         -Wp,-D_GLIBCXX_ASSERTIONS
         -Wp,-D_FORTIFY_SOURCE=2
         -Wall
         -Wcast-align
         -Wpointer-arith
         -Wformat-security
         -Wmissing-format-attribute
         -Woverloaded-virtual
         -W

The code to set this is here:

527 MSYS rmills@rmillsmm-w10:~/gnu/github/exiv2/buildserver/build $ grep -i fortify ../cmake/*.cmake
../cmake/compilerFlags.cmake:            add_compile_options(-Wp,-D_FORTIFY_SOURCE=2) # Requires to compile with -O2
528 MSYS rmills@rmillsmm-w10:~/gnu/github/exiv2/buildserver/build $

@gaaned92 Can you try that, please. I can disable that in v0.27.3 RC, in much the same way that I've "tweaked" the compiler options for other platforms:

528 MSYS rmills@rmillsmm-w10:~/gnu/github/exiv2/buildserver/build $ grep -i sol ../cmake/*.cmake
../cmake/compilerFlags.cmake:        if (NOT MINGW AND NOT CMAKE_HOST_SOLARIS)
../cmake/packaging.cmake:elseif ( CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_HOST_SOLARIS)
../cmake/packaging.cmake:if ( CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_HOST_SOLARIS )
529 MSYS rmills@rmillsmm-w10:~/gnu/github/exiv2/buildserver/build $

@clanmills clanmills reopened this Apr 23, 2020
@gaaned92
Copy link
Author

gaaned92 commented Apr 23, 2020

@clanmills
Thanks !
I suppressed

../cmake/compilerFlags.cmake: add_compile_options(-Wp,-D_FORTIFY_SOURCE=2) # Requires to compile with -O2

Build is ok. I will test ART with this version.

If you want I test also the other modification, please show me where and how to add -lssp to LDFLAGS.

@clanmills
Copy link
Collaborator

The thanks go to (the brilliant, and pain-in-the-a***) @D4N

534 MSYS rmills@rmillsmm-w10:~/gnu/github/exiv2/buildserver/build $ git diff ../cmake/compilerFlags.cmake
diff --git a/cmake/compilerFlags.cmake b/cmake/compilerFlags.cmake
index 1c5ffab2..190b1c67 100644
--- a/cmake/compilerFlags.cmake
+++ b/cmake/compilerFlags.cmake
@@ -38,7 +38,7 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN

         add_compile_options(-Wp,-D_GLIBCXX_ASSERTIONS)

-        if (CMAKE_BUILD_TYPE STREQUAL Release AND NOT APPLE)
+        if (CMAKE_BUILD_TYPE STREQUAL Release AND NOT APPLE AND NOT MSYS)
             add_compile_options(-Wp,-D_FORTIFY_SOURCE=2) # Requires to compile with -O2
         endif()

I'll submit that to branch 0.27-maintenance today.

@gaaned92 FYI exiv2 v0.27.3 RC1 is on track for release on 2020-04-30

@clanmills
Copy link
Collaborator

Fix submitted and merged in 0.27-maintenance #1175

@clanmills
Copy link
Collaborator

I've been working with @piponazo on C++11 support for 0.27.3 RC2 (scheduled on 2020-05-30) in the branch add_c++11_support_0.27. I've built Exiv2 with GCC 9.3 on both MinGW/msys2 and Cygwin/64. I'm very confident this trouble is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake Configuration issues related with CMake windows Windows Specific issues
Projects
None yet
Development

No branches or pull requests

4 participants