Skip to content

-fPIC error #2

@OguzhanCaglar

Description

@OguzhanCaglar

How can i fix it?

**stdplus$ ninja -C builddir install
ninja: Entering directory builddir' [1/11] Linking target src/libstdplus.so.0.1 FAILED: src/libstdplus.so.0.1 c++ -o src/libstdplus.so.0.1 src/libstdplus.so.0.1.p/exception.cpp.o src/libstdplus.so.0.1.p/signal.cpp.o src/libstdplus.so.0.1.p/zstring.cpp.o src/libstdplus.so.0.1.p/zstring_view.cpp.o src/libstdplus.so.0.1.p/fd_atomic.cpp.o src/libstdplus.so.0.1.p/fd_create.cpp.o src/libstdplus.so.0.1.p/fd_dupable.cpp.o src/libstdplus.so.0.1.p/fd_fmt.cpp.o src/libstdplus.so.0.1.p/fd_impl.cpp.o src/libstdplus.so.0.1.p/fd_line.cpp.o src/libstdplus.so.0.1.p/fd_managed.cpp.o src/libstdplus.so.0.1.p/fd_mmap.cpp.o src/libstdplus.so.0.1.p/fd_ops.cpp.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libstdplus.so.0 /usr/local/lib/libfmt.a -Wl,--end-group /usr/bin/ld: /usr/local/lib/libfmt.a(format.cc.o): warning: relocation against stdout@@GLIBC_2.2.5' in read-only section .text' /usr/bin/ld: /usr/local/lib/libfmt.a(format.cc.o): relocation R_X86_64_PC32 against symbol stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
[2/11] Linking target subprojects/googletest/libgtest.so
ninja: build stopped: subcommand failed.
**

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions