I'm getting the following error when I'm trying to do just `./configure; make` with the latest versions of rsync (both 2.6.7 and 2.6.8pre1): gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c lib/compat.c -o lib/compat.o lib/compat.c:171: error: conflicting types for `inet_aton' /usr/include/arpa/inet.h:74: error: previous declaration of `inet_aton' make: *** [lib/compat.o] Error 1 In config.log I also see 10 following strings: ./conftest: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory I do NOT get such errors when I compile rsync 2.6.6 the same way, libiconv.so.2 is also present in /usr/local/lib (2.6.6 seems not to try libiconv at all?). # grep -i aton rsync-2.6.6/config.log configure:11717: checking for broken inet_aton rsync_cv_REPLACE_INET_ATON=no # grep -i aton rsync-2.6.8pre1/config.log configure:11893: checking for broken inet_aton | if (inet_aton("example", &ip) == 0) exit(0); exit(1);} | #define REPLACE_INET_ATON 1 | #define REPLACE_INET_ATON 1 rsync_cv_REPLACE_INET_ATON=yes #define REPLACE_INET_ATON 1 `./configure 2>&1 | grep -i aton` on 2.6.6 said "checking for broken inet_aton... no" `./configure 2>&1 | grep -i aton` on 2.6.8pre1 said "checking for broken inet_aton... yes" I'm using Trustix Secure Linux 2.2 with kernel 2.4 and glibc 2.3.2. It a known/fixable problem, or is it my own problem? Denis Solovyov
Denis Solovyov
2006-Apr-13 10:58 UTC
[SOLVED] error compiling the latest versions of rsync
DS> I'm getting the following error when I'm trying to do just `./configure; DS> make` with the latest versions of rsync (both 2.6.7 and 2.6.8pre1): DS> gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c lib/compat.c -o lib/compat.o DS> lib/compat.c:171: error: conflicting types for `inet_aton' DS> /usr/include/arpa/inet.h:74: error: previous declaration of `inet_aton' DS> make: *** [lib/compat.o] Error 1 DS> In config.log I also see 10 following strings: DS> ./conftest: error while loading shared libraries: libiconv.so.2: cannot DS> open shared object file: No such file or directory Running `ldconfig` helped. I was right supposing that those two errors were interrelated... configure found libiconv and then did not want to "REPLACE_INET_ATON". Sorry for the alarm, but I never collided with such behaviour before, it was not obvious since all other software complied well all the time. Denis Solovyov
On Thu, Apr 13, 2006 at 07:56:01PM +0900, Denis Solovyov wrote:> Sorry for the alarm, but I never collided with such behaviour before, > it was not obvious since all other software complied well all the time.Thanks for the report anyway, as I discovered two things: (1) the code for replacing a broken inet_aton() was not quite right (it should have been more like the code for replacing a broken inet_ntoa()), and (more importantly) (2) no code in rsync these days even uses inet_aton() or inet_ntoa(), so the REPLACE_INET_xTOx configure checks and the replacement functions in lib/compat.c could just be removed. ..wayne..