Closed pananton closed 2 years ago
Additional information. As I mentioned earlier build stucks during configure step (when configure
script is working). I've looked through this script and find out that it creates conftest.c file and tries to compile it to check C compiler features. When build stucks (note that cl.exe exists in the active processes) conftest.c looks like this:
/* confdefs.h */
#define PACKAGE_NAME "libiconv"
#define PACKAGE_TARNAME "libiconv"
#define PACKAGE_VERSION "1.16"
#define PACKAGE_STRING "libiconv 1.16"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "libiconv"
#define VERSION "1.16"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define __EXTENSIONS__ 1
#define _ALL_SOURCE 1
#define _DARWIN_C_SOURCE 1
#define _GNU_SOURCE 1
#define _NETBSD_SOURCE 1
#define _OPENBSD_SOURCE 1
#define _POSIX_PTHREAD_SEMANTICS 1
#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
#define __STDC_WANT_IEC_60559_BFP_EXT__ 1
#define __STDC_WANT_IEC_60559_DFP_EXT__ 1
#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
#define __STDC_WANT_LIB_EXT2__ 1
#define __STDC_WANT_MATH_SPEC_FUNCS__ 1
#define _TANDEM_SOURCE 1
#define _HPUX_ALT_XOPEN_SOCKET_API 1
#define _DARWIN_USE_64_BIT_INODE 1
#define LT_OBJDIR ".libs/"
#define INSTALLPREFIX "C:/Users/gitlab/conan-recipe/.conan/data/libiconv/1.16/_/_/package/3fb49604f9c2f729b85ba3115852006824e72cab"
#define HAVE_VISIBILITY 0
#define ICONV_CONST
#define HAVE_MBSTATE_T 1
#define HAVE_WCHAR_T 1
#define HAVE_MBRTOWC 1
#define HAVE_WCRTOMB 1
#define HAVE_SETLOCALE 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_LIMITS_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_WCHAR_H 1
#define HAVE_STDINT_H 1
#define HAVE_GETCWD 1
#define HAVE__SET_INVALID_PARAMETER_HANDLER 1
#define HAVE_WORKING_O_NOATIME 0
#define HAVE_WORKING_O_NOFOLLOW 0
#define HAVE_WCHAR_H 1
#define WORDS_LITTLEENDIAN 1
#define HAVE_ALLOCA 1
#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1
#define HAVE_ENVIRON_DECL 1
#define HAVE_DECL_STRERROR_R 0
#define pid_t int
#define mode_t int
#define HAVE_STDLIB_H 1
#define MALLOC_0_IS_NONNULL 1
#define HAVE_UNSIGNED_LONG_LONG_INT 1
#define HAVE_LONG_LONG_INT 1
#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1
#define HAVE_DECL_SETENV 0
#define ssize_t int
#define uid_t int
#define gid_t int
#define USER_LABEL_PREFIX
#define nlink_t int
#define HAVE__BOOL 1
#define HAVE_WINT_T 1
#define restrict /**/
/* end confdefs.h. */
#include <string.h>
This is the example how configure
script tries to determine location of the <string.h>
header. If i kill cl.exe the following line appears in my CI job log:
checking absolute name of <string.h>... "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.19041.0\\ucrt\\string.h"
The build process continues, but later stucks again. The content of conftest.c now is:
/* confdefs.h */
#define PACKAGE_NAME "libiconv"
#define PACKAGE_TARNAME "libiconv"
#define PACKAGE_VERSION "1.16"
#define PACKAGE_STRING "libiconv 1.16"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "libiconv"
#define VERSION "1.16"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define __EXTENSIONS__ 1
#define _ALL_SOURCE 1
#define _DARWIN_C_SOURCE 1
#define _GNU_SOURCE 1
#define _NETBSD_SOURCE 1
#define _OPENBSD_SOURCE 1
#define _POSIX_PTHREAD_SEMANTICS 1
#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
#define __STDC_WANT_IEC_60559_BFP_EXT__ 1
#define __STDC_WANT_IEC_60559_DFP_EXT__ 1
#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
#define __STDC_WANT_LIB_EXT2__ 1
#define __STDC_WANT_MATH_SPEC_FUNCS__ 1
#define _TANDEM_SOURCE 1
#define _HPUX_ALT_XOPEN_SOCKET_API 1
#define _DARWIN_USE_64_BIT_INODE 1
#define LT_OBJDIR ".libs/"
#define INSTALLPREFIX "C:/Users/gitlab/conan-recipe/.conan/data/libiconv/1.16/_/_/package/3fb49604f9c2f729b85ba3115852006824e72cab"
#define HAVE_VISIBILITY 0
#define ICONV_CONST
#define HAVE_MBSTATE_T 1
#define HAVE_WCHAR_T 1
#define HAVE_MBRTOWC 1
#define HAVE_WCRTOMB 1
#define HAVE_SETLOCALE 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_LIMITS_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_WCHAR_H 1
#define HAVE_STDINT_H 1
#define HAVE_GETCWD 1
#define HAVE__SET_INVALID_PARAMETER_HANDLER 1
#define HAVE_WORKING_O_NOATIME 0
#define HAVE_WORKING_O_NOFOLLOW 0
#define HAVE_WCHAR_H 1
#define WORDS_LITTLEENDIAN 1
#define HAVE_ALLOCA 1
#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1
#define HAVE_ENVIRON_DECL 1
#define HAVE_DECL_STRERROR_R 0
#define pid_t int
#define mode_t int
#define HAVE_STDLIB_H 1
#define MALLOC_0_IS_NONNULL 1
#define HAVE_UNSIGNED_LONG_LONG_INT 1
#define HAVE_LONG_LONG_INT 1
#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1
#define HAVE_DECL_SETENV 0
#define ssize_t int
#define uid_t int
#define gid_t int
#define USER_LABEL_PREFIX
#define nlink_t int
#define HAVE__BOOL 1
#define HAVE_WINT_T 1
#define restrict /**/
#define _USE_STD_STAT 1
#define HAVE_DECL_CLEARERR_UNLOCKED 0
#define HAVE_DECL_FEOF_UNLOCKED 0
#define HAVE_DECL_FERROR_UNLOCKED 0
#define HAVE_DECL_FFLUSH_UNLOCKED 0
#define HAVE_DECL_FGETS_UNLOCKED 0
#define HAVE_DECL_FPUTC_UNLOCKED 0
#define HAVE_DECL_FPUTS_UNLOCKED 0
#define HAVE_DECL_FREAD_UNLOCKED 0
#define HAVE_DECL_FWRITE_UNLOCKED 0
#define HAVE_DECL_GETC_UNLOCKED 0
#define HAVE_DECL_GETCHAR_UNLOCKED 0
#define HAVE_DECL_PUTC_UNLOCKED 0
#define HAVE_DECL_PUTCHAR_UNLOCKED 0
#define GNULIB_CANONICALIZE_LGPL 1
#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1
#define GNULIB_TEST_REALPATH 1
#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1
#define GNULIB_TEST_ENVIRON 1
#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0
#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0
#define HAVE_DECL___ARGV 1
#define GNULIB_TEST_LSTAT 1
#define GNULIB_TEST_MALLOC_POSIX 1
#define HAVE_MBSTATE_T 1
#define GNULIB_MSVC_NOTHROW 1
#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0
#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0
#define HAVE_RAISE 1
#define GNULIB_TEST_RAISE 1
#define GNULIB_TEST_READ 1
#define GNULIB_TEST_READLINK 1
#define HAVE_SEARCH_H 1
#define GNULIB_SIGPIPE 1
#define GNULIB_TEST_SIGPROCMASK 1
#define ssize_t int
#define GNULIB_TEST_STAT 1
#define __USE_MINGW_ANSI_STDIO 1
/* end confdefs.h. */
#include <stdio.h>
If cl.exe is killed again the build process continues and the next line is CI job log is:
checking absolute name of <stdio.h>... "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.19041.0\\ucrt\\stdio.h"
Then process stucks again, killing cl.exe works, etc until build is finished. In all cases the content of conftest.c is very similar/ Among several define
s there is only one line including some header (no main
function etc). Other checks (when conftest.c contains main
function) successfully pass.
what's the cl.exe
version on CI? do you run the same version locally?
if cl.exe
compiler hangs, it might be a compiler bug, and the only thing we can do, is to bypass certain configure checks (by defining an appropriate configure args with known values).
I actually even don't understand why cl.exe is called at all? libiconv uses msys2 - should not gcc
and it's cc1
compiler be used instead?
I am closing this one, as it turns out to be a bug in MSYS, nothing to be done in recipe or conan client.
anyone who run into the same isssue, consider checking https://github.com/msys2/msys2-runtime/issues/77
Hello! I'm not sure that my problem relates to conan or msys2/cci.latest recipe but maybe someone here can give an advice. I have a gitlab CI job which builds libiconv/1.16 library for windows (CI runner executes on windows and uses powershell as scripting language). This job stucks forever, here is the log:
When I login to runner's machine I can see
cl.exe
(win C compiler) in tasks. If I kill it, then build process unfreezes and continues:Also I've tried to launch
conan create . libiconv/1.16@
command manually on the same machine using the same user as for gitlab's runner and everything works just fine. The problem arises only when library is built by CI job. I've already updated python, conan, all used recipes to the latest versions but it did not work. Then I've tried to buid libiconv with older msys2 version (msys2/20210105) and it worked - libiconv was successfully build by CI job. Can you give an advice what can be a problem?