Building from source fails when non-root

Home Forums Forum Building from source fails when non-root

This topic contains 5 replies, has 2 voices, and was last updated by  Gordon 3 weeks, 4 days ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #79874 Reply

    Gordon

    Hello,

    Following the example from “BUILDING FROM SOURCE” page,
    I get the following failure:

    
    $ svn co http://ellcc.org/svn/ellcc/trunk ellcc
    $ cd ellcc
    $ ellcc build
    [... after a very long time with many successful steps ...]
    -- Installing: /home/gordon/sources/ellcc/local/lib/libLLVMXRay.a
    -- Installing: /home/gordon/sources/ellcc/local/lib/libLLVMWindowsManifest.a
    -- Installing: /usr/lib/ocaml/llvm/llvm.mli
    CMake Error at bindings/ocaml/llvm/cmake_install.cmake:44 (file):
      file INSTALL cannot copy file
      "/home/gordon/sources/ellcc/build-host/llvm/bindings/ocaml/llvm/llvm.mli"
      to "/usr/lib/ocaml/llvm/llvm.mli".
    Call Stack (most recent call first):
      bindings/ocaml/cmake_install.cmake:37 (include)
      cmake_install.cmake:60 (include)
    
    Makefile:115: recipe for target 'install' failed
    make: *** [install] Error 1
    make: Leaving directory '/scratch/sources/ellcc/build-host/llvm'
    '/usr/bin/make -j 4 -C /home/gordon/sources/ellcc/build-host/llvm install' failed.
    Error: leaving module /home/gordon/sources/ellcc/build-host/llvm
    '/scratch/sources/ellcc/scripts/build-llvm -Cbi' failed.
    Error: leaving module /home/gordon/sources/ellcc
    '/scratch/sources/ellcc/scripts/make-ecc x86_64-linux' failed.
    Error: leaving module /home/gordon/sources/ellcc
    '/scratch/sources/ellcc/scripts/make-ellcc -Cb' failed.
    Error: leaving module /home/gordon/sources/ellcc
    

    Which seems to indicate that somewhere deep inside llvm’s tree
    there’s an incorrect path wanting to install files in “/usr/lib/ocaml/llvm/llvm.mli” – which fails when I build as non-root.

    Any advice on how to work-around this ?

    Thanks!
    – gordon

    #79876 Reply

    rich
    Keymaster

    Gordon,

    I’ve been out of town for couple of days, but I’m taking a look at this now. I don’t understand why the ocaml bindings are being build at all. Do you have ocaml installed. I’m trying a build with ocaml installed right now.

    -Rich

    #79877 Reply

    Gordon

    Hello,

    Thank you for the reply.
    I’m using a Debian 9.1-stable (stretch).

    OCaml is installed, possibly as a dependency of llvm-4.
    That is, if one follows the instructions here:
    http://apt.llvm.org/
    Then they include the following package “libllvm-4.0-ocaml-dev”.

    I’ll try to remove all ocaml packages and rebuild.

    Thanks!
    – gordon

    #79878 Reply

    Gordon

    Hello,

    Removing ocaml solves this issue.
    “./ellcc build” builds the compiler without problems.

    It fails now when linking libss2 – but that’s a separate issue.

    Should I post the errors here, or is there a better place (or a new forum post) ?

    Thanks,
    – gordon

    #79879 Reply

    rich
    Keymaster

    Hi Gordon,

    Thanks for the update. I ran into the ssh2 problem when I tried to reproduce your problem. I’m hoping to have a fix soon.

    For now you could just comment out libssh2 in scripts/libraries if you want to move ahead (you might have to comment out curl also).

    -Rich

    #79880 Reply

    Gordon

    Thanks again,

    With those two libraries removed, ‘ellcc build’ completes successfully,
    and ‘ecc’ works fine when building projects.

    -gordon

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Building from source fails when non-root
Your information: