From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Volker Grabsch Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.bugs Subject: Re: Guile with win32 cross compiling Date: Fri, 20 May 2011 14:25:52 +0200 Message-ID: <20110520122552.GA2454@flap> References: <20110326220651.GA8300@flap> <20110401185020.GC13643@flap> <20110423161003.GB20479@flap> <20110516230101.GB3311@flap> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1305894371 26421 80.91.229.12 (20 May 2011 12:26:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 20 May 2011 12:26:11 +0000 (UTC) Cc: bug-guile@gnu.org, guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri May 20 14:26:06 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QNOmI-00009h-1S for guile-devel@m.gmane.org; Fri, 20 May 2011 14:26:02 +0200 Original-Received: from localhost ([::1]:44812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNOmH-0004F1-6Q for guile-devel@m.gmane.org; Fri, 20 May 2011 08:26:01 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNOmD-0004Eb-UB for guile-devel@gnu.org; Fri, 20 May 2011 08:25:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNOmC-0000xb-GB for guile-devel@gnu.org; Fri, 20 May 2011 08:25:57 -0400 Original-Received: from mail.notjusthosting.com ([78.47.75.226]:51207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNOmC-0000x7-2Q; Fri, 20 May 2011 08:25:56 -0400 Original-Received: from port-212-202-105-197.static.qsc.de ([212.202.105.197] helo=flap) by mail.notjusthosting.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1QNOm9-0002AF-EN; Fri, 20 May 2011 12:25:53 +0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 78.47.75.226 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12510 gmane.lisp.guile.bugs:5585 Archived-At: Hello Andy, thanks for the quick reply and for accepting and cleaning up my patches so far. Andy Wingo schrieb: > > CC net_db.lo > > net_db.c:460:1: error: 'AI_ALL' undeclared here (not in a function) > > net_db.c:460:1: error: expression in static assertion is not an integer > > net_db.c:482:33: warning: 'struct addrinfo' declared inside parameter list [enabled by default] [...] > If your target does not have e.g. struct addrinfo, because it does not > have IPv6, then you need to configure with > ac_cv_type_struct_addrinfo=no. Check your config.log. Or should this > be working somehow? > > There are other ac_cv_* for getaddrinfo and other routines. Okay, so I'm trying to get along without this ugly "ac_cv_type_struct_addrinfo" hack, hoping that the following error report will be more useful to you. 1) My first attempt is to enable threads via: ./configure --host=i686-pc-mingw32 --disable-shared --with-threads LIBS='-lunistring -lintl -liconv' This leads to the attached (compressed) config.log: config.log.with-threads.bz2 Make stops at this point: --------------------------------------------------------------- CC libguile_2.0_la-threads.lo threads.c: In function 'to_timespec': threads.c:245:15: error: dereferencing pointer to incomplete type threads.c:246:15: error: dereferencing pointer to incomplete type threads.c:253:15: error: dereferencing pointer to incomplete type threads.c:254:15: error: dereferencing pointer to incomplete type threads.c: In function 'launch_thread': threads.c:974:3: warning: implicit declaration of function 'GC_pthread_detach' [-Wimplicit-function-declaration] threads.c: In function 'scm_call_with_new_thread': threads.c:1009:3: warning: implicit declaration of function 'GC_pthread_create' [-Wimplicit-function-declaration] threads.c: In function 'scm_join_thread_timed': threads.c:1188:18: error: storage size of 'ctimeout' isn't known threads.c:1188:18: warning: unused variable 'ctimeout' [-Wunused-variable] threads.c: In function 'fat_mutex_lock': threads.c:1408:41: error: dereferencing pointer to incomplete type threads.c:1409:36: error: dereferencing pointer to incomplete type threads.c:1410:43: error: dereferencing pointer to incomplete type threads.c: In function 'scm_lock_mutex_timed': threads.c:1442:18: error: storage size of 'cwaittime' isn't known threads.c:1442:18: warning: unused variable 'cwaittime' [-Wunused-variable] threads.c: In function 'scm_try_mutex': threads.c:1476:18: error: storage size of 'cwaittime' isn't known threads.c:1476:18: warning: unused variable 'cwaittime' [-Wunused-variable] threads.c: In function 'scm_unlock_mutex_timed': threads.c:1619:18: error: storage size of 'cwaittime' isn't known threads.c:1619:18: warning: unused variable 'cwaittime' [-Wunused-variable] threads.c: In function 'scm_timed_wait_condition_variable': threads.c:1723:18: error: storage size of 'waittime' isn't known threads.c:1723:18: warning: unused variable 'waittime' [-Wunused-variable] threads.c: In function 'scm_pthread_cond_timedwait': threads.c:1924:3: warning: passing argument 3 of 'pthread_cond_timedwait' from incompatible pointer type [enabled by default] /home/vog/mingw-cross-env/usr/lib/gcc/i686-pc-mingw32/4.6.0/../../../../i686-pc-mingw32/include/pthread.h:1069:31: note: expected 'const struct timespec *' but argument is of type 'const struct scm_t_timespec *' --------------------------------------------------------------- 2) My second attempt is to build without threading: This leads to a slightly different config.log which I also attached: config.log.without-threads.bz2 Make then stops at the same point with just a few less error messages: --------------------------------------------------------------- CC libguile_2.0_la-threads.lo threads.c: In function 'to_timespec': threads.c:245:15: error: dereferencing pointer to incomplete type threads.c:246:15: error: dereferencing pointer to incomplete type threads.c:253:15: error: dereferencing pointer to incomplete type threads.c:254:15: error: dereferencing pointer to incomplete type threads.c: In function 'scm_cancel_thread': threads.c:1124:7: warning: statement with no effect [-Wunused-value] threads.c: In function 'scm_join_thread_timed': threads.c:1188:18: error: storage size of 'ctimeout' isn't known threads.c:1188:18: warning: unused variable 'ctimeout' [-Wunused-variable] threads.c: In function 'fat_mutex_lock': threads.c:1408:41: error: dereferencing pointer to incomplete type threads.c:1409:36: error: dereferencing pointer to incomplete type threads.c:1410:43: error: dereferencing pointer to incomplete type threads.c: In function 'scm_lock_mutex_timed': threads.c:1442:18: error: storage size of 'cwaittime' isn't known threads.c:1442:18: warning: unused variable 'cwaittime' [-Wunused-variable] threads.c: In function 'scm_try_mutex': threads.c:1476:18: error: storage size of 'cwaittime' isn't known threads.c:1476:18: warning: unused variable 'cwaittime' [-Wunused-variable] threads.c: In function 'scm_unlock_mutex_timed': threads.c:1619:18: error: storage size of 'cwaittime' isn't known threads.c:1619:18: warning: unused variable 'cwaittime' [-Wunused-variable] threads.c: In function 'scm_timed_wait_condition_variable': threads.c:1723:18: error: storage size of 'waittime' isn't known threads.c:1723:18: warning: unused variable 'waittime' [-Wunused-variable] --------------------------------------------------------------- I ran builds builds from a clean Git checkout of commit "19761af161942ef18aa2b7891cbf718fc5be5945" of the stable-2.0 branch. Note that I would of course prefer a thread-supporting build of Guile, but the problem is that "libgc" refuses to build under MinGW with Pthreads, so I had to build libgc with "--enable-threads=win32". On the other hand, it seems that Guile assumes "libgc" to be built with "--enable-threads=pthreads". I'm not sure whether this should be fixed in libgc or in Guile. Nevertheless, this only accounts for half of the issues, as Guile also fails to build without threading suppport (--without-threads). As a final note, I'm using the "Pthreads-w32" library to provide pthread support under MinGW. (http://sourceware.org/pthreads-win32/) Greets, Volker -- Volker Grabsch ---<<(())>>---