Skip to content

zlib 1.2.12 fails to compile #608

@ncopa

Description

@ncopa

When updating alpine linux to 1.2.12 I got this compile error:

gcc -O -D_LARGEFILE64_SOURCE=1 -o example64 example64.o -L. libz.a
gcc -O -D_LARGEFILE64_SOURCE=1 -o minigzip64 minigzip64.o -L. libz.a
/usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: deflate.lo: relocation R_X86_64_PC32 against symbol `_length_code' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: final link failed: bad value

I can work around it by adding -fPIC, but I wonder if that is the correct fix?

There seems also to be a few new symbols introduced in the shared library libz.so.1.2.12:

0000000000010bca T _fini
0000000000003000 T _init
000000000000dbe0 T _tr_align
000000000000dbd0 T _tr_flush_bits
000000000000dcd0 T _tr_flush_block
000000000000d980 T _tr_init
000000000000da80 T _tr_stored_block
000000000000e3e0 T _tr_tally

Not sure that was intentional or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions