[cfe-dev] Link error while trying to build

Alexey Samsonov samsonov at google.com
Thu Oct 25 03:29:22 PDT 2012


I've recently started to see this error while linking c-index-test in CMake
build:
[ 95%] Linking CXX executable ../../../../bin/c-index-test
/usr/bin/ld: warning: libz.so.1, needed by
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../lib64/libxml2.so, not found
(try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../lib64/libxml2.so: undefined
reference to `deflateInit2_'
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../lib64/libxml2.so: undefined
reference to `deflate'
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../lib64/libxml2.so: undefined
reference to `deflateEnd'
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../lib64/libxml2.so: undefined
reference to `crc32'
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../lib64/libxml2.so: undefined
reference to `inflate'
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../lib64/libxml2.so: undefined
reference to `inflateInit2_'
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../lib64/libxml2.so: undefined
reference to `inflateEnd'
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../lib64/libxml2.so: undefined
reference to `gzrewind'
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../lib64/libxml2.so: undefined
reference to `gzopen64'
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../lib64/libxml2.so: undefined
reference to `gzwrite'
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../lib64/libxml2.so: undefined
reference to `gzclose'
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../lib64/libxml2.so: undefined
reference to `gzdopen'
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../lib64/libxml2.so: undefined
reference to `gzread'

I think that I have libz installed:
$ ls -l /usr/lib64/libz.*
-rw-r--r-- 1 root root 118210 2009-11-09 18:53 /usr/lib64/libz.a
lrwxrwxrwx 1 root root     20 2011-12-15 16:50 /usr/lib64/libz.so ->
/lib/libz.so.1.2.3.3
lrwxrwxrwx 1 root root     20 2012-10-25 13:20 /usr/lib64/libz.so.1 ->
/lib/libz.so.1.2.3.3

Should tools/c-index-test/CMakeLists.txt explicitly link c-index-test with
libz library as well, or there is some other problem?

-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121025/127bbec6/attachment.html>


More information about the cfe-dev mailing list