Bug #767

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

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

Status:ClosedStart date:27 Mar 2011
Priority:UrgentDue date:
Assignee:Andreas Huggel% Done:

100%

Category:build
Target version:0.22

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
Added by Volker Grabsch over 6 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 6 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 6 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 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux