Thread overview
File Intrinsics.td not found
Sep 13, 2013
FreeSlave
Sep 13, 2013
David Nadlinger
Sep 13, 2013
FreeSlave
Sep 13, 2013
FreeSlave
Sep 13, 2013
David Nadlinger
Sep 13, 2013
David Nadlinger
Sep 13, 2013
FreeSlave
September 13, 2013
I have error "File Intrinsics.td not found" when compiling ldc on Linux. I also got this error on Windows. I specified some of CMake variables manually to get it working, but not sure that it was all right. I think, there is some mistake in cmake files.
September 13, 2013
On Fri, Sep 13, 2013 at 8:59 PM, FreeSlave <freeslave93@gmail.com> wrote:
> I have error "File Intrinsics.td not found" when compiling ldc on Linux. I also got this error on Windows. I specified some of CMake variables manually to get it working, but not sure that it was all right. I think, there is some mistake in cmake files.

Seems like there is a problem with your LLVM installation (or our LLVM
detection scripts).

What variables did you set manually?

David
September 13, 2013
I set LLVM_INTRINSIC_TD_PATH to correct path. Then I got errors again - building system for some reasons assumes that llvm placed only in /usr directory and does not check /usr/local. Well, it's not difficult to move libs and other stuff to /usr. But now it asks libLLVMHexagonCodeGen.a and I have no this library in llvm at all. I installed llvm in standard "./configure make make install" way. I tried llvm3.2 and llvm3.3
September 13, 2013
It says "make[2]: *** No rule to make target `/usr/lib/llvm-3.2/lib/libLLVMHexagonCodeGen.a', needed by `bin/gen_gccbuiltins'.  Stop." to be precise.

I followed this article to build llvm and ldc http://wiki.dlang.org/Building_LDC_from_source
I think, it should be more detailed to cover all popular distros. For example, some distros have pre-built packages of llvm in repos, so it's not needed to build llvm from source. Also article skips the step of building/installing libconfig++.
September 13, 2013
On Fri, Sep 13, 2013 at 10:32 PM, FreeSlave <freeslave93@gmail.com> wrote:
> I set LLVM_INTRINSIC_TD_PATH to correct path. Then I got errors again - building system for some reasons assumes that llvm placed only in /usr directory and does not check /usr/local. Well, it's not difficult to move libs and other stuff to /usr. But now it asks libLLVMHexagonCodeGen.a and I have no this library in llvm at all. I installed llvm in standard "./configure make make install" way. I tried llvm3.2 and llvm3.3

The build system does not make such assumptions. Instead, it uses the llvm-config binary to locate the required dependencies (or the LLVM-provided CMake file on Windows). Most likely, there is another instance of LLVM present on your system, the llvm-config executable of which is picked up by the CMake scripts. That other instance (e.g. from your distro's package?) was apparently also built with support for the Hexagon target, thus libLLVMHexagonCodeGen.a appears in its list of libraries to link.

If you want to use a specific instance of LLVM, try setting LLVM_CONFIG to the path of its llvm-config binary (or LLVM_ROOT_DIR to the prefix where it has been installed).

David
September 13, 2013
Thanks, it works now. I just uninstalled manually built llvm and reinsntalled the one from repo.
Can you also review my post to Building latest LDC on windows? I don't know how to eliminate problem about "cannot write native asm"
September 13, 2013
On Fri, Sep 13, 2013 at 10:52 PM, FreeSlave <freeslave93@gmail.com> wrote:
> I followed this article to build llvm and ldc
> http://wiki.dlang.org/Building_LDC_from_source
> I think, it should be more detailed to cover all popular distros

The idea of that page is to offer a general overview that is applicable to all Posix-like systems, and thus easy to keep up to date. In the past, the problem was that nobody was keeping all the distro-specific pages up to date. But please do feel free to improve the page (it's a public wiki) with information you find helpful.

> For example, some distros have pre-built packages of llvm in repos, so it's not needed to build llvm from source.

This is mentioned at the start of the "LLVM" section.

> Also article skips the step of building/installing libconfig++.

Many distros already offer a package for libconfig++, but adding a short note that it can be installed the standard "./configure && make && make install" way would indeed be a good idea.

David