jckarter/clay — Issue #20: Linking of clay fails on Linux x86_64
Author: Blei
Created: 2011-11-08 07:52:14+00:00
State: open

The problem is, that the -ldl flag is included in the LLVM_LDFLAGS and not in the LLVM_LIBS. The LDFLAGS are added to the front of the command line, but the -ldl should be at the end to link correctly. (The linker command can be seen in ./build/compiler/src/CMakeFiles/clay.dir/link.txt).

As a quick fix/hack, it is possible to add the dl library explicitely in the same way as the rt library (in ./compiler/src/CMakeLists.txt).