Export to GitHub

xar - issue #52

Use LDFLAGS when linking a shared ELF Library


Posted on Mar 25, 2008 by Helpful Bear

What steps will reproduce the problem? 1. Build xar, cross-compiled, against a cross-compiled libxml2, zlib and libbz2 not installed in /usr/lib using the following configuration line (or similar):

configure \
    CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) STRIP=$(STRIP) \
    CPPFLAGS="-I$(resultdir)../openssl/usr/include \
    -I$(resultdir)../zlib/usr/include \
    -I$(resultdir)../libxml2/usr/include \
    -I$(resultdir)../bzip2/usr/include" \
    LDFLAGS="-L$(resultdir)../openssl/usr/lib \
    -L$(resultdir)../zlib/usr/lib \
    -L$(resultdir)../libxml2/usr/lib \
    -L$(resultdir)../bzip2/usr/lib" \
    --build=i686-pc-linux \
    --host=powerpc-unknown-linux \
    --with-xml2-config="$(resultdir)../libxml2/usr/bin/xml2-config" \
    --prefix=/usr \
    --sysconfdir=/etc

What failure do you see?

/usr/local/eldk/4.1/usr/bin/ppc_4xx-gcc -shared -Wl,-soname,libxar.so.1 -o 

lib/libxar.so.1 lib/archive.o lib/arcmod.o lib/b64.o lib/bzxar.o lib/darwinattr.o lib/data.o lib/ea.o lib/err.o lib/ext2.o lib/fbsdattr.o lib/filetree.o lib/io.o lib/linuxattr.o lib/hash.o lib/signature.o lib/stat.o lib/subdoc.o lib/util.o lib/zxar.o lib/script.o lib/macho.o -lbz2 -lz - lcrypto -lxml2 -L/tmp/libxml2/../zlib/usr/lib -lz -lm /usr/local/eldk/4.1/usr/bin/../lib/gcc/powerpc-linux/4.0.0/../../../../powerpc- linux/bin/ld: cannot find -lxml2 collect2: ld returned 1 exit status make[1]: * [lib/libxar.so.1] Error 1

What version of the product are you using? On what operating system?

Version: xar-1.5.2 OS: Ubuntu 7.10

Please provide any additional information below.

The attached patch remedies the issue. Please consider it for inclusion in the next release of xar.

Attachments

Comment #1

Posted on Aug 15, 2008 by Happy Dog

Fixed in r218

Status: Fixed

Labels:
Type-Defect Priority-Medium