Skip to Content.
Sympa Menu

freetds - Re: [freetds] 0.63 Release Candidate 1

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] 0.63 Release Candidate 1
  • Date: Wed, 01 Dec 2004 19:59:50 +0100

Il mer, 2004-12-01 alle 17:46, joshua stein ha scritto:
> > This will fix the problem however I don't understand where does
> > -L/usr/local/lib came... The line that call libtool came from our
> > Makefile but I didn't fine any reference to /usr/local in my
> > Makefile.in. I suspect some test in configure or an additional
> > configuration...
>
> yes, the /usr/local/lib was coming from the --with-libiconv-prefix
> option, which the openbsd port uses.
>
> should libtool be called with '-L../tds/.libs' before any other
> libraries added by configure/LDFLAGS?
>
> this is how it is now in src/apps:
>
> /bin/sh ../../libtool --mode=link cc -O2 -pipe -L/usr/local/lib -o tsql
> tsql.o -lncurses -lreadline ../tds/libtds.la -lc
> cc -O2 -pipe -o .libs/tsql tsql.o -L/usr/local/lib -lncurses -lreadline
> -L../tds/.libs -ltds -liconv -Wl,-rpath,/usr/local/lib
> tsql.o(.text+0xd62): In function `main':
> : undefined reference to `tds_free_connection'
> tsql.o(.text+0xd87): In function `main':
> : undefined reference to `tds_free_connection'
> collect2: ld returned 1 exit status
>
> if i put a -L../tds/.libs before the -L/usr/local/lib, it links
> correctly:
>
> /bin/sh ../../libtool --mode=link cc -O2 -pipe -L../tds/.libs
> -L/usr/local/lib -o tsql tsql.o -lncurses -lreadline ../tds/libtds.la -lc
> cc -O2 -pipe -o .libs/tsql tsql.o
> -L/usr/ports/databases/freetds/w-freetds-0.63RC2/freetds-0.63RC2/src/tds/.libs
> -L/usr/local/lib -lncurses -lreadline -L../tds/.libs -ltds -liconv
> -Wl,-rpath,/usr/local/lib
> creating tsql
>
> the easy way to fix this is to just uninstall the current freetds
> package before compiling, but since this is for the openbsd ports
> tree, i can't control what other people will do when building the
> port.

Well, RC2 should work for you however this patch should solve too

--- acinclude.m4 29 Dec 2003 22:37:31 -0000 1.24
+++ acinclude.m4 1 Dec 2004 18:52:04 -0000
@@ -34,11 +34,13 @@
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1
and
dnl those with the standalone portable GNU libiconv installed).


+ save_LDFLAGS="$LDFLAGS"
+ LIBICONV=
AC_ARG_WITH([libiconv-prefix],
AC_HELP_STRING([--with-libiconv-prefix=DIR], [search for libiconv in
DIR/include and DIR/lib]), [
for dir in `echo "$withval" | tr : ' '`; do
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS
-I$dir/include"; fi
- if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
+ if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib";
LIBICONV="-L$dir/lib"; fi
done
])


@@ -88,10 +90,12 @@
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
[Define as const if the declaration of iconv() needs const.])
fi
- LIBICONV=
if test "$am_cv_lib_iconv" = yes; then
- LIBICONV="-liconv"
+ LIBICONV="$LIBICONV -liconv"
+ else
+ LIBICONV=
fi
+ LDFLAGS="$save_LDFLAGS"
AC_SUBST(LIBICONV)
])


(it require to execute autogen.sh having developing tools like automake,
autoconf and so on)

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page