From: coma_killen@... Date: 2003-01-28T19:41:13+09:00 Subject: Re: "undefined ref to 'flock'" when compiling 1.8 under cygwin Hi, Thanks Watanabe-san. Problem was that a cygwin install with "Current" setup has gcc 2.95 and corresponding mingw libs. By explicitly installing latest versions of gcc and mingw latest ruby 1.8.0 can now be compiled and installed without problems. There seems to be troubles when building extension libraries now though. Sorry for repeatedly bugging you but I'm new to building ruby with mingw instead of cygwin and don't fully understand whats happening. I imagine the following problem stems from different version of include files available but don't know: $ ruby -v ruby 1.8.0 (2003-01-27) [i386-mingw32] $ pwd /tmp/ruby-zlib-0.5.1 $ ruby extconf.rb checking for deflateReset() in -lz... yes checking for zlib.h... no $ ruby extconf.rb --with-zlib-include=/usr/include checking for deflateReset() in -lz... yes checking for zlib.h... yes checking for block_given?... yes checking for rb_str_buf_new()... no checking for rb_io_print()... no checking for rb_io_printf()... no checking for rb_io_puts()... no checking for rb_io_addstr()... no checking for new NORETURN... yes checking for new allocation framework... yes guessing OS_CODE... Win32 ** Attention: ** If you find auto-detected OS_CODE is seem to be different ** from your platform, please report it as a bug. creating Makefile $ make gcc -mno-cygwin -DIMPORT -g -O2 -I. -ID:/usr/local/lib/ruby/1.8/i386-mingw32 -I D:/usr/local/lib/ruby/1.8/i386-mingw32 -I. -DHAVE_ZLIB_H -I/usr/include -DHAVE_ BLOCK_GIVEN_P -DHAVE_NEW_NORETURN -DHAVE_OBJECT_ALLOCATE -DOS_CODE=OS_WIN32 -c z lib.c In file included from /usr/include/stdio.h:46, from D:/usr/local/lib/ruby/1.8/i386-mingw32/win32/win32.h:57, from D:/usr/local/lib/ruby/1.8/i386-mingw32/defines.h:120, from D:/usr/local/lib/ruby/1.8/i386-mingw32/ruby.h:22, from zlib.c:9: /usr/include/sys/types.h:158: warning: useless keyword or type name in empty dec laration /usr/include/sys/types.h:158: warning: empty declaration /usr/include/sys/types.h:159: warning: useless keyword or type name in empty dec laration /usr/include/sys/types.h:159: warning: empty declaration In file included from /usr/include/unistd.h:6, from /usr/include/zconf.h:240, from /usr/include/zlib.h:34, from zlib.c:10: /usr/include/sys/unistd.h:75: conflicting types for `link' D:/usr/local/lib/ruby/1.8/i386-mingw32/win32/win32.h:176: previous declaration o f `link' /usr/include/sys/unistd.h:111: parse error before '(' token make: *** [zlib.o] Error 1 $ gcc --version gcc (GCC) 3.2 20020818 (prerelease) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Any hints appreciated. /Karsten -- http://fastmail.fm - Sent 0.000002 seconds ago