From: Charlie Savage Date: 2009-01-27T16:16:45+09:00 Subject: [ruby-core:21598] [Bug #1060] mkmf refuses to find 3rd party extensions - ruby 1.9.1 trunk Bug #1060: mkmf refuses to find 3rd party extensions - ruby 1.9.1 trunk http://redmine.ruby-lang.org/issues/show/1060 Author: Charlie Savage Status: Open, Priority: High Category: core, Target version: 1.9.1 Reproducible Version: 1.9.1 RC2 When building with msys/mingw, mkmf incorrectly says header files don't exist when in fact they do. This happens when building the extensions for curses (PDCurses), tk, zlib etc. Let's use tk as an example. I downloaded, built and successfully installed tcl and tk using MinGw, on Vista, gcc 3.4.5. Then, I built ruby. As mentioned, the tk extension isn't built. Looking at ext/tk/mkmf.log: find_header: checking for tcl.h in ... -------------------- no "gcc -E -I../../.ext/include/i386-mingw32 -I../.././include -I../.././ext/tk -I/usr/local/include -I/usr/local/include -O2 -g -Wall -Wno-parentheses conftest.c -o conftest.i" checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include 4: #include 5: #include /* end */ Except, this isn't true! Paste the code into conftest.c, place it in ext/tk/conftest. Then: $ gcc -E -I../../.ext/include/i386-mingw32 -I../.././include -I../.././ext/tk - I/usr/local/include -I/usr/local/include -O2 -g -Wall -Wno-parentheses conf test.c -o conftest.i gcc runs fine - looking at the dirctory: $ ll conf* -rw-r--r-- 1 cfis Administrators 80 Jan 27 00:07 conftest.c -rw-r--r-- 1 cfis Administrators 944777 Jan 27 00:08 conftest.i conftest.i is built. Yet mkmf says the header does not exist, and does not build the extension. ---------------------------------------- http://redmine.ruby-lang.org