unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* libguile-1.8.5 fails to compile under mingw+msys
@ 2008-07-18 15:12 carlo.bramix
  2008-07-21 12:33 ` Neil Jerram
  0 siblings, 1 reply; 5+ messages in thread
From: carlo.bramix @ 2008-07-18 15:12 UTC (permalink / raw)
  To: guile-devel

Hello,
I got the sources of libguile-1.8.5 and I tried to compile them under mingw+msys.
The compilation failed because of this error:

../../guile-1.8.5/libguile/threads.c: In function `scm_timed_wait_condition_variable':
../../guile-1.8.5/libguile/threads.c:1277: error: storage size of 'waittime' isn't known
../../guile-1.8.5/libguile/threads.c:1277: warning: unused variable `waittime'
make[3]: *** [libguile_la-threads.lo] Error 1

After a quick test I discovered what has happened.
The configure script tries to check the presence of timespec structure under pthread include files.
If the script founds the structure, it defines HAVE_STRUCT_TIMESPEC into config.h.
But this define is a disaster for the pthread-win32, because pthread.h checks HAVE_STRUCT_TIMESPEC too for not defining timespec structure twice.
The result is that the structure is never defined because of the above macro and the compilation fails with that error.

I think it is a bad idea to do the test on timespec structure in that manner, at least for mingw.
The timespec structure does not exist under Win32.
This is the point we are all sure about.
So you should not do assumptions about the content of pthread.h
I believe it's better to avoid such trick on Win32 and define scm_t_timespec as if the timespec structure is unknown.
After fixing it, the compilation advanced the critical point.

When it arrives at linking, it fails again, with:
"*** Warning: linker path does not have real file for library -lws2_32."
Then some symbols are undefined because the linker expects to find them from shared library (with "__imp_" prefix) but this is another trouble...

Sincerely,

Carlo Bramini.






^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <K4F42F$4B8886EB5C781A5F6B7D5F32F0025982@libero.it>]

end of thread, other threads:[~2009-01-23 17:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-18 15:12 libguile-1.8.5 fails to compile under mingw+msys carlo.bramix
2008-07-21 12:33 ` Neil Jerram
     [not found] <K4F42F$4B8886EB5C781A5F6B7D5F32F0025982@libero.it>
2009-01-23  1:13 ` Neil Jerram
2009-01-23 16:15   ` Ludovic Courtès
2009-01-23 17:08     ` Neil Jerram

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