Running the LLVM for MIPS on ubuntu 14.04 lts

Home Forums MIPS Insider Running the LLVM for MIPS on ubuntu 14.04 lts

This topic contains 1 reply, has 2 voices, and was last updated by  alastair 3 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #64067


    I am trying to run the llvm for mips tools.
    I tried both options from

    but I could not run any of them succesfully.

    — With the precompiled version of the tools, when running a simple program (after modifying the PATH variable)
    #include <stdio.h>

    public void main(int argc, char **argv) {
    printf(“Hello worldn”);

    an error message is displayed in the terminal:
    File “/home/jomarm10/mips_linux_toolchain/bin/mips_linux_gnu_gcc”, line 113, in <module>
    File “/home/jomarm10/mips_linux_toolchain/bin/”, line 300, in do_compile
    ret_code = do_c_compile(filename, basename)
    File “/home/jomarm10/mips_linux_toolchain/bin/”, line 214, in do_c_compile
    ret_code = do_command_line(command_line)
    File “/home/jomarm10/mips_linux_toolchain/bin/”, line 135, in do_command_line
    File “/usr/lib64/python2.7/”, line 522, in call
    return Popen(*popenargs, **kwargs).wait()
    File “/usr/lib64/python2.7/”, line 710, in __init__
    errread, errwrite)
    File “/usr/lib64/python2.7/”, line 1335, in _execute_child
    raise child_exception
    OSError: [Errno 2] No such file or directory

    — For the other case, the source package, I could not install it, after running the
    script, it only creates a couple of directories in the path set in –PREFIX variable,
    directories are bin and sysroot
    – bin, contais some python scripts
    – sysroot, is empty.

    console displays following messages
    %%% Build toolchain
    %%% Build llvm/clang
    %%% Install alternative clang driver

    Any idea of what I am doing wrong?



    Apologies for the confusion. The web page was for previous versions of toolchains and llvm. Since you’ve brought it to our attention we have had it removed.

    We recommend getting clang directly from Currently clang is only compatible with 2015.01-7 tools; these are available from Note that there will soon be a new release available from the early access page. When this is released, you will need to go to the page to get 2015.01-7 tools. has releases that are both native and cross compilers for linux:
    Native mode:
    In this mode, the normal linux paths are searched. Headers, libraries, etc. come from the distro’s usual libc packages just like for gcc.
    Cross mode
    That is, when ‘–target mips-linux-gnu’ is given:
    For debian, if you have a gcc cross compiler for the given triple installed, then –target is enough.
    If you need an external cross compiler, you must also pass –gcc-toolchain=/path/to/root/of/toolchain. This changes the search paths for tools/libraries/headers appropriately.

    Here’s a concrete cross compilation example:

    A few notes:

    The MTI GNU Linux Toolchain works too if you want MIPS32R2. Just download it instead and switch that target from mips-img-linux-gnu for mips-mti-linux-gnu in the instructions and change the -mips32r6 to -mips32r2.
    Be explicit about the architecture you want to target even if the corresponding GCC cross compiler defaults to the one you want.
    If you want to target MIPS64 architecture you must use a target beginning with ‘mips64-‘ or ‘mips64el-*’.

Viewing 2 posts - 1 through 2 (of 2 total)

Forums are currently locked.