In the build of the Syscalls module on Cygwin, -luuid will pick up /usr/lib/libuuid.dll.a instead of /usr/lib/w32api/libuuid.a if the builder has the libuuid-devel package installed. Fix attached.
The search path order specified in libtool.m4 is correct in most cases. In the case of -luuid, however, it makes /usr/lib/libuuid.dll.a precede /usr/lib/w32api/libuuid.a. The latter is what we want in this particular case, so we have to explicitly override the standard search order.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No. Cygwin is a Posix platform, and we almost always prefer libraries in /usr/lib to libraries in /usr/lib/w32api. In the context of the present patch, however, shlobj.h is a w32 header, and it needs the w32 version of uuid. So this is an exception.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Something like this patch is still needed in order to build clisp on Cygwin if the builder has the libuuid-devel package installed. Unfortunately, the patch stopped working as of the following changeset:
changeset: 15725:4c9d0558e61e
user: Bruno Haible bruno@clisp.org
date: Sun Feb 19 16:45:35 2017 +0100
summary: Modernize: Really update to the newest gnulib.
What happens after this changeset is that the definition of ac_cv_build in modules/syscalls/configure occurs later than the line defining LIBS. I don't know why that would happen, given that modules/syscalls/configure.in didn't change, and I haven't been able to figure out how to fix it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think
./src/m4/libtool.m4:2227
should take care of that:could you please investigate what this is not happening?
thanks
The search path order specified in libtool.m4 is correct in most cases. In the case of -luuid, however, it makes /usr/lib/libuuid.dll.a precede /usr/lib/w32api/libuuid.a. The latter is what we want in this particular case, so we have to explicitly override the standard search order.
isn't the right solution
No. Cygwin is a Posix platform, and we almost always prefer libraries in /usr/lib to libraries in /usr/lib/w32api. In the context of the present patch, however, shlobj.h is a w32 header, and it needs the w32 version of uuid. So this is an exception.
Something like this patch is still needed in order to build clisp on Cygwin if the builder has the libuuid-devel package installed. Unfortunately, the patch stopped working as of the following changeset:
changeset: 15725:4c9d0558e61e
user: Bruno Haible bruno@clisp.org
date: Sun Feb 19 16:45:35 2017 +0100
summary: Modernize: Really update to the newest gnulib.
What happens after this changeset is that the definition of ac_cv_build in modules/syscalls/configure occurs later than the line defining LIBS. I don't know why that would happen, given that modules/syscalls/configure.in didn't change, and I haven't been able to figure out how to fix it.