Subject: bug#11456: closed (Re: bug#11456: guile-2.0.5 fails to compile under mingw+msys)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 04 Jul 2012 19:33:01 +0000

Your bug report

#11456: guile-2.0.5 fails to compile under mingw+msys

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
11456: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11456
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#11456: guile-2.0.5 fails to compile under mingw+msys
From: Andy Wingo <[email-masked]>
To: gnuemacser <[email-masked]>
Cc: [email-masked]
Date: Wed, 04 Jul 2012 21:27:06 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Sorry for the long delay in the response.

On Sat 12 May 2012 00:53, gnuemacser <[email-masked]> writes:

> I got the sources of guile-2.0.5 and I tried to compile them under 
> mingw+msys.
> The compilation failed because of this error:
> make[3]: Entering directory `/e/temp/files/1/guile/guile-2.0.5/libguile'
>   CC     libguile_2.0_la-threads.lo
> threads.c: In function 'to_timespec':
> threads.c:267:15: error: dereferencing pointer to incomplete type
> threads.c:268:15: error: dereferencing pointer to incomplete type
> threads.c:275:15: error: dereferencing pointer to incomplete type
> threads.c:276:15: error: dereferencing pointer to incomplete type
> threads.c: In function 'launch_thread':
> threads.c:1012:3: warning: implicit declaration of function
> 'GC_pthread_detach'

I think you are building with the default --with-threads argument, which
is to enable them.  If you want threads on mingw, you will have to use
the pthread wrapper for mingw, and build libgc with pthread support.
Otherwise, build guile --without-threads.

Regards,

Andy
-- 
http://wingolog.org/

Subject: guile-2.0.5 fails to compile under mingw+msys
From: gnuemacser <[email-masked]>
To: <[email-masked]>
Date: Sat, 12 May 2012 06:53:02 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,
I got the sources of guile-2.0.5 and I tried to compile them under 
mingw+msys.
The compilation failed because of this error:make[3]: Entering directory `/e/temp/files/1/guile/guile-2.0.5/libguile'
  CC     libguile_2.0_la-threads.lo
threads.c: In function 'to_timespec':
threads.c:267:15: error: dereferencing pointer to incomplete type
threads.c:268:15: error: dereferencing pointer to incomplete type
threads.c:275:15: error: dereferencing pointer to incomplete type
threads.c:276:15: error: dereferencing pointer to incomplete type
threads.c: In function 'launch_thread':
threads.c:1012:3: warning: implicit declaration of function 'GC_pthread_detach'
[-Wimplicit-function-declaration]
threads.c: In function 'scm_call_with_new_thread':
threads.c:1048:3: warning: implicit declaration of function 'GC_pthread_create'
[-Wimplicit-function-declaration]
threads.c: In function 'scm_join_thread_timed':
threads.c:1229:18: error: storage size of 'ctimeout' isn't known
threads.c:1229:18: warning: unused variable 'ctimeout' [-Wunused-variable]
threads.c: In function 'fat_mutex_lock':
threads.c:1453:41: error: dereferencing pointer to incomplete type
threads.c:1454:36: error: dereferencing pointer to incomplete type
threads.c:1455:43: error: dereferencing pointer to incomplete type
threads.c: In function 'scm_lock_mutex_timed':
threads.c:1487:18: error: storage size of 'cwaittime' isn't known
threads.c:1487:18: warning: unused variable 'cwaittime' [-Wunused-variable]
threads.c: In function 'scm_try_mutex':
threads.c:1536:18: error: storage size of 'cwaittime' isn't known
threads.c:1536:18: warning: unused variable 'cwaittime' [-Wunused-variable]
threads.c: In function 'fat_mutex_unlock':
threads.c:1610:4:
 warning: passing argument 4 of 'block_self' discards 'const' qualifier 
from pointer target type [enabled by default]
threads.c:438:1: note: expected 'struct scm_t_timespec *' but argument is of type 'const struct scm_t_timespec *'
threads.c: In function 'scm_unlock_mutex_timed':
threads.c:1679:18: error: storage size of 'cwaittime' isn't known
threads.c:1679:18: warning: unused variable 'cwaittime' [-Wunused-variable]
threads.c: In function 'scm_timed_wait_condition_variable':
threads.c:1783:18: error: storage size of 'waittime' isn't known
threads.c:1783:18: warning: unused variable 'waittime' [-Wunused-variable]
threads.c: In function 'scm_pthread_cond_timedwait':
threads.c:1984:3: warning: passing argument 3 of 'pthread_cond_timedwait' from incompatible pointer type [enabled by default]
d:\dev\mingw\include/pthread.h:1097:31:
 note: expected 'const struct timespec *' but argument is of type 'const
 struct scm_t_timespec *'
make[3]: *** [libguile_2.0_la-threads.lo] Error 1
make[3]: Leaving directory `/e/temp/files/1/guile/guile-2.0.5/libguile'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/e/temp/files/1/guile/guile-2.0.5/libguile'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/e/temp/files/1/guile/guile-2.0.5'
make: *** [all] Error 2

i'm
 chinese and my english isn't well. but i think the problem is about the
 timespec and scm_t_timespec in function pthread_cond_timedwait .