[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: readline, editline, sl and snprintf

>>>>> "Derrick" == Derrick J Brashear <shadow@dementia.org> writes:

Is this Heimdal 0.3d?

    Derrick> Shouldn't libsl when built dynamically link against
    Derrick> libroken instead of including e.g. snprintf.lo? I say
    Derrick> this because: /bin/sh ../../libtool --mode=link gcc -Wall
    Derrick> -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast
    Derrick> -Wmissing-declarations -Wnested-externs -g -O2 -o
    Derrick> libsl.la -rpath /usr/local/lib -version-info 1:0:1 sl.lo
    Derrick> strtok_r.lo snprintf.lo warnerr.lo strupr.lo
    Derrick> -L../../lib/editline -leditline -ltermcap -lresolv -lnsl
    Derrick> -lsocket -lresolv -lnsl -lsocket

I noticed a similar thing with how libkrb5 uses libcom_err.

I changed:

 libkrb5_la_LIBADD = \
-       ../com_err/error.lo ../com_err/com_err.lo \
+       $(LIB_com_err) \

Not so much because it caused any errors that I noticed, but this
change would be required if the multiple versions libcom_err that
exist were ever merged into one.

    Derrick> results in: ld: fatal: symbol `vasprintf' is multiply
    Derrick> defined: (file snprintf.lo and file
    Derrick> /usr/tmp/local/heimdal/007/lib/editline/.libs/libeditline.a(snprintf.o));
    Derrick> (and several other symbols, of course, but you get the
    Derrick> idea)

My immediate questions is:

why does libeditline.a contain vasprintf?  (it should be able to use
the version in libroken.)

If a grep the editline source code for "vasprintf" I don't find any
matches (Heimdal 0.3d), except a macro definition which doesn't seem
to be used anywhere:

roken_rename.h:#define vasprintf _editline_vasprintf
Brian May <bam@snoopy.apana.org.au>