-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set MinGW LIBS in configure.ac, not in Makefile.am #841
Conversation
Fix libuv.pc on MinGW. Previous version generates libuv.pc with LIBS = "-lpthread" instead of "-lpthread -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv" on MinGW. Previous version generates the following Makefile.am: am__append_4 = -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv ... LIBS = -lpthread $(am__append_4) and the following configure.ac: AS_IF([test "x$PKG_CONFIG" != "x"], [ AC_CONFIG_FILES([libuv.pc]) ]) AC_CONFIG_FILES([Makefile]) Therefore, Makefile is generated after libuv.pc. Variables from Makefile don't affect config.status and libuv.pc. Tony Theodore proposed to set LIBS in configure.ac instead of Makefile.am and created this patch. See also mxe/mxe#1291
What is the rationale behind this? I can compile libuv on MinGW just fine. |
I think the idea is to get the list of libraries into the @starius Is this patch intended for linking against the static library? I would expect the shared library to pull in the requisite dependencies automatically. |
@saghul, this patch is needed to fix |
Verified the change: https://www.dropbox.com/s/mvk86birei1okjc/Screenshot%202016-04-25%2018.06.29.png?dl=0 LGTM Now, should we apply the same principle to other platforms too? PS: @starius I just reread my first message, sorry about that, I sound like an asshole there :-S |
I have not found other platform specific additions to
|
Instead of doing it instead Makefile.am, this fixes libuv.pc on MinGW. Previous version generates libuv.pc with LIBS = "-lpthread" instead of "-lpthread -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv" on MinGW. Previous version generates the following Makefile.am: am__append_4 = -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv ... LIBS = -lpthread $(am__append_4) and the following configure.ac: AS_IF([test "x$PKG_CONFIG" != "x"], [ AC_CONFIG_FILES([libuv.pc]) ]) AC_CONFIG_FILES([Makefile]) Therefore, Makefile is generated after libuv.pc. Variables from Makefile don't affect config.status and libuv.pc. PR-URL: #841 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Landed in 9386f2c, thanks! |
Instead of doing it instead Makefile.am, this fixes libuv.pc on MinGW. Previous version generates libuv.pc with LIBS = "-lpthread" instead of "-lpthread -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv" on MinGW. Previous version generates the following Makefile.am: am__append_4 = -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv ... LIBS = -lpthread $(am__append_4) and the following configure.ac: AS_IF([test "x$PKG_CONFIG" != "x"], [ AC_CONFIG_FILES([libuv.pc]) ]) AC_CONFIG_FILES([Makefile]) Therefore, Makefile is generated after libuv.pc. Variables from Makefile don't affect config.status and libuv.pc. PR-URL: libuv#841 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
The patches are not needed: * libuv/libuv#820 * libuv/libuv#841
Actually technically, the static-only libraries should be specified in (Edit) There are no real technical negative repercussions for explicitly linking the libraries for shared usage, but when one inspect the final linked binary with tools like |
@TimothyGu, I created new issue for that #895 |
Fix libuv.pc on MinGW.
Previous version generates libuv.pc with LIBS = "-lpthread" instead of "-lpthread -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv" on MinGW.
Previous version generates the following Makefile.am:
and the following configure.ac:
Therefore, Makefile is generated after libuv.pc. Variables from Makefile don't affect config.status and libuv.pc.
Tony Theodore proposed to set LIBS in configure.ac instead of Makefile.am and created this patch.
See also mxe/mxe#1291