|
From: | Manuel Collado |
Subject: | Re: Avoid gawkextlib as a separate shared library |
Date: | Wed, 18 May 2022 17:54:22 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
El 18/05/2022 a las 13:40, Andrew J. Schorr escribió:
On Wed, May 18, 2022 at 11:11:13AM +0200, Manuel Collado wrote:My point is to simplify building gawkextlib extensions from source distribution tarballs. If they need libgawkextlib-0.dll. Possible alternatives: [...] Does any of those alternatives make sense? How can they compare w.r.t. the effort required to implement?It's difficult to discuss this sensibly without understanding the current challenges of MinGW installation. Eli says that libtool works correctly with the current setup, whereas you say that you had to copy libgawkextlib-0.dll to a different spot to get things to work. Is it possible to sort out this issue before discussing what needs to be changed to support MinGW better?
I've revised what I did last year. The issue seems to be that the gcc linker of my installed MinGW distribution needs access to both gawkextlib-0.dll and libgawkextlib.dll.a. But the current setup lets the linker to only look at the /lib directory of the installation tree. And gawkextlib-0.dll gets installed in /bin.
Copying gawkextlib-0.dll to /lib is a dirty hack. A cleaner solution was to patch gawkext.m4 as follows:
diff --git a/shared/gawkext.m4 b/shared/gawkext.m4 index 7abc165..22325b0 100644 --- a/shared/gawkext.m4 +++ b/shared/gawkext.m4 @@ -58,7 +58,7 @@ AC_ARG_WITH(gawkextlib, [ # some platforms use lib64 and others use lib wldfound=0 - for wldir in "$withval"/lib* ; do + for wldir in "$withval"/bin "$withval"/lib* ; do if test -d "$wldir"; then LDFLAGS="-L${wldir} ${LDFLAGS}" AC_SUBST([GAWKEXTLIBDIR],"$wldir")Don't know if other gcc distributions for Windows also require a similar change. Perhaps Eli is using Msys2 plus its MinGW32 subsystem instead of my (older) MinGW+Msys.
HTH. Regards. -- Manuel Collado - http://mcollado.z15.es
[Prev in Thread] | Current Thread | [Next in Thread] |