DO NOT REPLY [Bug 5532] rsync / autoconf fails to detect libiconv on Solaris 10

samba-bugs at samba.org samba-bugs at samba.org
Wed Jul 9 00:59:59 GMT 2008


https://bugzilla.samba.org/show_bug.cgi?id=5532





------- Comment #3 from Greg.Robinson at dsto.defence.gov.au  2008-07-08 19:59 CST -------
Hi,

You are right.  Solaris 10 does not need iconv to build.  I built it on a
system which doesn't have this /usr/local and it built fine.

I ran another test on this /usr/local and I think configure is checking
/usr/local/lib by itself, and somehow passing the test, and then expecting
libiconv to be there.

Checking config.log for all instances of iconv I find:

configure.sh:12409: checking for library containing libiconv_open
configure.sh:12450: /usr/sfw/bin/gcc -std=gnu99 -o conftest -g -O2
-DHAVE_CONFIG
_H -Wall -W   conftest.c -lsocket -lnsl  >&5
Undefined                       first referenced
 symbol                             in file
libiconv_open                       /var/tmp//ccsRkaQS.o
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure.sh:12456: $? = 1

And then the next occurance (roughly):

configure.sh:12450: /usr/sfw/bin/gcc -std=gnu99 -o conftest -g -O2
-DHAVE_CONFIG
_H -Wall -W   conftest.c -liconv  -lsocket -lnsl  >&5
ld: fatal: library -liconv: not found
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status
configure.sh:12456: $? = 1

But, the next occurance (my iconv is 2 years old):

configure.sh:12493: checking for iconv declaration
configure.sh:12532: /usr/sfw/bin/gcc -std=gnu99 -c -g -O2 -DHAVE_CONFIG_H -Wall 
-W  conftest.c >&5
conftest.c:97: error: conflicting types for 'libiconv'
/usr/local/include/iconv.h:83: error: previous declaration of 'libiconv' was
her
e
conftest.c:97: error: conflicting types for 'libiconv'
/usr/local/include/iconv.h:83: error: previous declaration of 'libiconv' was
her
e
configure.sh:12538: $? = 1

Then:

configure.sh:14808: checking for iconv_open
configure.sh:14864: /usr/sfw/bin/gcc -std=gnu99 -o conftest -g -O2
-DHAVE_CONFIG
_H -Wall -W   conftest.c -lsec -lsocket -lnsl  >&5
configure.sh:14870: $? = 0
configure.sh:14888: result: yes

Which results in:
ac_cv_func_iconv_open=yes
ac_cv_header_iconv_h=yes
ac_cv_search_libiconv_open=no
am_cv_proto_iconv='extern size_t iconv (iconv_t cd, const char * *inbuf, size_t 
*inbytesleft, char * *outbuf, size_t *outbytesleft);'
am_cv_proto_iconv_arg1=const

and of course:

#define HAVE_ICONV_OPEN 1

As you can see, you are right in that iconv_open is being built successfully. 
It appears that the libiconv_open test fails, and the iconv_open test succeeds.

I think I've reached the limits of my debugging efforts.  Any ideas?


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the rsync mailing list