From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: ar via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" Newsgroups: gmane.lisp.guile.bugs Subject: bug#40847: compile errors and missing dependencies when building in mingw32 on windows Date: Sat, 25 Apr 2020 09:17:19 +0000 (UTC) Message-ID: <1412843657.56007.1587806239867@mail.yahoo.com> References: <1412843657.56007.1587806239867.ref@mail.yahoo.com> Reply-To: ar Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_56006_1304125835.1587806239864" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="97938"; mail-complaints-to="usenet@ciao.gmane.io" To: 40847@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Apr 25 14:42:31 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jSK8d-000P1Z-1E for guile-bugs@m.gmane-mx.org; Sat, 25 Apr 2020 14:42:31 +0200 Original-Received: from localhost ([::1]:36268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSK8I-0002Rw-KD for guile-bugs@m.gmane-mx.org; Sat, 25 Apr 2020 08:42:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44012) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSK8C-0002Rm-7c for bug-guile@gnu.org; Sat, 25 Apr 2020 08:42:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSK8A-000837-V2 for bug-guile@gnu.org; Sat, 25 Apr 2020 08:42:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47448) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jSK8A-000832-J4 for bug-guile@gnu.org; Sat, 25 Apr 2020 08:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jSK8A-0007T3-Fu for bug-guile@gnu.org; Sat, 25 Apr 2020 08:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: ar Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 25 Apr 2020 12:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40847 X-GNU-PR-Package: guile X-Debbugs-Original-To: "bug-guile@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.158781850728665 (code B ref -1); Sat, 25 Apr 2020 12:42:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Apr 2020 12:41:47 +0000 Original-Received: from localhost ([127.0.0.1]:58992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSK7v-0007SC-1g for submit@debbugs.gnu.org; Sat, 25 Apr 2020 08:41:47 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:50364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSGwO-0006Z5-Gs for submit@debbugs.gnu.org; Sat, 25 Apr 2020 05:17:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55028) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSGwD-0002zo-UN for bug-guile@gnu.org; Sat, 25 Apr 2020 05:17:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSGwB-0005CR-NP for bug-guile@gnu.org; Sat, 25 Apr 2020 05:17:29 -0400 Original-Received: from sonic304-56.consmr.mail.bf2.yahoo.com ([74.6.128.31]:33088) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jSGwA-0004w5-VW for bug-guile@gnu.org; Sat, 25 Apr 2020 05:17:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1587806242; bh=YKWdAQc1Aa622AhIw7iAqx1kcdyR2rVeEQ/q+MLNe5Y=; h=Date:From:To:Subject:References:From:Subject; b=XoZx4dt6p32yNgyiacJ1vkzkQw9ay3kDxG8q/J999NWWkfrLxsYLlE+32dYhUyPXVQMy1qWmn/PyJ9/lr1B8MFDRLy4KICij5xZ13CWiwW4+QGqVF3sW+phpndflhGRXK6rXOJxf8KGKIAtC1Yy3WId4GWr8VPe+pypGq+acpW0d0FPxPfjS5QPjcTh2Z+xsvHat+YIjdiPzl5dTDtzFPDr2I1CxGkkODr5xY3MCL5+WzmBZb7ZhfS2n+X2lEiBFdqgL1XyBwM+OaTKj6O1snCnjTIqrAOAXvN8gBg9jdEyqc8kS+6GtQWO7NYJeiLtplQ+xQ/UZ181TE8euUK7ybw== X-YMail-OSG: sBSqaLwVM1mZ3itOCQJBdmzqxzBdq1dXxjtyXvKA7jgfTAzhYyWPHpIJOYeUpsK E8uvxgLTenyATWdzrr_atE_5iipv2wH_D9QR1b6DJ8HESLVMoVzFJR6IxTbOx6Z0rMWIhYFvBuHm JpLcL3cE4wz25cWq8NLHSqjM0rEqzmetzmvW5wzzr2mh4FUDu4xDTondCTgmZ2.hMZygzMOR9_dC nUIgAzSVzMiQtn37R.4HJjk8IoSSGvM_km.RD6ZVitUZ6_E9AS9DIU1UmPe.p7zOCrDlmd3PfxBy cw08Wr_nrKLwP5IMhF5BU2a1OroHYPSoUq8gcDSJGTTb0gIt85gzTbgLktJlGaPMX.hybOaeSqjT RBvqSG6bMuTy3cpGobkyBt3.bszUSv8KQhWqMUQxeIpaY31NyFibMrqWCTFwSct95sFM3W7HNTeI 9dub2nkyffVbREo8PgG7PVKr65sfwvSe8Q.FsYvHp4ROEHxBWafnL0e1dXkp0m2owAeiz4COFfOY nn04oVn.cIcXgbcqqoN_iF3HqekgB9n41l0oA5LYq6XVKKr62kjU2Qywni.smeozNHqiVzQGKi4p 4Grhuuo3YO8cXymBldnAgIdYi_8o3mgBX7LTF0sw5Ifw3QHXUiBqcRuny5GyXSY1e_LjDHIKbPhL .0Mx3vHgZA1LaglPOV26R1WKoD4zjeFHkOL27mz9993Y1mRwtO8gaNZm26.CjuRdJWIMEfzOQrFj _LuJiVcsjR2zgUIS6.lrrNm7cV6p3EjlNfsNtcxVtU35uU4KMYaNpmIpAqDayJw4k5sbLA.FEnzX 6BHeYHPMz9F2whFshb2Srd4wDhkD86pWnCnQlBeNmt Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.bf2.yahoo.com with HTTP; Sat, 25 Apr 2020 09:17:22 +0000 X-Mailer: WebService/1.1.15756 YMailNorrin Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18363 Received-SPF: pass client-ip=74.6.128.31; envelope-from=roboticarm2000-ti@yahoo.com; helo=sonic304-56.consmr.mail.bf2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/25 05:17:22 X-ACL-Warn: Detected OS = Linux 3.1-3.10 X-Mailman-Approved-At: Sat, 25 Apr 2020 08:41:44 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9732 Archived-At: ------=_Part_56006_1304125835.1587806239864 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I'm trying to compile guile 3.0.2 on a windows 32bit machine using Mingw32. I was able to successfully run the configure script with no errors. FYI I h= ad to compile the following libraries from source in order for the configur= e script to finish because for some reason the libraries installed by pacma= n didn't work.- libtool 2.4.6- libunistring 0.9.10- libffi 3.3- libgc 8.0.4= - readline 8.0- termcap 1.3.1 When I try to build I get the following error when compiling poll.lo Error 1:D:/msys32/mingw32/i686-w64-mingw32/include/winsock2.h:1185:16: erro= r: redefinitipollfd' =C2=A01185 | typedef struct pollfd { =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^~~~~~ In file included from poll.c:32: ./poll.h:405:8: note: originally defined here =C2=A0 405 | struct pollfd =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = ^~~~~~ poll.c:329:1: error: conflicting types for 'poll' =C2=A0 329 | poll (struct pollfd *pfd, nfds_t nfd, int timeout) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | ^~~~ In file included from poll.c:32: ./poll.h:435:1: note: previous declaration of 'poll' was here =C2=A0 435 | _GL_FUNCDECL_SYS (poll, int, (struct pollfd *pfd, nfds_t nfd, = int timeou =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | ^~~~~~~~~~~~~~~~ make[4]: *** [Makefile:2128: poll.lo] Error 1 Fix 1:My solution to get around this was to comment the definition of struc= t pollfd and the declaration=C2=A0of GL_FUNCDECL_SYS (poll ... Error 2: The next error is in libguile/socket.c =C2=A0 SNARF=C2=A0 socket.x socket.c:43:10: fatal error: netinet/tcp.h: No such file or directory =C2=A0=C2=A0 43 | #include =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 ^~~~~~~~~~~~~~~ compilation terminated. Fix 2:I commented the includes and replaced with #inclu= de I noticed that lib/socket.c correctly includes instead of Error 3:The next error is=C2=A0 jit.c:29:10: fatal error: sys/mman.h: No such file or directory =C2=A0=C2=A0 29 | #include =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 ^~~~~~~~~~~~ Fix 3:so I downloaded the library from https://github.com/witwall/mman-win3= 2and configured it to install in /mingw32. =C2=A0 This seemed to work. Error 4: Next errorIn file included from posix.c:63: posix-w32.h:67:9: error: unknown type name 'DWORD_PTR' =C2=A0=C2=A0 67 | typedef DWORD_PTR cpu_set_t; Fix 4:so added #include Error 5:posix-w32.h:73:13: error: expected ';' before 'int' =C2=A0=C2=A0 73 | SCM_INTERNAL int uname (struct utsname * uts); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^~~~ Fix 5:so added #include "libguile/scm.h" Error 6:Finally, get undefined functions error from the linkerD:/msys32/min= gw32/bin/../lib/gcc/i686-w64-mingw32/9.3.0/../../../../i686-w64-mingw32/bin= /ld.exe: .libs/libguile_3.0_la-jit.o: in function `allocate_code_arena': C:\Users\\Downloads\guile-3.0.2\libguile/jit.c:1333: undefined reference to= `mmap' D:/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.3.0/../../../../i686-w6= 4-mingw32/bin/ld.exe: .libs/libguile_3.0_la-jit.o: in function `emit_code': C:\Users\\Downloads\guile-3.0.2\libguile/jit.c:1394: undefined reference to= `munmap' D:/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.3.0/../../../../i686-w6= 4-mingw32/bin/ld.exe: ../lib/.libs/libgnu.a(timegm.o): in function `timegm'= : C:\Users\\Downloads\guile-3.0.2\lib/timegm.c:39: undefined reference to `mk= time_internal' And at this point, I tried every way I could to add the path to the libmann= .a but I couldn't make it work. It seems the errors are in the configure scripts and in the list of require= d dependencies.=C2=A0 The undefined reference to mmap and munmap has to be = something silly that I'm missing.=C2=A0 The next big mystery is the mktime_= internal. Thanks, El amor a la patria tiene que transformarse en acci=C3=B3n y =C3=A9sta tien= e que ser acci=C3=B3n para el bien com=C3=BAn. (Adalexis Rios- mi madre) ------=_Part_56006_1304125835.1587806239864 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'm trying to compile guile 3.0.2 on a= windows 32bit machine using Mingw32.

= I was able to successfully run the configure script with no errors. FYI I h= ad to compile the following libraries from source in order for the configur= e script to finish because for some reason the libraries installed by pacma= n didn't work.
- libtool 2.4.6
- libunistrin= g 0.9.10
- libffi 3.3
- libgc 8.0.4
- readline 8.0
- termcap 1.3.1

When I try to build I get the following error when compiling p= oll.lo

Error 1:
D:/msys32= /mingw32/i686-w64-mingw32/include/winsock2.h:1185:16: error: redefinitipoll= fd'
 1185 | typedef struct pollfd {
    &nbs= p; |            = ;    ^~~~~~
In file included from poll.c:32:
./poll.h:= 405:8: note: originally defined here
  405 | struct pollfd
 = ;     |        ^~~~~= ~
poll.c:329:1: error: conflicting types for 'poll'
  329 | poll= (struct pollfd *pfd, nfds_t nfd, int timeout)
    &= nbsp; | ^~~~
In file included from poll.c:32:
./poll.h:435:1: note: p= revious declaration of 'poll' was here
  435 | _GL_FUNCDECL_SYS (po= ll, int, (struct pollfd *pfd, nfds_t nfd, int timeou
   &= nbsp;  | ^~~~~~~~~~~~~~~~
make[4]: *** [Makefile:2128: poll.lo] Err= or 1

Fix 1:
My solution t= o get around this was to comment the definition of struct pollfd and the de= claration
 of GL_FUNCDECL_SYS (poll ...
=

Error 2:
The next error is in li= bguile/socket.c

  SNARF  socke= t.x
socket.c:43:10: fatal error: netinet/tcp.h: No such file or director= y
   43 | #include <netinet/tcp.h>
   =    |          ^~~~~~= ~~~~~~~~~
compilation terminated.

Fix 2:
I commented the includes <netinet/=E2=80=A6> and replaced wit= h #include <winsock2.h>
I noticed that lib/socket.= c correctly includes <winsock.h> instead of <netinet/tcp.h>


Error 3:
The next error is 
= jit.c:29:10: fatal error: sys/mman.h: No such file or directory
 &n= bsp; 29 | #include <sys/mman.h>
      |&n= bsp;         ^~~~~~~~~~~~
=

<= /div>
Fix 3:
so I downloaded the library from https://github.com/witwall/mman-win32
and configure= d it to install in /mingw32.   This seemed to work.

Error 4:
Next error
= In file included from posix.c:63:
posix-w32.h:67:9: error: unknown type = name 'DWORD_PTR'
   67 | typedef DWORD_PTR cpu_set_t;

Fix 4:
so added #include <wind= ef.h>


Error 5:
posix-w32.h:73:13: error: expected ';' before 'int'
 &= nbsp; 73 | SCM_INTERNAL int uname (struct utsname * uts);
  &n= bsp;   |         &nb= sp;   ^~~~
Fix 5:=
so added #include "libguile/scm.h"

Error 6:
Finally, get undefined functions error from the linker
D:/msys32/mingw32/bin/../lib/gcc/i686-w6= 4-mingw32/9.3.0/../../../../i686-w64-mingw32/bin/ld.exe: .libs/libguile_3.0= _la-jit.o: in function `allocate_code_arena':
C:\Users\\Downloads\guile-= 3.0.2\libguile/jit.c:1333: undefined reference to `mmap'
D:/msys32/mingw= 32/bin/../lib/gcc/i686-w64-mingw32/9.3.0/../../../../i686-w64-mingw32/bin/l= d.exe: .libs/libguile_3.0_la-jit.o: in function `emit_code':
C:\Users\\D= ownloads\guile-3.0.2\libguile/jit.c:1394: undefined reference to `munmap'D:/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.3.0/../../../../i686-= w64-mingw32/bin/ld.exe: ../lib/.libs/libgnu.a(timegm.o): in function `timeg= m':
C:\Users\\Downloads\guile-3.0.2\lib/timegm.c:39: undefined reference= to `mktime_internal'
<= strike>

And at this point, I tried every way I could= to add the path to the libmann.a but I couldn't make it work.


It seems the errors are in the configure scripts = and in the list of required dependencies.  The undefined reference to = mmap and munmap has to be something silly that I'm missing.  The next = big mystery is the mktime_internal.

=
Thanks,






El amor a la patria tiene qu= e transformarse en acci=C3=B3n y =C3=A9sta tiene que ser acci=C3=B3n para e= l bien com=C3=BAn. (Adalexis Rios- mi madre)
------=_Part_56006_1304125835.1587806239864--