compilation error on CURRENT-20100118

Katsuhiro Kondou kondou at isc.org
Wed Feb 3 07:40:11 UTC 2010


In article <87mxzqer3g.fsf at windlord.stanford.edu>,
	Russ Allbery <rra at stanford.edu> wrote,
	on "Tue, 02 Feb 2010 23:05:55 -0800";

} This is smelling like an ordering problem in the linker.  Note that there
} are undefined references to the symbols in objects after the definition.
} I supsect the linker is being literal about linking the objects in the
} library in order.
} 
} This is the problem that ranlib generally fixes.  Is ranlib not being run
} on the libstorage.a library for some reason?  The Makefile looks correct;
} what is ranlib defined as in Makefile.global?

Yes, ranlib is used.

% grep RANLIB Makefile.global
RANLIB          = ranlib

% make
:
gcc -g -O2 -I../include  -I.   -c -o trash/trash.o trash/trash.c
ar r libstorage.a expire.o interface.o methods.o ov.o overdata.o overview.o ovmethods.o buffindexed/buffindexed.o buffindexed/shmem.o cnfs/cnfs.o ovdb/ovdb.o timecaf/caf.o timecaf/timecaf.o timehash/timehash.o tradindexed/tdx-cache.o tradindexed/tdx-data.o tradindexed/tdx-group.o tradindexed/tradindexed.o tradspool/tradspool.o trash/trash.o
ar: creating archive libstorage.a
ranlib libstorage.a

% ls -lc /usr/bin/ranlib
lrwxr-xr-x   1 root  wheel  7 Sep  8  2006 /usr/bin/ranlib -> libtool
% ls -lc /usr/bin/libtool
-r-xr-xr-x   1 root  wheel  285748 Sep  8  2006 /usr/bin/libtool
% file /usr/bin/libtool
/usr/bin/libtool: Mach-O universal binary with 2 architectures
/usr/bin/libtool (for architecture i386):       Mach-O executable i386
/usr/bin/libtool (for architecture ppc):        Mach-O executable ppc

} Does the problem go away if you configure with --enable-libtool?

No, and another problem happens, which I have not investigated so much.

% make
:
../libtool --mode=compile gcc -g -O2 -I../include  -c xwrite.c
libtool: compile:  gcc -g -O2 -I../include -c xwrite.c  -fno-common -DPIC -o .libs/xwrite.o
libtool: compile:  gcc -g -O2 -I../include -c xwrite.c -o xwrite.o >/dev/null 2>&1
../libtool --mode=link gcc -multiply_defined suppress -o libinn.la setproctitle.lo  argparse.lo buffer.lo cleanfrom.lo clientactive.lo clientlib.lo commands.lo concat.lo conffile.lo confparse.lo daemonize.lo date.lo dbz.lo defdist.lo dispatch.lo fdflags.lo fdlimit.lo getfqdn.lo getmodaddr.lo hash.lo hashtab.lo headers.lo hex.lo innconf.lo inndcomm.lo list.lo localopen.lo lockfile.lo makedir.lo md5.lo messageid.lo messages.lo mmap.lo network.lo newsuser.lo nntp.lo numbers.lo qio.lo radix32.lo readin.lo remopen.lo reservedfd.lo resource.lo sendarticle.lo sendpass.lo sequence.lo timer.lo tst.lo uwildmat.lo vector.lo wire.lo xfopena.lo xmalloc.lo xsignal.lo xwrite.lo  \
    -rpath /usr/local/news/lib -version-info 2:0:0
libtool: link: gcc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libinn.2.dylib  .libs/setproctitle.o .libs/argparse.o .libs/buffer.o .libs/cleanfrom.o .libs/clientactive.o .libs/clientlib.o .libs/commands.o .libs/concat.o .libs/conffile.o .libs/confparse.o .libs/daemonize.o .libs/date.o .libs/dbz.o .libs/defdist.o .libs/dispatch.o .libs/fdflags.o .libs/fdlimit.o .libs/getfqdn.o .libs/getmodaddr.o .libs/hash.o .libs/hashtab.o .libs/headers.o .libs/hex.o .libs/innconf.o .libs/inndcomm.o .libs/list.o .libs/localopen.o .libs/lockfile.o .libs/makedir.o .libs/md5.o .libs/messageid.o .libs/messages.o .libs/mmap.o .libs/network.o .libs/newsuser.o .libs/nntp.o .libs/numbers.o .libs/qio.o \
.libs/radix32.o .libs/readin.o .libs/remopen.o .libs/reservedfd.o .libs/resource.o .libs/sendarticle.o .libs/sendpass.o .libs/sequence.o .libs/timer.o .libs/tst.o .libs/uwildmat.o .libs/vector.o .libs/wire.o .libs/xfopena.o .libs/xmalloc.o .libs/xsignal.o .libs/xwrite.o    -multiply_defined   -install_name  /usr/local/news/lib/libinn.2.dylib -compatibility_version 3 -current_version 3.0 -Wl,-single_module
i686-apple-darwin8-gcc-4.0.1: /usr/local/news/lib/libinn.2.dylib: No such file or directory
make[1]: *** [libinn.la] Error 1
make: *** [all-lib] Error 2

-- 
Katsuhiro Kondou



More information about the inn-workers mailing list