Jeffrey Walton via llvm-dev
2018-Nov-16 05:39 UTC
[llvm-dev] LLVM_CONFIG_PATH when building Clang from sources
I'm trying to build LLVM, CFE and RT from sources on an old PowerMac with OS X 10.5. After download and unpack into LLVM_SOURCE_DIR (with --strip-components=1), I configure with: cmake -DCMAKE_INSTALL_PREFIX="/opt/llvm" \ -DLLVM_TARGETS_TO_BUILD="PowerPC" \ -DLLVM_INCLUDE_TOOLS="ON" \ -DLLVM_BUILD_TESTS="ON" "$LLVM_SOURCE_DIR" It results in "llvm-config not found: specify LLVM_CONFIG_PATH". The docs at https://llvm.org/docs/CMake.html don't appear to discuss LLVM_CONFIG_PATH. I'm building out-of-tree with these two variables: LLVM_SOURCE_DIR="$HOME/llvm_source" LLVM_BUILD_DIR="$HOME/llvm_build" How should I fix the LLVM_CONFIG_PATH error? Thanks in advance. ============================= -- The C compiler identification is GNU 4.0.1 -- The CXX compiler identification is GNU 4.0.1 -- The ASM compiler identification is GNU -- Found assembler: /Developer/usr/bin/cc -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Check for working C compiler: /Developer/usr/bin/cc -- Check for working C compiler: /Developer/usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Checking whether CXX compiler has -isysroot -- Checking whether CXX compiler has -isysroot - yes -- Checking whether CXX compiler supports OSX deployment target flag -- Checking whether CXX compiler supports OSX deployment target flag - yes -- Check for working CXX compiler: /Developer/usr/bin/c++ -- Check for working CXX compiler: /Developer/usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for unwind.h -- Looking for unwind.h - found CMake Error at cmake/Modules/CompilerRTUtils.cmake:213 (message): llvm-config not found: specify LLVM_CONFIG_PATH Call Stack (most recent call first): CMakeLists.txt:66 (load_llvm_config) -- Configuring incomplete, errors occurred!
Tom Stellard via llvm-dev
2018-Nov-16 05:46 UTC
[llvm-dev] LLVM_CONFIG_PATH when building Clang from sources
On 11/15/2018 09:39 PM, Jeffrey Walton via llvm-dev wrote:> I'm trying to build LLVM, CFE and RT from sources on an old PowerMac > with OS X 10.5. >Which version of clang/llvm are you using? -Tom> After download and unpack into LLVM_SOURCE_DIR (with > --strip-components=1), I configure with: > > cmake -DCMAKE_INSTALL_PREFIX="/opt/llvm" \ > -DLLVM_TARGETS_TO_BUILD="PowerPC" \ > -DLLVM_INCLUDE_TOOLS="ON" \ > -DLLVM_BUILD_TESTS="ON" > "$LLVM_SOURCE_DIR" > > It results in "llvm-config not found: specify LLVM_CONFIG_PATH". The > docs at https://llvm.org/docs/CMake.html don't appear to discuss > LLVM_CONFIG_PATH. > > I'm building out-of-tree with these two variables: > > LLVM_SOURCE_DIR="$HOME/llvm_source" > LLVM_BUILD_DIR="$HOME/llvm_build" > > How should I fix the LLVM_CONFIG_PATH error? > > Thanks in advance. > > =============================> > -- The C compiler identification is GNU 4.0.1 > -- The CXX compiler identification is GNU 4.0.1 > -- The ASM compiler identification is GNU > -- Found assembler: /Developer/usr/bin/cc > -- Checking whether C compiler has -isysroot > -- Checking whether C compiler has -isysroot - yes > -- Checking whether C compiler supports OSX deployment target flag > -- Checking whether C compiler supports OSX deployment target flag - yes > -- Check for working C compiler: /Developer/usr/bin/cc > -- Check for working C compiler: /Developer/usr/bin/cc -- works > -- Detecting C compiler ABI info > -- Detecting C compiler ABI info - done > -- Detecting C compile features > -- Detecting C compile features - done > -- Checking whether CXX compiler has -isysroot > -- Checking whether CXX compiler has -isysroot - yes > -- Checking whether CXX compiler supports OSX deployment target flag > -- Checking whether CXX compiler supports OSX deployment target flag - yes > -- Check for working CXX compiler: /Developer/usr/bin/c++ > -- Check for working CXX compiler: /Developer/usr/bin/c++ -- works > -- Detecting CXX compiler ABI info > -- Detecting CXX compiler ABI info - done > -- Detecting CXX compile features > -- Detecting CXX compile features - done > -- Looking for unwind.h > -- Looking for unwind.h - found > CMake Error at cmake/Modules/CompilerRTUtils.cmake:213 (message): > llvm-config not found: specify LLVM_CONFIG_PATH > Call Stack (most recent call first): > CMakeLists.txt:66 (load_llvm_config) > > -- Configuring incomplete, errors occurred! > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >
Jeffrey Walton via llvm-dev
2018-Nov-16 05:47 UTC
[llvm-dev] LLVM_CONFIG_PATH when building Clang from sources
On Fri, Nov 16, 2018 at 12:46 AM Tom Stellard <tstellar at redhat.com> wrote:> > On 11/15/2018 09:39 PM, Jeffrey Walton via llvm-dev wrote: > > I'm trying to build LLVM, CFE and RT from sources on an old PowerMac > > with OS X 10.5. > > Which version of clang/llvm are you using?LLVM 7.0. The script is available at https://github.com/noloader/build-llvm/blob/master/build-llvm.sh Jeff