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

Re: Problem with linking Siag 3.1.5

On Sat, 30 Jan 1999, Juha 'Jippo' Pohjalainen wrote:

> I have problem with linking Siag. It is about libreadline and
> slibu conflict with "readline" function. So, how do you all
> handle this?
> Here is what my compiler says:
> gcc -Wall -O3 -fno-strength-reduce -Wall  -o siag -L../siod -L../common
> -L../xcommon -L../siag window.o selection.o xsiag.o -lsiag -lxcommon
> -lcommon -lsiod -L/usr/local/lib -lguile -ldl -lreadline -ltermcap -lm
> -ldl -lXpm -L/usr/X11R6/lib -lXaw3d -lXmu -lXext -lXt -lX11  -lSM -lICE
> -lm -ldb
> /usr/local/lib/libreadline.a(readline.o): In function `readline':
> readline.o(.text+0x22c8): multiple definition of `readline'
> ../siod/libsiod.a(slibu.o)(.text+0x13b4): first defined here
> /usr/bin/ld: Warning: size of symbol `readline' changed from 191 to 99 in readline.o
> collect2: ld returned 1 exit status
> make[2]: *** [siag] Error 1

It is Guile which does this. Libguile is different depending on who built
it and where, so the output from `guile-config` is different as well.
Apparently your libguile wants libreadline; the one I built for me
doesn't, and the one distributed by Debian wants libqt and ncurses.

We can only work around the problems as they pop up. The solution this
time is to rename the function in SIOD. There, it's done. Checked into CVS
and will be included with next release.

If you want to implement the change yourself, it's trivial: in the file
siod/slibu.c, search for all occurrences of the string 'readline' and
replace them with 'lreadline'.