X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:references :in-reply-to:content-type:content-id:content-transfer-encoding :mime-version; q=dns; s=default; b=Nu3HqO+twCbv64KWBpgB9Jl3OO0Gc mTWRRLjS6GesEpJOmXaVjjZX3Nc1fYSKr1NhxLo91D1Q6cGJz+YtACNIjYSA/2Z4 48elO7UIJggXotlFXFskk5mYm46P/MJbz3lSVNyMwFV00VXOguz8HrzVKKz9uLOj zQGr4yQLvmGcSY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:references :in-reply-to:content-type:content-id:content-transfer-encoding :mime-version; s=default; bh=DJbBerjOPv/iP6FkUC57ro3qZ1Q=; b=Iax nj+2h0Mg20nHh6FnNsQ1zUzfgVbF3MC2wlZxphpndxqfFg/a0sUZqIk4aMW0g9AC nyzQ5GyLVMmb28gM65dZG+QhajFG3/5TpBQgkUrfNrQEequb3DuwkPSwxyARLw5X t8FMJZjJ/oFd5rbBTf/c2tHS1khAYNcqvAKzwE6Y= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Spam-Relays-External:2604, H*RU:2604 X-HELO: NAM03-DM3-obe.outbound.protection.outlook.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nAL5E209C61u/vSsrnKLHdREeilvxnT1sEaoXb6G036/04pYDRcUgtwUoZ7+9lCK7/yGT0cHP2tieWiOBRMrDSVf9kWuFINoKkSi9JeXnI4hDjq15R1acOBAwGhvR4M2RCK/IZJ6E0dOO8aUE/zS1j4Yh/g6YH9j5dKT94ZkgaRBpw2wFQBj2tglCN/Df3ZQsYU57XAqTipZybN84ouFjkLMwPe4hdBfTMmC2PN53tIFEBgSgU3+Nn7mWHj/PWJnWaisUc0dCqucv2nIuvTBHpE/Z0vH9C0tcbv6TKMhbAz2vU2ELS3bLDASAm56KUq+SmwWunDpG5qCeX/K0pzQ1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LsxAMvOTH8T2AdB6DnkbaLcOypDkA5Iz7Himo1vNW5o=; b=jHc25x1FYstFUy0VomqnzBnkxYtalFIE2D15v1TtiAtoe82EwotNOasCPfGFqVVF3qsdWjNrmt9WLQqNZQ5zIxaZSFPSGXGxbZ8gEzEsrL1vxm64qXuZNQu/pfdEzJjcnUeM7GJ3CKTmeWG0lN8z0wQgFc6+5SNca3A5ssVlABTcoHj6klJFoLoYYt8nzofHXfydu5j8U7TwofBY6VIGqn+XM5BYRF6dyW3jTYfnVIgXxnKIdSYrmJFTxy9d52obKecKUTind5MS6FC7qMeH1FdyIJ5R+Zdn9t4KyGuL+oSpuI6ns/sMFxKCBS2FYmAQgwU+Ej5o/ieNnr09sjjXAw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu; dkim=pass header.d=cornell.edu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornell.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LsxAMvOTH8T2AdB6DnkbaLcOypDkA5Iz7Himo1vNW5o=; b=BNYh7SuasLhR9mJIDG3xaUkFEyYigcxH2e2FhBuun8InQbFqAoHLo20hGYjfNyKuv8KXnI0Ouanb6jUrPYqMOSWsaC4sYuWruB1Y7V0v0oqjvq4h64aNrhK4enuXcSNZIqpM7M7RDf7xFxCBrO9jvWXiek5wdSJ9ZCopMwNAt5U= From: Ken Brown To: "cygwin AT cygwin DOT com" Subject: Re: CMake fails to find the LLVM package with the LLVMConfig.cmake Date: Tue, 26 Nov 2019 23:48:13 +0000 Message-ID: <24624a3c-4207-6fe2-56b4-15a815d294d4@cornell.edu> References: In-Reply-To: user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=kbrown AT cornell DOT edu; x-ms-oob-tlc-oobclassifiers: OLM:8882; received-spf: None (protection.outlook.com: cornell.edu does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: a2e9anQDwRgvA8RYGK8hKvZIwCmSz7PEAxvMThgKWpBpv3B2ERqmqy1pg9w/UFQgp2LZKbts6XCjxKbSUwFmaw== X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id xAQNnuG3008439 On 11/25/2019 10:42 PM, Zhenghui Zhou wrote: > I'm trying to build a project in cygwin64 under windows 10 which depends the > LLVM libraries and had been built successfully under some linux > environment. The problem is that the build scripts of CMake can not find > the LLVM libraries. > > I have installed LLVM-devel package of cygwin64, and cmake can located the > LLVMConfig.cmake file in /usr/lib/cmake/llvm directory which is installed > along with the LLVM packages. > > An example of CMakeList.txt likes: > > cmake_minimum_required(VERSION 3.1) > project(simple) > message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") > find_package(LLVM REQUIRED CONFIG) > message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") > ... > > And the output reports: > > -- Using LLVMConfig.cmake in: /usr/lib/cmake/llvm > CMake Error at CMakeLists.txt:10 (find_package): > Found package configuration file: > > /usr/lib/cmake/llvm/LLVMConfig.cmake > > but it set LLVM_FOUND to FALSE so package "LLVM" is considered to be NOT > FOUND. Reason given by package: > > The following imported targets are referenced, but are missing: > LLVMSupport > LLVMCore LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMAnalysis > LLVMipo LLVMMC LLVMPasses LLVMLinker LLVMIRReader LLVMBitReader > LLVMMCParser LLVMObject LLVMProfileData LLVMTarget LLVMVectorize > > -- Configuring incomplete, errors occurred! > > After digging for several hours, I think the problem is caused by lacking > of shared objects of LLVM. There are only static libraries of LLVM under > Cygwin/Windows. A submit of LLVM tells > that the shared library targets may only need on most platforms so that the > static library targets is split into theire own export file and can be > ignored, The configuration entries in LLVMConfig.cmake are: > ... > include("${LLVM_CMAKE_DIR}/LLVMExports.cmake") > include("${LLVM_CMAKE_DIR}/LLVMStaticExports.cmake" OPTIONAL) > ... > The static targets export file is set optional at the second line。However, > configuration under cygwin will fail on the first line. > > So it may be figured that the second line goes in front: > ... > include("${LLVM_CMAKE_DIR}/LLVMStaticExports.cmake" OPTIONAL) > include("${LLVM_CMAKE_DIR}/LLVMExports.cmake") > ... > Everything works fine now. > > Is there anything I missed or better suggestions? The same problem was reported in https://cygwin.com/ml/cygwin/2019-08/msg00419.html, and the solution you found is the same as the one suggested by Yaakov in his reply. Ken -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple