Bug #1060
closedmkmf refuses to find 3rd party extensions - ruby 1.9.1 trunk
Description
=begin
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 <winsock2.h>
4: #include <windows.h>
5: #include <tcl.h>
/ 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.
=end
Files