Re: FreeTDS 0.82 Tests on Solaris - libiconv Undefined Symbols

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Hi,
  about iconv and configure is normal, the test just detect proper
signature. In this case  const is required so testing for no-const
gave error you reported. About in_addr warning the fix was committed
on early 2009 as a post-0.82 patch, You can find patched version at
http://freetds.sourceforge.net/ or
http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/. About linking
problem yesterday I back ported a patch at
http://freetds.sourceforge.net/, updated version which include this
patch should be available in a couple of days (I can send an updated
version if you prefer).

Regards
  Frediano Ziglio

2010/7/27 Richard Head Jr. <[email protected]>:
> I saw a similar problem here: http://lists.ibiblio.org/pipermail/freetds/2009q1/024229.html
>
>
> In my case, libiconv is resolved but config.log shows there are other issues:
>
> configure:11602: checking how to link with libiconv
> configure:11604: result: -liconv
> configure:11615: checking for iconv declaration
> configure:11649: gcc -c -g -O2  -D_FREETDS_LIBRARY_SOURCE conftest.c >&5
> conftest.c:32: error: conflicting types for `libiconv'
> /usr/local/include/iconv.h:83: error: previous declaration of `libiconv'
> configure:11655: $? = 1
> configure: failed program was:
> | /* confdefs.h.  */
> |
> | #define PACKAGE_NAME "FreeTDS"
> | #define PACKAGE_TARNAME "freetds"
> | #define PACKAGE_VERSION "0.82"
> | #define PACKAGE_STRING "FreeTDS 0.82"
> | #define PACKAGE_BUGREPORT ""
> | #define PACKAGE "freetds"
> | #define VERSION "0.82"
> | #define _GNU_SOURCE 1
> | #define _FILE_OFFSET_BITS 64
> | #define STDC_HEADERS 1
> | #define HAVE_SYS_TYPES_H 1
> | #define HAVE_SYS_STAT_H 1
> | #define HAVE_STDLIB_H 1
> | #define HAVE_STRING_H 1
> | #define HAVE_MEMORY_H 1
> | #define HAVE_STRINGS_H 1
> | #define HAVE_INTTYPES_H 1
> | #define HAVE_UNISTD_H 1
> | #define HAVE_DLFCN_H 1
> | #define HAVE_ICONV 1
> | /* end confdefs.h.  */
> |
> | #include <stdlib.h>
> | #include <iconv.h>
> | extern
> | #ifdef __cplusplus
> | "C"
> | #endif
> | #if defined(__STDC__) || defined(__cplusplus)
> | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
> | #else
> | size_t iconv();
> | #endif
> |
> | int
> | main ()
> | {
> |
> |   ;
> |   return 0;
> | }
> configure:11683: result:
>         extern size_t iconv (iconv_t cd, const char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
>
>
> Here's the test output:
>
> Making check in include
> make[1]: Entering directory `/mounts/sysadm/mss/usr/src/freetds-0.82/include'
> echo '#define FREETDS_SYSCONFDIR "/mounts/sysadm/mss/etc"' >freetds_sysconfdir.h
> make[1]: Leaving directory `/mounts/sysadm/mss/usr/src/freetds-0.82/include'
> Making check in src
> make[1]: Entering directory `/mounts/sysadm/mss/usr/src/freetds-0.82/src'
> Making check in replacements
> make[2]: Entering directory `/mounts/sysadm/mss/usr/src/freetds-0.82/src/replacements'
> if /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../include  -I../../include -D_FREETDS_LIBRARY_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG=1 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -D_REENTRANT -pthreads -g -O2 -MT asprintf.lo -MD -MP -MF ".deps/asprintf.Tpo" -c -o asprintf.lo asprintf.c; \
> then mv -f ".deps/asprintf.Tpo" ".deps/asprintf.Plo"; else rm -f ".deps/asprintf.Tpo"; exit 1; fi
>  gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -D_FREETDS_LIBRARY_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG=1 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -D_REENTRANT -pthreads -g -O2 -MT asprintf.lo -MD -MP -MF .deps/asprintf.Tpo -c asprintf.c  -fPIC -DPIC -o .libs/asprintf.o
>  gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -D_FREETDS_LIBRARY_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG=1 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -D_REENTRANT -pthreads -g -O2 -MT asprintf.lo -MD -MP -MF .deps/asprintf.Tpo -c asprintf.c -o asprintf.o >/dev/null 2>&1
> if /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../include  -I../../include -D_FREETDS_LIBRARY_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG=1 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -D_REENTRANT -pthreads -g -O2 -MT vasprintf.lo -MD -MP -MF ".deps/vasprintf.Tpo" -c -o vasprintf.lo vasprintf.c; \
> then mv -f ".deps/vasprintf.Tpo" ".deps/vasprintf.Plo"; else rm -f ".deps/vasprintf.Tpo"; exit 1; fi
>  gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -D_FREETDS_LIBRARY_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG=1 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -D_REENTRANT -pthreads -g -O2 -MT vasprintf.lo -MD -MP -MF .deps/vasprintf.Tpo -c vasprintf.c  -fPIC -DPIC -o .libs/vasprintf.o
>  gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -D_FREETDS_LIBRARY_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG=1 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -D_REENTRANT -pthreads -g -O2 -MT vasprintf.lo -MD -MP -MF .deps/vasprintf.Tpo -c vasprintf.c -o vasprintf.o >/dev/null 2>&1
> /bin/bash ../../libtool --tag=CC --mode=link gcc -D_REENTRANT -pthreads -g -O2   -o libreplacements.la   iconv.lo gettimeofday.lo asprintf.lo vasprintf.lo readpassphrase.lo
> rm -fr  .libs/libreplacements.a .libs/libreplacements.la
> ar cru .libs/libreplacements.a .libs/iconv.o .libs/gettimeofday.o .libs/asprintf.o .libs/vasprintf.o .libs/readpassphrase.o
> ranlib .libs/libreplacements.a
> creating libreplacements.la
> (cd .libs && rm -f libreplacements.la && ln -s ../libreplacements.la libreplacements.la)
> make[2]: Leaving directory `/mounts/sysadm/mss/usr/src/freetds-0.82/src/replacements'
> Making check in tds
> make[2]: Entering directory `/mounts/sysadm/mss/usr/src/freetds-0.82/src/tds'
> make  check-recursive
> make[3]: Entering directory `/mounts/sysadm/mss/usr/src/freetds-0.82/src/tds'
> Making check in unittests
> make[4]: Entering directory `/mounts/sysadm/mss/usr/src/freetds-0.82/src/tds/unittests'
> make  t0001 t0002 t0003 t0004 t0005 t0006 t0007 t0008 dynamic1 convert dataread utf8_1 utf8_2 utf8_3 numeric iconv_fread
> make[5]: Entering directory `/mounts/sysadm/mss/usr/src/freetds-0.82/src/tds/unittests'
> if gcc -DHAVE_CONFIG_H -I. -I. -I../../../include  -I../../../include -I./.. -I../ -D_FREETDS_LIBRARY_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG=1 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -D_REENTRANT -pthreads -g -O2 -MT t0001.o -MD -MP -MF ".deps/t0001.Tpo" -c -o t0001.o t0001.c; \
> then mv -f ".deps/t0001.Tpo" ".deps/t0001.Po"; else rm -f ".deps/t0001.Tpo"; exit 1; fi
> In file included from common.h:22,
>                 from t0001.c:19:
> ../../../include/tds.h:1422: warning: `struct in_addr' declared inside parameter list
> ../../../include/tds.h:1422: warning: its scope is only this definition or declaration, which is probably not what you want
> ../../../include/tds.h:1422: warning: parameter has incomplete type
> if gcc -DHAVE_CONFIG_H -I. -I. -I../../../include  -I../../../include -I./.. -I../ -D_FREETDS_LIBRARY_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG=1 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -D_REENTRANT -pthreads -g -O2 -MT common.o -MD -MP -MF ".deps/common.Tpo" -c -o common.o common.c; \
> then mv -f ".deps/common.Tpo" ".deps/common.Po"; else rm -f ".deps/common.Tpo"; exit 1; fi
> In file included from common.h:22,
>                 from common.c:1:
> ../../../include/tds.h:1422: warning: `struct in_addr' declared inside parameter list
> ../../../include/tds.h:1422: warning: its scope is only this definition or declaration, which is probably not what you want
> ../../../include/tds.h:1422: warning: parameter has incomplete type
> /bin/bash ../../../libtool --tag=CC --mode=link gcc -D_REENTRANT -pthreads -g -O2 -no-install  -o t0001  t0001.o common.o  ../libtds.la ../../replacements/libreplacements.la -lnsl -lsocket
> gcc -D_REENTRANT -pthreads -g -O2 -o t0001 t0001.o common.o  ../.libs/libtds.a ../../replacements/.libs/libreplacements.a -lnsl -lsocket
> Undefined                       first referenced
>  symbol                             in file
> libiconv_close                      ../.libs/libtds.a(iconv.o)
> libiconv_open                       ../.libs/libtds.a(iconv.o)
> libiconv                            ../.libs/libtds.a(iconv.o)
> ld: fatal: Symbol referencing errors. No output written to t0001
> collect2: ld returned 1 exit status
> make[5]: *** [t0001] Error 1
> make[5]: Leaving directory `/mounts/sysadm/mss/usr/src/freetds-0.82/src/tds/unittests'
> make[4]: *** [check-am] Error 2
> make[4]: Leaving directory `/mounts/sysadm/mss/usr/src/freetds-0.82/src/tds/unittests'
> make[3]: *** [check-recursive] Error 1
> make[3]: Leaving directory `/mounts/sysadm/mss/usr/src/freetds-0.82/src/tds'
> make[2]: *** [check] Error 2
> make[2]: Leaving directory `/mounts/sysadm/mss/usr/src/freetds-0.82/src/tds'
> make[1]: *** [check-recursive] Error 1
> make[1]: Leaving directory `/mounts/sysadm/mss/usr/src/freetds-0.82/src'
> make: *** [check-recursive] Error 1
>
>
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
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.