guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libguile-1.8.5 fails to compile under mingw+msys


From: carlo\.bramix
Subject: libguile-1.8.5 fails to compile under mingw+msys
Date: Fri, 18 Jul 2008 17:12:02 +0200

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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]