[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AM_LDFLAGS += -no-undefined

From: Bob Friesenhahn
Subject: Re: AM_LDFLAGS += -no-undefined
Date: Tue, 8 Apr 2014 09:28:07 -0500 (CDT)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Tue, 8 Apr 2014, Akim Demaille wrote:

Hi all,

My project builds many libraries and some modules.  I've just started
using ltdl in it, with a non-recursive build.  As a result,
I have inherited the following line in my single Makefile:

AM_LDFLAGS             += -no-undefined

so my libraries now fail to link.  Is this on purpose?
Shouldn't this flag be for libltdl only?  I have not seen
information about this in the documentation, but I might
have not looked correctly (I looked at occurrences of
-no-undefined and LDFLAGS).

This option is necessary in order to build DLLs under Windows (and likely shared libraries under AIX). It expects a commitment to supply all dependency libraries at library/module link time. You could edit the copy of libltd/ in your project if it causes an issue for you but there may be consequences for platforms which need it.

GraphicsMagick uses a non-recursive build and used to build libltdl as part of the build (for at least 8 years). Even though ltdl added -no-undefined it was not a problem since GraphicsMagick was intentionally using this option.

Since then, I realized that building libltdl as part of the project was prohibitive, costly, and dangerous. It was better to rely on libltdl to be a formally installed dependency on the system. Now GraphicsMagick treats libltdl just like any other external library and life is much improved. I would encourage any other package to not bundle libltdl and to simply document that it must already be installed on the system.

Perhaps it would be wise for libltdl to be unbundled from libtool itself and libltdl become a separate project. They would still have a relationship but then it would be easier to install libltdl.

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]