Project

General

Profile

Actions

Bug #1060

closed

mkmf refuses to find 3rd party extensions - ruby 1.9.1 trunk

Added by cfis (Charlie Savage) almost 16 years ago. Updated over 13 years ago.

Status:
Rejected
Assignee:
-
Target version:
ruby -v:
-
Backport:
[ruby-core:21598]

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

mkmf_cfis.patch (344 Bytes) mkmf_cfis.patch cfis (Charlie Savage), 01/27/2009 05:39 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0