Fail to build extension libraries that includes some ruby header files

e$B1sF#$G$9!#e(B

1.9 e$B$G$Oe(B st.h e$B$de(B util.h e$B$J$I$,e(B ruby/st.h
e$B$J$I$K0\F0$7$F$$$k$?$a$K!"e(B
#include “st.h” e$B$H$7$F$$$k3HD%%i%$%V%i%j$,8.JB$_%S%k%I$G$-$^$;$s!#e(B

e$B0\F0$7$?M}M3$rCN$i$J$$$N$G$9$,!"$3$l$O3HD%%i%$%V%i%jB&$GBP=h$9$Y$-e(B
e$BLdBj$G$7$g$&$+!#$b$7$=$&[email protected]$H$7$?$i!"e(B1.8 e$B$G$be(B 1.9
e$B$G$b%S%k%I$G$-$ke(B
e$B3HD%%i%$%V%i%j$O$I$&$d$C$?$i=q$1$k$G$7$g$&$+!#e(B

e$B:XF#$H?=$7$^$9!#e(B

On Sun, 10 Aug 2008 21:34:54 +0900
“Yusuke ENDOH” [email protected] wrote:

e$B0\F0$7$?M}M3$rCN$i$J$$$N$G$9$,!"$3$l$O3HD%%i%$%V%i%jB&$GBP=h$9$Y$-e(B
e$BLdBj$G$7$g$&$+!#$b$7$=$&[email protected]$H$7$?$i!"e(B1.8 e$B$G$be(B 1.9 e$B$G$b%S%k%I$G$-$ke(B
e$B3HD%%i%$%V%i%j$O$I$&$d$C$?$i=q$1$k$G$7$g$&$+!#e(B

e$B<+J,$b3HD%%i%$%V%i%j$r=q$$$F$*$j!"0l;~4|G:$s$G$?$N$G$9$,!“e(B
e$B!&e(Bextconf.rbe$B$NCf!“e(B<ruby/ruby.h>e$B$,$”$k$+$I$&$+$Ge(B1.9e$B$+H]$+$r%A%’%C%/$7$Fe(B
e$B!&%=!<%9Cf$Ge(B#ifdef HAVE_RUBY_RUBY_H
e$B$9$l$P$$$$$N$G$O$J$$$G$7$g$&$+!#e(B
(HAVE_RUBY_UTIL_He$B$J$I$r8D!9$K%A%’%C%/$9$kI,MW$^$G$O$J$$$N$G$O!”$H$$$&H=CG$G$9e(B)

extconf.rb:
have_header(“ruby/ruby.h”)

Ce$B%=!<%9e(B:
#ifdef HAVE_RUBY_RUBY_H

include <ruby/util.h>

include <ruby/st.h>

#else

include <util.h>

include <st.h>

#endif

e$B$^$?JL2r$H$7$F$O!"e(Bext/dbme$B$,$d$C$F$$$k$h$&$K!“e(Bextconf.rbe$B$Ge(B$defse$B$KDj?t$rDI2C$9$ke(B
e$B;v$G%X%C%@L>$rEO$9$d$jJ}$b$”$k$H;W$$$^$9!#e(B

extconf.rb:
if have_header(“ruby/ruby.h”)
util_hdr, st_hdr = “<ruby/util.h>”, “<ruby/st.h>”
else
util_hdr, st_hdr = “<util.h>”, “<st.h>”
end
$defs << %(-DRUBY_UTIL_HDR=’#{util_hdr}’) <<
%(-DRUBY_ST_HDR=’#{st_hdr}’)

Ce$B%=!<%9e(B:
#include RUBY_UTIL_HDR
#include RUBY_ST_HDR

e$B$H$$$&46$8$G!#e(B

e$B<+J,$OA0<T$,9%$_$G$9$,!“B>$K?d>)$5$l$kJ}K!$,$”$l$P!"<+J,$b65$([email protected]$-$?$$$G$9!#e(B

[email protected]$G$9!#e(B

At Sun, 10 Aug 2008 21:34:54 +0900,
Yusuke ENDOH wrote in [ruby-dev:35811]:

1.9 e$B$G$Oe(B st.h e$B$de(B util.h e$B$J$I$,e(B ruby/st.h e$B$J$I$K0\F0$7$F$$$k$?$a$K!"e(B
#include “st.h” e$B$H$7$F$$$k3HD%%i%$%V%i%j$,8.JB$_%S%k%I$G$-$^$;$s!#e(B

e$B0\F0$7$?M}M3$rCN$i$J$$$N$G$9$,!"$3$l$O3HD%%i%$%V%i%jB&$GBP=h$9$Y$-e(B
e$BLdBj$G$7$g$&$+!#$b$7$=$&[email protected]$H$7$?$i!"e(B1.8 e$B$G$be(B 1.9 e$B$G$b%S%k%I$G$-$ke(B
e$B3HD%%i%$%V%i%j$O$I$&$d$C$?$i=q$1$k$G$7$g$&$+!#e(B

util.he$B$de(Bconfig.he$B$J$I!"$$$+$K$bB>$H$+$V$j$=$&$J$b$N$rJ,N%$9$k$?$ae(B
e$B$G$9!#e(B

At Sun, 10 Aug 2008 22:32:49 +0900,
Tadashi S. wrote in [ruby-dev:35812]:

e$B<+J,$b3HD%%i%$%V%i%j$r=q$$$F$*$j!"0l;~4|G:$s$G$?$N$G$9$,!"e(B
e$B!&e(Bextconf.rbe$B$NCf!“e(B<ruby/ruby.h>e$B$,$”$k$+$I$&$+$Ge(B1.9e$B$+H]$+$r%A%’%C%/$7$Fe(B

1.9e$B$Ne(Bruby.he$B$G$O!"e(BHAVE_RUBY_RUBY_He$B$J$I$,Dj5A:Q$_$G$9!#e(B

e$B$3$s$J$H$3$m$G$I$&$G$7$g$&$+!#e(Binclude/ruby/backwarde$B$Oe(B2.0e$B$^$G$K$Oe(B
e$B:o=|$9$k$H$$$&$3$H$G!#e(B

Index: lib/mkmf.rb

— lib/mkmf.rb (revision 18470)
+++ lib/mkmf.rb (working copy)
@@ -1758,5 +1758,7 @@ def init_mkmf(config = CONFIG)
$CPPFLAGS = with_config(“cppflags”, arg_config(“CPPFLAGS”,
config[“CPPFLAGS”])).dup
$LDFLAGS = with_config(“ldflags”, arg_config(“LDFLAGS”,
config[“LDFLAGS”])).dup

  • $INCFLAGS = “-I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir)”
  • $INCFLAGS = “-I$(arch_hdrdir)”
  • $INCFLAGS << " -I$(hdrdir)/ruby/backward" unless $extmk
  • $INCFLAGS << " -I$(hdrdir) -I$(srcdir)"
    $DLDFLAGS = with_config(“dldflags”, arg_config(“DLDFLAGS”,
    config[“DLDFLAGS”])).dup
    $LIBEXT = config[‘LIBEXT’].dup
    Index: include/ruby/backward/util.h
    ===================================================================
    — include/ruby/backward/util.h (revision 0)
    +++ include/ruby/backward/util.h (revision 0)
    @@ -0,0 +1,6 @@
    +#if defined GNUC
    +#warning use “ruby/util.h” instead bare “util.h”
    +#elif defined _MSC_VER
    +#pragma message(“warning: use “ruby/util.h” instead bare “util.h””)
    +#endif
    +#include “…/…/ruby/util.h”

Property changes on: include/ruby/backward/util.h


Name: svn:keywords

  • Author Id Revision
    Name: svn:eol-style
  • LF

Index: include/ruby/backward/st.h

— include/ruby/backward/st.h (revision 0)
+++ include/ruby/backward/st.h (revision 0)
@@ -0,0 +1,6 @@
+#if defined GNUC
+#warning use “ruby/st.h” instead bare “st.h”
+#elif defined _MSC_VER
+#pragma message(“warning: use “ruby/st.h” instead bare “st.h””)
+#endif
+#include “ruby/st.h”

Property changes on: include/ruby/backward/st.h

e$B1sF#$G$9!#e(B

2008/08/10 22:59 Nobuyoshi N. [email protected]:

util.he$B$de(Bconfig.he$B$J$I!"$$$+$K$bB>$H$+$V$j$=$&$J$b$N$rJ,N%$9$k$?$ae(B
e$B$G$9!#e(B

e$B$&!<$s!"$J$k$[$I!#e(B

At Sun, 10 Aug 2008 22:32:49 +0900,
Tadashi S. wrote in [ruby-dev:35812]:

e$B<+J,$b3HD%%i%$%V%i%j$r=q$$$F$*$j!"0l;~4|G:$s$G$?$N$G$9$,!"e(B
e$B!&e(Bextconf.rbe$B$NCf!“e(B<ruby/ruby.h>e$B$,$”$k$+$I$&$+$Ge(B1.9e$B$+H]$+$r%A%’%C%/$7$Fe(B

e$B$U!<$`!"$J$k$[$I!#e(B

e$B$3$s$J$H$3$m$G$I$&$G$7$g$&$+!#e(Binclude/ruby/backwarde$B$Oe(B2.0e$B$^$G$K$Oe(B
e$B:o=|$9$k$H$$$&$3$H$G!#e(B

e$B$I$&$;=>Mh$N3HD%%i%$%V%i%[email protected]$J$7$Ge(B 1.9
e$B$G;H$([email protected]$ODc$$$N$G!“e(B
e$B0l;~E*$J8_49AX$O$”$C$F$b$J$/$F$b$$$$$+$J$!!"$H$$$&5$;}$A$G$9!#e(B

e$B$9$4$/QkFaE*$K9M$($k$H!"$3$N%Q%C%A$r$"$F$k$HL$NA0$Ne(B rcairo

e$B$,e(B

e$B%S%k%I$G$-$k$h$&$K$J$k$N$G!"8D?ME*$K$O4r$7$$e(B

e$B?\F#$G$9!#e(B

2008/08/11 2:37 Yusuke ENDOH [email protected]:

e$B$9$4$/QkFaE*$K9M$($k$H!"$3$N%Q%C%A$r$"$F$k$HL$NA0$Ne(B rcairo e$B$,e(B

e$B%S%k%I$G$-$k$h$&$K$J$k$N$G!"8D?ME*$K$O4r$7$$e(B

e$B0l1~!"e(BHEADe$B$G$Oe(B1.9e$B$G$b%S%k%I$G$-$k$h$&$K$J$C$F$$$F!"6a$$$&$A$Ke(B
e$B%j%j!<%9$9$kM=Dj$G$9!#e(Bextconf.rbe$B$Ge(Bruby/st.he$B$r%A%’%C%/$7$F$$$^$9!#e(B

e$B:XF#$H?=$7$^$9!#e(B

On Sun, 10 Aug 2008 22:59:51 +0900
Nobuyoshi N. [email protected] wrote:

At Sun, 10 Aug 2008 22:32:49 +0900,
Tadashi S. wrote in [ruby-dev:35812]:

e$B<+J,$b3HD%%i%$%V%i%j$r=q$$$F$*$j!"0l;~4|G:$s$G$?$N$G$9$,!"e(B
e$B!&e(Bextconf.rbe$B$NCf!“e(B<ruby/ruby.h>e$B$,$”$k$+$I$&$+$Ge(B1.9e$B$+H]$+$r%A%’%C%/$7$Fe(B

1.9e$B$Ne(Bruby.he$B$G$O!"e(BHAVE_RUBY_RUBY_He$B$J$I$,Dj5A:Q$_$G$9!#e(B

e$B$J$k$[$I!"$=$&$G$9$+!#<+J,$Oe(B1.9e$B0J9_!"e(B<ruby/ruby.h>e$B$re(Bincludee$B$9$k$N$,?d>)$J$N$+$He(B
(e$B%5%$%:$r$_$F>!<j$Ke(B)e$B;W$$9~$s$G$$$^$7$?!#e(B

e$B$G$O<+J,$NNc$G$O!“e(B1.8e$B$G$be(B1.9e$B$G$b%S%k%I$G$-$k%=!<%9$K$O!”$3$s$J46$8$NJ*$,e(B
e$BA[Dj$5$l$k$N$G$7$g$&$+!#e(B

extconf.rb: e$BDI5-$J$7e(B

Ce$B%=!<%9e(B:
#include <ruby.h> /* e$B$I$C$A$K$b$"$ke(B /
#ifdef HAVE_RUBY_RUBY_H /
for 1.9 */

include <ruby/util.h>

include <ruby/st.h>

#else /* for 1.8 */

include <util.h>

include <st.h>

#endif

e$B$=$l$H$b!“B>$Ne(BHAVE_RUBY_UTIL_He$B$J$I$r8DJL$Ke(B#ifdefe$B$9$kI,[email protected](B
and/or e$B%a%j%C%H$,e(B
e$B$”$k$N$G$7$g$&$+!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs