Did you try building with ``` $ clang -fPIC -shared <reproducer> -o lol -lzstd ```
I am able to build with ``` $ clang-15 -fPIC -shared 2086543.c -o lol -lzstd $ # this will fail $ clang-15 -fPIC -shared 2086543.c -o lol /usr/lib/x86_64-linux-gnu/libzstd.a /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libzstd.a(zstd_compress.o): warning: relocation against `ZSTD_copySequencesToSeqStoreNoBlockDelim' in read-only section `.text' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libzstd.a(zstd_compress.o): relocation R_X86_64_PC32 against symbol `ZSTD_copySequencesToSeqStoreExplicitBlockDelim' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: bad value clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2086543 Title: libzstd.a not built with -fPIC flag To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libzstd/+bug/2086543/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs