/Usr/local/lib/libz. A: cocould not read symbols: Bad value (64-bit Linux)

Source: Internet
Author: User
Tags crc32

/Usr/bin/ld:/usr/local/lib/libz. A (crc32.o): Relocation r_x86_64_32 against 'a local symplot' can not be used when making a shared object; recompile with-FPIC

/Usr/local/lib/libz. A: cocould not read symbols: Bad Value

Generally, it appears on a 64-bit computer.

 

The solution is as follows:

CD zlib-1.2.3 // enter the zlib directory

Cflags = "-O3-FPIC"./configure // compile with 64-bit RMB

Make

Make install

Make clean

The result of the preceding operation is as follows:

[Root @ unix-server1 zlib-1.2.3] # cflags = "-O3-FPIC"./configure -- prefix =/usr/local/zlib/
Checking for GCC...
Building static library libz. A version 1.2.3 with GCC.
Checking for unistd. H... Yes.
Checking whether to use vs [N] printf () or s [N] printf ()... using vs [N] printf ()
Checking for vsnprintf () in stdio. H... Yes.
Checking for return value of vsnprintf ()... Yes.
Checking for errno. H... Yes.
Checking for MMAP support... Yes.
[Root @ unix-server1] # Make
Gcc-O3-FPIC-duse_mmap-c-o example. O example. c
Gcc-O3-FPIC-duse_mmap-c-o adler32.o adler32.c
Gcc-O3-FPIC-duse_mmap-c-o compress. O compress. c
Gcc-O3-FPIC-duse_mmap-c-o crc32.o crc32.c
Gcc-O3-FPIC-duse_mmap-c-o gzio. O gzio. c
Gcc-O3-FPIC-duse_mmap-c-o uncompr. O uncompr. c
Gcc-O3-FPIC-duse_mmap-c-o deflate. O deflate. c
Gcc-O3-FPIC-duse_mmap-c-o trees. O trees. c
Gcc-O3-FPIC-duse_mmap-c-o zutil. O zutil. c
Gcc-O3-FPIC-duse_mmap-c-o inflate. O inflate. c
Gcc-O3-FPIC-duse_mmap-c-o infback. O infback. c
Gcc-O3-FPIC-duse_mmap-c-o inftrees. O inftrees. c
Gcc-O3-FPIC-duse_mmap-c-o inffast. O inffast. c
Ar RC libz. A adler32.o compress. O crc32.o gzio. O uncompr. O deflate. O trees. O zutil. O inflate. O infback. O inftrees. O inffast. o
Gcc-O3-FPIC-duse_mmap-O example. O-L. libz.
Gcc-O3-FPIC-duse_mmap-c-o minigzip. O minigzip. c
Gcc-O3-FPIC-duse_mmap-O minigzip. O-L. libz.
[Root @ unix-server1] # make install
CP zlib. h zconf. h/usr/local/zlib // include
Chmod 644/usr/local/zlib // include/zlib. h/usr/local/zlib // include/zconf. h
CP libz. A/usr/local/zlib // lib
CD/usr/local/zlib // LIB; chmod 755 libz.
CD/usr/local/zlib/LIB; if test-F libz. so.1.2.3; then \
Rm-F libz. So libz. so.1 ;\
Ln-s libz. so.1.2.3 libz. So ;\
Ln-s libz. so.1.2.3 libz. so.1 ;\
(Ldconfig | true)>/dev/null 2> & 1 ;\
Fi
CP zlib.3/usr/local/zlib // share/man/man3
Chmod 644/usr/local/zlib // share/man/man3/zlib.3
[Root @ unix-server1] # Make clean
Rm-f *. O *~ Example minigzip \
Libz. * foo.gz so_locations \
_ Match. s maketree contrib/infback9/*. o
[Root @ unix-server1 zlib-1.2.3] #

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.