Project

General

Profile

Bug #767

Build failure on MinGW with GCC >= 4.6 because of "-no-undefined"

Added by Volker Grabsch over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Urgent
Category:
build
Target version:
Start date:
27 Mar 2011
Due date:
% Done:

100%

Estimated time:

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

Revision 2472 (diff)
Added by Volker Grabsch over 10 years ago

#767: Add "-no-undefined" as lately as possible in the ./configure process, so it won't be passed to GCC by accident

History

#1

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.

#2

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.

#3

Updated by Andreas Huggel about 10 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF