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

Re: Problems compiling libvista



On Wednesday 30 January 2008 20:54, David Paleino wrote:
> Hi *,
> I'm now packaging the new version of libvista (2.1.7), present at
> http://mia.sf.net. After having found all dependencies, still have a
> compilation issue. Here it is:
>
> ---8<---
>  i486-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -lm -lX11 -lXt -lXmu -lXm
> -MT Colormap.lo -MD -MP -MF .deps/Colormap.Tpo -c Colormap.c >/dev/null
> 2>&1 /bin/bash ../libtool --mode=link i486-linux-gnu-gcc  -lm -lX11 -lXt
> -lXmu -lXm  -Wl,-z,defs,--as-needed -o libvx.la -rpath /usr/lib
> -version-info 1:7:0 -release 2 -export-dynamic VXDialog.lo VXImage.lo
> VXInit.lo VXInput.lo VXLine.lo VXMenu.lo VXMisc.lo VXOverlays.lo VXText.lo
> VImageView.lo Colormap.lo i486-linux-gnu-gcc -shared  .libs/VXDialog.o
> .libs/VXImage.o .libs/VXInit.o .libs/VXInput.o .libs/VXLine.o
> .libs/VXMenu.o .libs/VXMisc.o .libs/VXOverlays.o .libs/VXText.o
> .libs/VImageView.o .libs/Colormap.o  -lm -lX11 -lXt -lXmu -lXm  -Wl,-z
> -Wl,defs -Wl,--as-needed -Wl,-soname -Wl,libvx-2.so.1 -o
> .libs/libvx-2.so.1.0.7 .libs/VXDialog.o: In function `VXPopupMessageBox':
> VXDialog.c:(.text+0x170): undefined reference to `VError'
> VXDialog.c:(.text+0x187): undefined reference to `VError'
> .libs/VXDialog.o: In function `VXPopupTextBox':
> VXDialog.c:(.text+0x302): undefined reference to `VError'
> VXDialog.c:(.text+0x319): undefined reference to `VError'
> ...
> --->8---

David,
thanks for the link to mia and the latest vista. I should have known since 
Gert Wollny is former staff of my Institute ...
Anyway, I just checked vista-2.1.7 on Debian amd64 etch (GCC4.1) and it 
compiles fine with ./configure && make.
I found out the following (which you probably already have yourself):
Verror is defined in vista/Error.c and gets compiled into libvista:

nm .libs/libvista-2.so.1.0.7 | grep VError
0000000000016900 T VError

In libvx, where your compilation fails, VError is undefined:

nm .libs/libvx-2.so.1.0.7 | grep VError
                 U VError

My compiler/linker ignores this, but yours seems to be picky about that. I 
think a clean library dependency at link stage with a proper
libvx_la_LIBADD = libvista.la
in the vista/Makefile.am would resolve the issue. Please let me know if you 
need further info.
Good luck, Thies


> Well, the issue is: these symbols (as well as others not shown here), are
> part of libvista itself:
>
> $ objdump -t vista/.libs/libvista-2.so.1.0.7 |grep -e VError -e VWarning -e
> VFree -e VMalloc 0001f8d3 g     F .text	00000077              VError
> 0001f94a g     F .text	0000004e              VWarning
> 0000c0f8 g     F .text	00000040              VMalloc
> 0000c1ed g     F .text	00000019              VFree
> $
>
> This might be a really silly question; but I've never encountered this
> before. How should I link libvista during its build? Is there something I'm
> obviously missing? Is it fault of that "-Wl,-z,defs,--as-needed"?
>
> Kindly,
> David
>
> P.S.: CCing also Thies Jochimsen <thies@jochimsen.de>, as he might be
> interested (as he package an earlier version of this library)


Reply to: