Skip to content

Makefile:102: recipe for target 'ocamlbuild' failed #47

@boyang-zhang1

Description

@boyang-zhang1

Hi, when I tried to install the cil in my ubuntu 18.04.4 TLS, I found some problems.

  • First, I tried to use
    opam install cil
    to install cil but it shows
    [ERROR] cil is not a valid versioned package name
    'opam install cil' failed.

  • After that, I tried opam install cil.1.7.3 but it still couldn't work.
    [ERROR] "cil" is not a valid package.
    'opam install cil.1.7.3' failed.

  • Then I tried to use the project to make it.
    But after I run ./configure successfully, when I run make, some error occured.

......
/usr/bin/ld: /usr/lib/ocaml/libasmrun.a(compact.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /usr/lib/ocaml/libasmrun.a(finalise.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /usr/lib/ocaml/libasmrun.a(custom.o): relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /usr/lib/ocaml/libasmrun.a(unix.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /usr/lib/ocaml/libasmrun.a(backtrace.o): relocation R_X86_64_32 against symbol `caml_backtrace_last_exn' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking
Command exited with code 2.
Makefile:102: recipe for target 'ocamlbuild' failed
make[1]: *** [ocamlbuild] Error 10
make[1]: Leaving directory '/home/zby/Downloads/cil'
Makefile:371: recipe for target 'install-local' failed
make: *** [install-local] Error 2

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