Bug #871

Problem buinding under msys+mingw

Added by Eugene Panich almost 9 years ago. Updated almost 9 years ago.

Target version:
Start date:
15 Dec 2012
Due date:
% Done:


Estimated time:
2.00 h



I'm building exiv2 (0.23) with msys+mingw

Configure options:
$ ./configure --with-libiconv-prefix --disable-lensdata --enable-commercial --d isable-shared --with-zlib=/c/myproject/exiv2/addlibs/win32 --with-expat=/c/myproject/exiv2/addlibs/win32 --disable-visibility

The problem is that make runs into a weird error:

$ make
if test "x1" = "x1"; then cd xmpsdk/src && C:/QtSDK/mingw/bin/make xmpsdk; fi;
make1: Entering directory `c:/myproject/exiv2/xmpsdk/s
Xinclude DEXV_HAVE_STDINT_H=1 -c -o XML_Node.o XML_Node.lo
c:\myproject\exiv2\libtool: compile: warning: libobj nam
e `include -DEXV_HAVE_STDINT_H=1 -c -o XML_Node.o XML_Node.lo' may not contain s
hell special characters.
rm: invalid option -
Try `rm --help' for more information.
c:\myproject\exiv2\libtool: compile: g++ O2 -Wall -Wcast-align -Wpointer-arith -Wformat-security -Wmissing-format-attribute -Woverloaded-virtual -W -MMD -I. -I/c/myproject/exiv2/addlibs/win32/include "-DEXV_LOCALEDIR=\\/usr/local/sharelocale\" -DEXV_COMMERCIAL_VERSION=1 -I../include -funsigned-char -DNDEBUG=1 -I/c/myproject/exiv2/addlibs/win32/include DEXV_HAVE_STDINT_H=1 -c -o XML_Node.o XML_Node.cpp" -o include -DEXV_HAVE_STDINT_H=1 -c -o XML_Node.o XML_Node.o
g++.exe: XML_Node.o: No such file or directory
g++.exe: no input files
rm: invalid option -
Try `rm --help' for more information.
make1: * [XML_Node.o] Error 1
make1: Leaving directory `c:/myproject/exiv2/xmpsdk/sr
make: *
[xmpsdk] Error 2

Does anyone has an idea how to fix it?



Updated by Robin Mills almost 9 years ago

  • Category set to build
  • Status changed from New to Assigned
  • Assignee set to Robin Mills
  • Priority changed from High to Normal
  • Target version set to 0.24

My suspicion is that you used WinZip to unzip the code and he's added cr's to the line endings and broken the build!

I haven't built on MinGW for ages (at least 6 months, I think). I pulled down the exiv2-0.23 source from the web site, unzipped it with 7z, built exiv2 by following my build notes: It compiled OK. I did not get your error. However I encountered a linking error which I will investigate.

If your compilation issues is the CR/line-ending business, you can use dos2unix to fix the line-endings. However better to unzip a clean copy of the code with 7z. Maybe there's an option in WinZip to say "mind your own business and leave the line-endings alone, if you don't mind grrrrrrrrr".



Updated by Robin Mills almost 9 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 90
  • Estimated time set to 2.00 h

Good News

Your command to build a static library works.

The shared library link error is my fault. You're building the 0.23 code from the web site and this requires --disable-visibility (and I didn't specify it).

I submitted a fix in May (after we published 0.23) to the trunk to set --disable-visibility for ming and cygwin builds. However 0.23 requires --disable-visibility to be set by the user.



Updated by Eugene Panich almost 9 years ago


Thank you for a prompt reply. I have finally resolved the problem by changing MinGW from QT's one to abother.


Updated by Robin Mills almost 9 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 90 to 100

Good. I don't remember building exiv2 with the compilers included with the Qt SDK. I build the libraries from the MinGW command prompt - and link them using QtCreator. I confess that I only use MinGW for Qt. I always install Cygwin on my Windows machines and haven't spent time getting comfortable with MinGW.

I'm going to close this issue. If you need further assistance, please use the forum or open a new issue.

Seasons Greeting and Best Wishes for 2013.

Also available in: Atom PDF