At first, I try to build with same approach as in Linux.
Youhei@3935-CF61 ~ $ tar -jxvf ruby-1.9.1-p378.tar.bz2 Youhei@3935-CF61 ~ $ cd ruby-1.9.1-p378 Youhei@3935-CF61 ~/ruby-1.9.1-p378 $ ./configure --prefix=/opt/ruby-1.9.1 --enable-shared Youhei@3935-CF61 ~/ruby-1.9.1-p378 $ makeBut error like below occured in make process.
In file included from ../ruby_1_9/signal.c:531: C:\Qt\2009.05\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../mingw32/include/pthread.h:307: error: redefinition of 'struct timespec'
Similar error has already reported in ruby-core mailing list(23577, 23578).
It's the reason that struct timespec definition is duplicated at include/ruby/missing.h and C:\Qt\2009.05\mingw\mingw32\include\pthread.h
include/ruby/missing.h
#if !defined(HAVE_STRUCT_TIMESPEC)
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
};
#endif
C:\Qt\2009.05\mingw\mingw32\include\pthread.hSo I replace struct timespec definition in include/ruby/missing.h with one in C:\Qt\2009.05\mingw\mingw32\include\pthread.h, then I retry to build. Error of struct timespec definition has been solved, but another error occured. to be continued...
#ifndef HAVE_STRUCT_TIMESPEC
#define HAVE_STRUCT_TIMESPEC 1
struct timespec {
long tv_sec;
long tv_nsec;
};
#endif /* HAVE_STRUCT_TIMESPEC */
1 comment:
so which one is right?
Thanks!
-rp
Post a Comment