GNU bug report logs - #62226
bash-minimal fails to build on x86_64-w64-mingw32

Previous Next

Package: guix;

Reported by: Ekaitz Zarraga <ekaitz <at> elenq.tech>

Date: Thu, 16 Mar 2023 19:51:01 UTC

Severity: normal

To reply to this bug, email your comments to 62226 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#62226; Package guix. (Thu, 16 Mar 2023 19:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ekaitz Zarraga <ekaitz <at> elenq.tech>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 16 Mar 2023 19:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ekaitz Zarraga <ekaitz <at> elenq.tech>
To: "bug-guix <at> gnu.org" <bug-guix <at> gnu.org>
Subject: bash-minimal fails to build on x86_64-w64-mingw32
Date: Thu, 16 Mar 2023 19:50:14 +0000
Any package that uses `bash-minimal` to build in mingw (all of them?) fails when trying to build `bash-minimal` with the following error:

```
phase `patch-generated-file-shebangs' succeeded after 0.0 seconds
starting phase `build'
rm -f mksyntax.exe
gcc -DPROGRAM='"bash.exe"' -DCONF_HOSTTYPE='"x86_64"' -DCONF_OSTYPE='"mingw32"' -DCONF_MACHTYPE='"x86_64-w64-mingw32"' -DCONF_VENDOR='"w64"' -DLOCALEDIR='"/gnu/store/lb1afqc8mx7jjynpf8qbn6mc13h9p4ji-bash-minimal-5.1.8/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -g -DCROSS_COMPILING  -g -DCROSS_COMPILING -o mksyntax.exe ./mksyntax.c
In file included from ./mksyntax.c:23:
./config.h:361:19: error: two or more data types in declaration specifiers
  361 | #define socklen_t unsigned int
      |                   ^~~~~~~~
./config.h:361:28: error: two or more data types in declaration specifiers
  361 | #define socklen_t unsigned int
      |                            ^~~
make: *** [Makefile:720: mksyntax.exe] Error 1
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "make" arguments: () exit-status: 2 term-signal: #f stop-signal: #f>
phase `build' failed after 0.0 seconds
command "make" failed with status 2
note: keeping build directory `/tmp/guix-build-bash-minimal-5.1.8.drv-2'
builder for `/gnu/store/r3kiyak1js85m8achjf9jcbqq7asmjy3-bash-minimal-5.1.8.drv' failed with exit code 1
build of /gnu/store/r3kiyak1js85m8achjf9jcbqq7asmjy3-bash-minimal-5.1.8.drv failed
View build log at '/var/log/guix/drvs/r3/kiyak1js85m8achjf9jcbqq7asmjy3-bash-minimal-5.1.8.drv.gz'.
```

I'll investigate but I don't think I'll reach far on this one.

I already tried removing the offending lines from the `config.h` but other errors appear (how surprising :) )

Thanks all,
Ekaitz




Information forwarded to bug-guix <at> gnu.org:
bug#62226; Package guix. (Sat, 01 Apr 2023 11:15:02 GMT) Full text and rfc822 format available.

Message #8 received at 62226 <at> debbugs.gnu.org (full text, mbox):

From: Ekaitz Zarraga <ekaitz <at> elenq.tech>
To: "62226 <at> debbugs.gnu.org" <62226 <at> debbugs.gnu.org>
Subject: bash-minimal fails to build on x86_64-w64-mingw32
Date: Sat, 01 Apr 2023 11:14:11 +0000
Hi,

Adding:

```
"ac_cv_header_sys_socket_h=no"
```

To configure flags in the case the target is mingw solves the first issue, but more issues appear.

I have no enough knowledge about autotools to dig into this much further but it looks like we are finding wrong stuff in the configure step:

```
In file included from shell.c:28:
config.h:340:18: error: ‘long long long’ is too long for GCC
  340 | #define intmax_t long long
      |                  ^~~~
config.h:340:23: error: ‘long long long’ is too long for GCC
  340 | #define intmax_t long long
      |                       ^~~~
config.h:343:19: error: duplicate ‘unsigned’
  343 | #define uintmax_t unsigned long long
      |                   ^~~~~~~~
config.h:343:28: error: ‘long long long’ is too long for GCC
  343 | #define uintmax_t unsigned long long
      |                            ^~~~
config.h:343:33: error: ‘long long long’ is too long for GCC
  343 | #define uintmax_t unsigned long long
      |                                 ^~~~
In file included from bashjmp.h:24,
                 from shell.h:25,
                 from shell.c:53:
./include/posixjmp.h:29:21: error: unknown type name ‘sigjmp_buf’
   29 | #  define procenv_t sigjmp_buf
      |                     ^~~~~~~~~~
bashjmp.h:26:8: note: in expansion of macro ‘procenv_t’
   26 | extern procenv_t top_level;
      |        ^~~~~~~~~
./include/posixjmp.h:29:21: error: unknown type name ‘sigjmp_buf’
   29 | #  define procenv_t sigjmp_buf
      |                     ^~~~~~~~~~
bashjmp.h:27:8: note: in expansion of macro ‘procenv_t’
   27 | extern procenv_t subshell_top_level;
      |        ^~~~~~~~~
./include/posixjmp.h:29:21: error: unknown type name ‘sigjmp_buf’
   29 | #  define procenv_t sigjmp_buf
      |                     ^~~~~~~~~~
bashjmp.h:28:8: note: in expansion of macro ‘procenv_t’
   28 | extern procenv_t return_catch; /* used by `return' builtin */
      |        ^~~~~~~~~
./include/posixjmp.h:29:21: error: unknown type name ‘sigjmp_buf’
   29 | #  define procenv_t sigjmp_buf
      |                     ^~~~~~~~~~
bashjmp.h:29:8: note: in expansion of macro ‘procenv_t’
   29 | extern procenv_t wait_intr_buf;
      |        ^~~~~~~~~
In file included from shell.h:28,
                 from shell.c:53:
/gnu/store/7b119byi86gb3ab5x87ld9fz5xg5bwyd-mingw-w64-x86_64-10.0.0/include/ctype.h:144:13: error: expected identifier or ‘(’ before ‘int’
  144 | int __cdecl isblank(int _C);
      |             ^~~~~~~
syntax.h:103:27: error: expected ‘)’ before ‘==’ token
  103 | #  define isblank(x) ((x) == ' ' || (x) == '\t')
      |                           ^~
In file included from shell.h:29,
                 from shell.c:53:
general.h:33:12: fatal error: sys/resource.h: No such file or directory
   33 | #  include <sys/resource.h>
      |            ^~~~~~~~~~~~~~~~
compilation terminated.
```


ElenQ Technology
Ethical Innovation




This bug report was last modified 2 years and 74 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.