Message-ID: <email address hidden> Date: Thu, 12 Jan 2006 23:21:00 +0900 From: akira yamada <email address hidden> To: Roger Leigh <email address hidden>, <email address hidden> Subject: Re: Bug#347759: ruby1.8-dev: /usr/lib/ruby/1.8/mkmf.rb have_func() fails to find functions in libc
Roger Leigh wrote: > $ cat extconf.rb > require 'mkmf' > > $LDFLAGS = "-L/usr/local/lib"; > $CFLAGS = "-I/usr/local/include"; > have_library( "xpg4", "setlocale" ); > have_header( "locale.h" ); > if ( have_header( "libintl.h" ) and (have_library( "intl", "gettext" ) > or have_func( "gettext" )) ) > create_makefile( "intl" ); > end > > This fails to find gettext() in libc, and so the build fails.
I think it is not a bug of mkmf.rb.
$ ruby1.8 -rmkmf -e 'have_func("gettext")' checking for gettext()... no $ ruby1.8 -rmkmf -e 'have_func("gettext", "libintl.h")' checking for gettext()... yes
How about the following patch?:
--- extconf.rb.orig 2006-01-12 23:17:49.000000000 +0900 +++ extconf.rb 2006-01-12 23:17:27.000000000 +0900 @@ -1,11 +1,11 @@ require 'mkmf'
$LDFLAGS = "-L/usr/local/lib"; $CFLAGS = "-I/usr/local/include"; have_library( "xpg4", "setlocale" ); have_header( "locale.h" ); if ( have_header( "libintl.h" ) and (have_library( "intl", "gettext" ) or - have_func( "gettext" )) ) + have_func( "gettext", "libintl.h" )) ) create_makefile( "intl" ); end
-- akira yamada
Message-ID: <email address hidden> ruby/1. 8/mkmf. rb have_func()
Date: Thu, 12 Jan 2006 23:21:00 +0900
From: akira yamada <email address hidden>
To: Roger Leigh <email address hidden>, <email address hidden>
Subject: Re: Bug#347759: ruby1.8-dev: /usr/lib/
fails to find functions in libc
Roger Leigh wrote: local/include" ;
> $ cat extconf.rb
> require 'mkmf'
>
> $LDFLAGS = "-L/usr/local/lib";
> $CFLAGS = "-I/usr/
> have_library( "xpg4", "setlocale" );
> have_header( "locale.h" );
> if ( have_header( "libintl.h" ) and (have_library( "intl", "gettext" )
> or have_func( "gettext" )) )
> create_makefile( "intl" );
> end
>
> This fails to find gettext() in libc, and so the build fails.
I think it is not a bug of mkmf.rb.
$ ruby1.8 -rmkmf -e 'have_func( "gettext" )' "gettext" , "libintl.h")'
checking for gettext()... no
$ ruby1.8 -rmkmf -e 'have_func(
checking for gettext()... yes
How about the following patch?:
--- extconf.rb.orig 2006-01-12 23:17:49.000000000 +0900
+++ extconf.rb 2006-01-12 23:17:27.000000000 +0900
@@ -1,11 +1,11 @@
require 'mkmf'
$LDFLAGS = "-L/usr/local/lib"; local/include" ; makefile( "intl" );
$CFLAGS = "-I/usr/
have_library( "xpg4", "setlocale" );
have_header( "locale.h" );
if ( have_header( "libintl.h" ) and
(have_library( "intl", "gettext" ) or
- have_func( "gettext" )) )
+ have_func( "gettext", "libintl.h" )) )
create_
end
--
akira yamada