[Top][All Lists]

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

Re: libltdl exports no symbols (cygwin)

From: Eric Blake-1
Subject: Re: libltdl exports no symbols (cygwin)
Date: Tue, 30 Jan 2007 09:00:00 -0800 (PST)

Hi Ralf, Chuck,

> > >I am a bit wary that it may cause regressions in users' packages, as
> > >they may be using LT_SCOPE.  But I see that with the other change, this
> > >is needed.
> > 
> > User-package use of internal libtool macros (e.g. LT_SCOPE) is outside 
> > libtool's control.
> Hmm, yes.  I've never been certain whether LT_SCOPE was *intended* to be
> purely internal, or for the user to use.  The latter seems inappropriate
> to me now, but I don't think people were aware of this all the time.

Indeed - ever since this patch, CVS M4 is now broken on cygwin.  I am
all sorts of link errors along the lines of:

libtool: link: gcc -shared  modules/.libs/gnu.o   m4/.libs/libm4.dll.a    -o
modules/.libs/gnu-0.dll -Wl,--enable-auto-image-base -Xlinker --out-implib
-Xlinker modules/.libs/gnu.dll.a
modules/.libs/gnu.o: In function `m4_regexp_compile':
/home/eblake/m4-head/modules/gnu.c:140: undefined reference to

This is because M4 was relying on auto-imports, and now that libltdl
has an explicit export, the auto-import mechanism is disabled.

I still think the fix to libtool was the correct thing to do, but in order
to fix M4, I need some help.  It looks like I need to properly mark for
export all symbols intended for clients of libm4.dll to use, since libm4.dll
utilizes libltdl.

> Eventually, we should do something about this by offering a portable way
> to decorate imports/exports for users of libtool.  Not right now.

That's a shame.  Until libtool provides helper macros that automatically
do the right thing when compiling with libtool, making M4 work on
cygwin will be a tougher process.

> > >I'm still wondering what to put in NEWS for this and the depending
> > >change.  We should mention this somehow.  Suggestions appreciated.
> > 
> > "Fix regression in libltdl symbol exports on Cygwin. Side effect: 
> > LT_GLOBAL_DATA and LT_SCOPE are now explicitly defined as 
> > declspec(dllexport), bypassing auto-export logic on Cygwin.  This tracks 
> > existing behavior on MinGW."

Should we also mention the side effect that you must now mark
explicit exports, since you can no longer rely on auto-imports?

Eric Blake

View this message in context:
Sent from the Gnu - Libtool - Patches mailing list archive at

reply via email to

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