'opam install ocamlgraph' leads to 'ld: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC'

This error usually means that you upgraded your C compiler since you originally created your Opam switch. Short of reverting your compiler to an older version, I think the only solution is to completely rebuild your switch from scratch with that new compiler.

1 Like