Bug #767
Build failure on MinGW with GCC >= 4.6 because of "-no-undefined"
100%
Description
Exiv2 fails to build under MinGW when compiled with GCC >= 4.6.
The problem is the "-no-undefined" flag, which should only be passed to libtool and never to GCC. Previous versions of GCC tolerated this flag, but that changed since GCC 4.6. See also the libtool mailing list for more information on that topic:
http://www.mail-archive.com/libtool@gnu.org/msg12638.html
Note that the Exiv2 Makefile already does everything right. The problem is the configure.ac which adds "-no-undefined" to LDFLAGS too early in the configure process. That way, the library checks will use this flag and pass it to GCC. So the ./configure process fails with a misleading error message, e.g. stating that zlib couldn't be found.
The solution is to add "-no-undefined" as lately as possible, after all other configure checks.
Associated revisions
History
Updated by Volker Grabsch over 10 years ago
- Status changed from New to Feedback
- Assignee set to Andreas Huggel
I just provided a fix to trunk. Please review.
Updated by Andreas Huggel over 10 years ago
- Status changed from Feedback to Resolved
- % Done changed from 0 to 100
Looks ok. Thanks for the fix.
#767: Add "-no-undefined" as lately as possible in the ./configure process, so it won't be passed to GCC by accident