Message-ID: <email address hidden>
Date: Thu, 12 Jan 2006 14:58:45 +0000
From: Roger Leigh <email address hidden>
To: akira yamada <email address hidden>
Cc: <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
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
akira yamada <email address hidden> writes:
> 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?:
This looks great, thanks.
I'm not a Ruby hacker myself, and assumed it was emulating the
autoconf AC_TRY_LINK, which does not require the header to be present.
Message-ID: <email address hidden> ruby/1. 8/mkmf. rb have_func() fails to find functions
Date: Thu, 12 Jan 2006 14:58:45 +0000
From: Roger Leigh <email address hidden>
To: akira yamada <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#347759: ruby1.8-dev: /usr/lib/
in libc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
akira yamada <email address hidden> writes:
> Roger Leigh wrote: local/include" ; "gettext" )' "gettext" , "libintl.h")'
>> $ 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(
> checking for gettext()... no
> $ ruby1.8 -rmkmf -e 'have_func(
> checking for gettext()... yes
>
> How about the following patch?:
This looks great, thanks.
I'm not a Ruby hacker myself, and assumed it was emulating the
autoconf AC_TRY_LINK, which does not require the header to be present.
I'll post the patch to the original bug.
Many thanks,
Roger
- --
Printing on GNU/Linux? http:// gimp-print. sourceforge. net/
Debian GNU/Linux http:// www.debian. org/ mailcrypt. sourceforge. net/>
Roger Leigh
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8+ <http://
iD8DBQFDxm6kVcF caSW/uEgRAgpHAJ 4jHpdbNOZ0IRWO6 bn3bytbGuhpMQCg 5f+T v5fPmkCw=
mbgpOiN84MunDpH
=DHqR
-----END PGP SIGNATURE-----