This is the Msys2 user list so you are allready here :-)

Alexy might be able to help, its still early here in europe so give it a
few hours.

Den 08-12-2019 kl. 07:10 skrev Amit Choudhary:
> Hi,
>
> I have downloaded mingw-w64 and MSYS2. I downloaded bash-5.0.tar.gz. I
> untarred and unzipped it in my user directory in MSYS2. Then I used
> MSYS2 MinGW 64-bit shell provided  by MSYS2.
>
> I tried compiling bash. I did "./configure" and it ran successfully. I
> then did make, but it gave me some errors/warnings. The
> errors/warnings are below
>
> I sent an email to mingw-w64 mailing list but someone told me that it
> is "probably" MSYS2 issue.
>
> Please let me know how can these be resolved. I can help / I can port
> if something hasn't been ported.
>
> Regards,
> Amit
>
> =======================================================================================
> gcc  -DPROGRAM='"bash.exe"' -DCONF_HOSTTYPE='"x86_64"'
> -DCONF_OSTYPE='"mingw32"' -DCONF_MACHTYPE='"x86_64-w64-mingw32"'
> -DCONF_VENDOR='"w64"' -DLOCALEDIR='"/mingw64/share/locale"'
> -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include
> -I./lib -I./lib/intl -I/home/Amit/compile-bash/bash-5.0/lib/intl   -g
> -O2 -Wno-parentheses -Wno-format-security -c shell.c
> In file included from shell.c:40:
> shell.c: In function 'main':
> ./include/filecntl.h:33:33: warning: implicit declaration of function
> 'fcntl'; did you mean 'fcvt'? [-Wimplicit-function-declaration]
>  #define SET_CLOSE_ON_EXEC(fd)  (fcntl ((fd), F_SETFD, FD_CLOEXEC))
>                                  ^~~~~
> shell.c:549:2: note: in expansion of macro 'SET_CLOSE_ON_EXEC'
>   SET_CLOSE_ON_EXEC (i);
>   ^~~~~~~~~~~~~~~~~
> ./include/filecntl.h:33:46: error: 'F_SETFD' undeclared (first use in
> this function)
>  #define SET_CLOSE_ON_EXEC(fd)  (fcntl ((fd), F_SETFD, FD_CLOEXEC))
>                                               ^~~~~~~
> shell.c:549:2: note: in expansion of macro 'SET_CLOSE_ON_EXEC'
>   SET_CLOSE_ON_EXEC (i);
>   ^~~~~~~~~~~~~~~~~
> ./include/filecntl.h:33:46: note: each undeclared identifier is
> reported only once for each function it appears in
>  #define SET_CLOSE_ON_EXEC(fd)  (fcntl ((fd), F_SETFD, FD_CLOEXEC))
>                                               ^~~~~~~
> shell.c:549:2: note: in expansion of macro 'SET_CLOSE_ON_EXEC'
>   SET_CLOSE_ON_EXEC (i);
>   ^~~~~~~~~~~~~~~~~
> shell.c: In function 'uidget':
> shell.c:1273:7: warning: implicit declaration of function 'getuid';
> did you mean 'getpid'? [-Wimplicit-function-declaration]
>    u = getuid ();
>        ^~~~~~
>        getpid
> shell.c:1282:22: warning: implicit declaration of function 'getgid';
> did you mean 'getpid'? [-Wimplicit-function-declaration]
>    current_user.gid = getgid ();
>                       ^~~~~~
>                       getpid
> shell.c:1283:23: warning: implicit declaration of function 'geteuid';
> did you mean 'getpwuid'? [-Wimplicit-function-declaration]
>    current_user.euid = geteuid ();
>                        ^~~~~~~
>                        getpwuid
> shell.c:1284:23: warning: implicit declaration of function 'getegid';
> did you mean 'getpid'? [-Wimplicit-function-declaration]
>    current_user.egid = getegid ();
>                        ^~~~~~~
>                        getpid
> shell.c: In function 'disable_priv_mode':
> shell.c:1296:7: warning: implicit declaration of function 'setuid';
> did you mean 'getpid'? [-Wimplicit-function-declaration]
>    if (setuid (current_user.uid) < 0)
>        ^~~~~~
>        getpid
> shell.c:1305:7: warning: implicit declaration of function 'setgid';
> did you mean 'getpid'? [-Wimplicit-function-declaration]
>    if (setgid (current_user.gid) < 0)
>        ^~~~~~
>        getpid
> In file included from shell.c:40:
> shell.c: In function 'open_shell_script':
> ./include/filecntl.h:33:46: error: 'F_SETFD' undeclared (first use in
> this function)
>  #define SET_CLOSE_ON_EXEC(fd)  (fcntl ((fd), F_SETFD, FD_CLOEXEC))
>                                               ^~~~~~~
> shell.c:1640:3: note: in expansion of macro 'SET_CLOSE_ON_EXEC'
>    SET_CLOSE_ON_EXEC (default_buffered_input);
>    ^~~~~~~~~~~~~~~~~
> In file included from general.h:46,
>                  from shell.h:29,
>                  from shell.c:53:
> shell.c: In function 'get_current_user_info':
> shell.c:1818:46: error: dereferencing pointer to incomplete type 'struct 
> passwd'
>     current_user.user_name = savestring (entry->pw_name);
>                                               ^~
> xmalloc.h:48:32: note: in definition of macro 'xmalloc'
>  #define xmalloc(x) sh_xmalloc((x), __FILE__, __LINE__)
>                                 ^
> shell.c:1818:29: note: in expansion of macro 'savestring'
>     current_user.user_name = savestring (entry->pw_name);
>                              ^~~~~~~~~~
> make: *** [Makefile:101: shell.o] Error 1
> =======================================================================================
>
>
> _______________________________________________
> Msys2-users mailing list
> Msys2-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/msys2-users


_______________________________________________
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to