[cfe-dev] Link error while trying to build

NAKAMURA Takumi geek4civic at gmail.com
Thu Oct 25 03:37:58 PDT 2012


Alexey,

  - What is command line in linking? You may see command line with
"make c-index-test VERBOSE=1".

  - Which distro are you using?

...Takumi

2012/10/25 Alexey Samsonov <samsonov at google.com>:
> 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
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>



More information about the cfe-dev mailing list