Build Exiv2 on MinGW using CMake
|Status:||Closed||Start date:||30 Sep 2016|
|Assignee:||Robin Mills||% Done:|
|Category:||build||Estimated time:||35.00 hours|
I've got this working and documented. For sure we should consider it 'experimental' for v0.26.
#1236. Updated CMake/MinGW build instructions. That's all I intend to do on CMake/MinGW for v0.26
#3 Updated by Robin Mills 7 months ago
- % Done changed from 80 to 100
- Estimated time changed from 50.00 to 25.00
The crashing in the test programs (geotag, exiv2json for sure) is coming from expat:
#0 0x6085daa6 in strsep () from c:\MinGW\msys\1.0\bin\msys-1.0.dll #1 0x6082d627 in msys-1.0!calloc () from c:\MinGW\msys\1.0\bin\msys-1.0.dll #2 0x6088d3a1 in strftime () from c:\MinGW\msys\1.0\bin\msys-1.0.dll #3 0x6082d320 in msys-1.0!malloc () from c:\MinGW\msys\1.0\bin\msys-1.0.dll #4 0x6994127c in msys-expat-1!XML_ParserCreate_MM () from c:\MinGW\msys\1.0\bin\msys-expat-1.dll <-- using msys-expat #5 0x69941076 in msys-expat-1!XML_ParserCreate_MM () from c:\MinGW\msys\1.0\bin\msys-expat-1.dll #6 0x69941044 in msys-expat-1!XML_ParserCreateNS () from c:\MinGW\msys\1.0\bin\msys-expat-1.dll #7 0x6c71e18b in ExpatAdapter::ExpatAdapter() () from c:\MinGW\msys\1.0\home\rmills\gnu\exiv2\trunk\build\bin\libexiv2.dllI want it to use /usr/local/bin/libexpat-1.dll
I'm not going to spend more time on this for v0.26. This has to be "experimental - use at your own risk". I'll get this all fixed in v0.27 and deploy it on the nightly build.
#5 Updated by Robin Mills 7 months ago
- Status changed from Closed to Resolved
- % Done changed from 100 to 90
I've realised (while eating breakfast) why CMake has linked the wrong versions of expat and zlib. It's for the same issue in CMake concerning the include files. We'll have to rewrite the linker response files to link the libraries in /usr/local/lib.
The problem with CMake on MinGW is that CMake does not use the CMAKE_CXX_COMPILER directive in it's initial search for support for common matters such as linkng ZLIB, HAVE_STDINT_H and so on.
CMake is unfit for purpose on Windows. It works well on Cygwin which is posix compliant layer over windows. However MinGW is a thin veneer over Windows. For sure CMake/Visual Studio is hideous.
I will report the bugs I have discovered in CMake/MinGW to Kitware. I'll review CMake/MinGW before we ship v0.27. In the meanwhile, I will update our CMAKE documentation to reflect the current status.