unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Volker Grabsch <vog@notjusthosting.com>
To: Andy Wingo <wingo@pobox.com>
Cc: bug-guile@gnu.org, guile-devel@gnu.org
Subject: Re: Guile with win32 cross compiling
Date: Fri, 20 May 2011 14:25:52 +0200	[thread overview]
Message-ID: <20110520122552.GA2454@flap> (raw)
In-Reply-To: <m3mxihwtky.fsf@unquote.localdomain>

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
---<<(())>>---



  reply	other threads:[~2011-05-20 12:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-26 22:06 Guile with win32 cross compiling Volker Grabsch
2011-04-01 10:38 ` Andy Wingo
2011-04-01 18:50   ` Volker Grabsch
2011-04-12 11:14     ` Andy Wingo
2011-04-23 16:10       ` Volker Grabsch
2011-04-24 10:42         ` Andy Wingo
2011-05-16 23:01           ` Volker Grabsch
2011-05-20 10:32             ` Andy Wingo
2011-05-20 12:25               ` Volker Grabsch [this message]
2011-05-20 12:48                 ` Jan Nieuwenhuizen
2011-05-20 13:25                   ` Andy Wingo
2011-05-20 22:19                   ` Volker Grabsch
2011-06-17  9:03                     ` Andy Wingo
2011-07-01 13:52                       ` Andy Wingo
2011-04-24 20:22       ` Ludovic Courtès
2011-04-28 21:03         ` Andy Wingo
2011-06-19 14:42           ` Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2011-04-05 19:43 Mike Gran
2011-04-06  1:38 ` Volker Grabsch
2011-04-06 12:46   ` Ludovic Courtès
2011-03-26 22:04 Volker Grabsch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110520122552.GA2454@flap \
    --to=vog@notjusthosting.com \
    --cc=bug-guile@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=wingo@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).