Re: libiconv-prefix seems broken

"Wood, David" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Hi James,

>> v0.82 configure failed to detect my installation of GNU libiconv.  I
>> eventually realised that freetds-0.82.1.dev.20081111 doesn't ship
with
>> config.rpath.  
>
> http://www.gnu.org/software/autoconf/manual/autoconf.html
>
> I didn't find word one about a config.rpath in the documentation.

This might help:

 
http://www.gnu.org/software/automake/manual/automake.html#Local-Macros
(read 6.3.4 through gettextize)
 
http://www.gnu.org/software/automake/manual/gettext/gettextize-Invocatio
n.html (search for config.rpath)

> Not sure how/if that relates to your problem report, though.

More detail:

    /tmp/freetds > ls config.rpath
    config.rpath: No such file or directory

    /tmp/freetds > grep config.rpath configure
        ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" >
conftest.sh

    /tmp/freetds > ./configure --with-libiconv-prefix=/usr/local/gnu
    ...
    checking for shared library run path origin... /bin/bash:
./config.rpath: No such file or directory
    ...
    checking for iconv... yes
    checking for iconv declaration...
         extern size_t iconv (iconv_t cd, const char * *inbuf, size_t
*inbytesleft, char * *outbuf, size_t *outbytesleft);
    ...
    /tmp/freetds > grep '^LIBICONV' config.log
    LIBICONV=''

As you can see, GNU libiconv wasn't included since LIBICONV is empty.
Adding "set -x" at a few key places reveals:

    + shlibext=
    ...
    + test -n ''
    + test -f /usr/local/gnu/lib/libiconv.    <<<< very odd!!
    + test X = X
    
>From the configure script:

            if test -n "$shlibext" && test -f
"$additional_libdir/lib$name.$shlibext"; then
              found_dir="$additional_libdir"
              found_so="$additional_libdir/lib$name.$shlibext"

>From my generated config.rpath:

    master.nyc:/tmp/usr/local/pkg/freetds > egrep '^shrext|^shlibext="'
config.rpath
    shrext=.so
    shlibext="$shlibext"

So - config.rpath is quite important since it sets shlibext for
configure!  Now I'll build with a valid config.rpath:

    /tmp/freetds > ls config.rpath
    config.rpath
    /tmp/freetds > ./configure --with-libiconv-prefix=/usr/local/gnu
    ...
    /tmp/freetds > grep '^LIBICONV' config.log
    LIBICONV='/usr/local/gnu/lib/libiconv.so -R/usr/local/gnu/lib'

Voila - GNU libiconv is being used!  

BTW - freetds-0.83.dev.20090104 seems to include config.rpath:

    master.nyc:/tmp/freetds-0.83.dev.20090104 > ls config.rpath
    config.rpath

I guess this makes sense since you'd assume that a package either
includes ALL or NONE of the autofoo generated files.

> You should see the change in tomorrow's CVS HEAD
> snapshot.  If that works for you, I'll do the same 
> thing to the 0.82 branch.  

Cool - thanks!! I'll give it a whirl tomorrow and let you know.  David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.