Skip to content

/usr/bin/ld: final link failed: Bad value #12

@scardine

Description

@scardine

Tried to add SET(CMAKE_POSITION_INDEPENDENT_CODE ON) to cmakefiles (I'm not really a C++ guy).

Any idea on how can I fix this?

Linking CXX shared library libphantompy.so
/usr/bin/ld: CMakeFiles/phantompy.dir/lib/qjson/json_parser.cc.o: relocation 
      R_X86_64_PC32 against symbol `yy::json_parser::yytname_' can not be used 
      when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[2]: ** [libphantompy.so.0.0.1] Erro 1
make[1]: ** [CMakeFiles/phantompy.dir/all] Erro 2
make: ** [all] Erro 2

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