jmichaelh / xar

Automatically exported from code.google.com/p/xar
0 stars 0 forks source link

link error when compiling 1.5.2 under 10.4.11 #51

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. 10.4.11 PowerPC
2. ./configure
3. make

What is the expected output? What do you see instead?
compile ok.

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

Please provide any additional information below.

./configure
...
checking for libxml >= 2.6.11... 2.6.16
checking libxml/xmlwriter.h usability... yes
checking libxml/xmlwriter.h presence... yes
checking for libxml/xmlwriter.h... yes
...

~/work/xar-1.5.2 > set | grep LD
OLDPWD=/Users/ar/work

~/work/xar-1.5.2 > make
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/archive.c -o lib/archive.o
lib/archive.c: In function ‘xar_unserialize’:
lib/archive.c:1346: warning: implicit declaration of function 
‘xmlDictCleanup’
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/arcmod.c -o lib/arcmod.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/b64.c -o lib/b64.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/bzxar.c -o lib/bzxar.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/darwinattr.c -o lib/darwinattr.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/data.c -o lib/data.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/ea.c -o lib/ea.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/err.c -o lib/err.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/ext2.c -o lib/ext2.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/fbsdattr.c -o lib/fbsdattr.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/filetree.c -o lib/filetree.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/io.c -o lib/io.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/linuxattr.c -o lib/linuxattr.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/hash.c -o lib/hash.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/signature.c -o lib/signature.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/stat.c -o lib/stat.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/subdoc.c -o lib/subdoc.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/util.c -o lib/util.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/zxar.c -o lib/zxar.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/script.c -o lib/script.o
gcc -Wall -g  -fPIC -DPIC -dynamic -Iinclude -Iinclude
-I/usr/include/libxml2 -c lib/macho.c -o lib/macho.o
gcc -dynamiclib -compatibility_version 1 -current_version 1 -install_name
/Users/ar/work/xar-1.5.2/lib/librxar.1.dylib -o lib/librxar.1.dylib
lib/archive.o lib/a
cmod.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/sign
ture.o lib/stat.o lib/subdoc.o lib/util.o lib/zxar.o lib/script.o
lib/macho.o -Llib  -lbz2 -lz -lcrypto  -L/usr/lib -lxml2 -lz -lpthread
-liconv -lm
ld: Undefined symbols:
_xmlDictCleanup
/usr/bin/libtool: internal link edit command failed
make: *** [lib/librxar.1.dylib] Error 1

Original issue reported on code.google.com by axel.roe...@googlemail.com on 19 Feb 2008 at 8:56

GoogleCodeExporter commented 8 years ago
It appears to be using libxml2 from /usr, can you include the following 2 
pieces of information to help 
diagnose this?
1) /usr/bin/xml2-config --version
2) What is LIBXML_VERSION defined to in 
/usr/include/libxml2/libxml/xmlversion.h?

What it looks like is happening is xmlDictCleanup() doesn't exist in libxml2 
versions prior to 2.6.18.  For 
versions between the minimum supported 2.6.11 and 2.6.18, we define 
xmlDictCleanup() to nothing in 
lib/archive.c.
Due to the way apple updates their component libraries and executables in 
software updates, but header files 
are only updated in Xcode updates, it is frequently possible for header files 
to get out of sync with libraries 
and other command line tools.  I'm wondering if that is the case here.

Original comment by bbraun on 19 Feb 2008 at 9:18

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Thanks for taking this issue.

Here the version infos:

~/work/xar-1.5.2 > /usr/bin/xml2-config --version
2.6.16
~/work/xar-1.5.2 > grep LIBXML_VERSION /usr/include/libxml2/libxml/xmlversion.h
 * LIBXML_VERSION:
#define LIBXML_VERSION 20616
 * LIBXML_VERSION_STRING:
#define LIBXML_VERSION_STRING "20616"
 * LIBXML_VERSION_EXTRA:
#define LIBXML_VERSION_EXTRA ""

Not fully understanding this but "xmlDictCleanup" doesn't seem to be specially 
treated:

~/work/xar-1.5.2 > grep xmlDictCleanup lib/*
lib/archive.c:                                                                 
xmlDictCleanup();
lib/archive.c:                                          xmlDictCleanup();
lib/archive.c:                  xmlDictCleanup();
lib/archive.c:          xmlDictCleanup();
lib/archive.c:  xmlDictCleanup();
Binary file lib/archive.o matches

Original comment by axel.roe...@googlemail.com on 20 Feb 2008 at 5:53

GoogleCodeExporter commented 8 years ago
It rechecked with the svn xar-read-only version. No problem there.

Original comment by axel.roe...@googlemail.com on 20 Feb 2008 at 6:31

GoogleCodeExporter commented 8 years ago
Ah, I see.  Yes, 1.5.2 seems to be missing the #define that xar trunk has, 
specifically from lib/archive.c:
#if LIBXML_VERSION < 20618
#define xmlDictCleanup()        /* function doesn't exist in older API */
#endif

I apologize for the omission in 1.5.2.  If a 1.5.3 gets planned, I will include 
this.  1.6 is planned to come from 
trunk, which already has this fix in it.

Original comment by bbraun on 20 Feb 2008 at 2:09

GoogleCodeExporter commented 8 years ago
Same on Intel Core 2 Duo

Original comment by karl.hoo...@gmail.com on 12 Sep 2011 at 5:22