delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/07/27/04:30:39

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=RX8H3cbxan6hXCi4
qXI/PkDFpwB8zDKDh4r2zqwK4ngGxUX2Q+MZnc9a3Yferq4uj8GR0wX00ASfqPBW
GIcbCjdFEo/Y61nnwBpyEyfHR8jnRw1JBlmyK3NVSIsK32Qp5ha4JfzzH+7/iQV5
2JHYunA7ybiSnoxTvWFjp/vgFSc=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=ABGVY8iIDniwoD2P9Gbc1k
ThJCo=; b=EDtIP3GsWFqR3KhkvAk2Au7E1kB080AFjPc6NFNsHr8Uxcr8eOdWA0
NcbXXb9tD+lBMJY5fwyZh/pTUhB6sVVCJ2WFd0rx9HIAr8J1oC5HQf1z4RjV9Xt2
AxFV5WFKkWEL6ehDv5Vs930a4nKs8AZJcXwK5FaDnsUHmj/GyuqBA=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=misconfigured, cmTC_29d2edir, cmTC_29d2e.dir, cmTC_29d2e
X-HELO: mail-wm0-f51.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=qSFEkAqihZ1GSeLhdDz9uKQH3URgHq0cT3IJHf2kX3Q=; b=YPB7nWDIxocpx+9jXlRlt50WRGit6XlLzyIBqnbAMexrtWvsPhb10kkfkzlK4PaoOt fhiD8xXPZ/Vo+lu0SYMpx4A8MZ2wx8HFPHlf2c9DeDoU4SIC6JSEFzo9vnOcAdal0I4/ Etgv1QiKay1u3bLc2bsbcUZVzGCSPLpG9Di4kW3mZZux7kSKNudpSGJ4kKbBnq402N7C WYZxakqKzV0CLhdHFgD4GoECIsMvqHFr2rDFOvs5wTNXeJAHyRLjYLbZFZEwnhu8J6An Ru/azmC3MdmO0UT3mLcerbr8k6rv4nRBcMmb8c++RuDzyQnv6Rydom+ydx46FsZkoM+W RnHg==
X-Gm-Message-State: AEkoouv8UU6DqVafg0PhCdRBNls4VLy4GtMs8H+G6L0BGz5TJaNeRUtuW/lJ2hlSsfLV/Q==
X-Received: by 10.194.189.229 with SMTP id gl5mr26410859wjc.168.1469608192016; Wed, 27 Jul 2016 01:29:52 -0700 (PDT)
Subject: Re: problem building with cmake under cygwin (need clang)
To: cygwin AT cygwin DOT com
References: <5796B2A7 DOT 8060002 AT molconn DOT com> <CAEhDDbBsAGK69QyXLzjQu3JQSjD-vje6bhkzJPRo+poRzmrt4Q AT mail DOT gmail DOT com> <57977D6D DOT 7050203 AT molconn DOT com> <a1fc6589-8803-0661-1afa-d29d782b55aa AT gmail DOT com> <5797956B DOT 40005 AT molconn DOT com>
From: =?UTF-8?Q?Csaba_R=c3=a1duly?= <rcsaba AT gmail DOT com>
Message-ID: <c8ab2013-50ae-6de9-fc24-749a867a7756@gmail.com>
Date: Wed, 27 Jul 2016 10:29:47 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
MIME-Version: 1.0
In-Reply-To: <5797956B.40005@molconn.com>

On 16-07-26 06:52 PM, LMH wrote:
> Thanks you for the clarification.
>
> I implemented your steps,
>
> $ ls src/
> CMakeLists.txt  include  README.md  src  test
>
> $ mkdir build
>
> $ cd build/
>
> $ cmake -DCMAKE_CXX_COMPILER=clang  ../src

Stop doing that-----------------------^^^^^^

CMakeLists.txt is in the root of the project. Point cmake to it, like this:

$ cmake  -DCMAKE_CXX_COMPILER=clang++  ..


>
> I get the following output, which is the same error output I was getting
> before. It is different then the errors you are specifying.
>
> -- The C compiler identification is GNU 4.9.3
> -- The CXX compiler identification is unknown
(snip)
>
>
> It looks like it is still using gnu for the compiler and not clang.

There are two different compilers cmake knows about: the C compiler 
(CMAKE_C_COMPILER) and the C++ compiler (CMAKE_CXX_COMPILER). You only 
set the C++ compiler; cmake is using its default for the C compiler.

For quickhull, CMAKE_C_COMPILER probably doesn't matter.

 > It
> looks like it can't identify the c++ compiler at all. I tried this,
>
> cmake -DCMAKE_CXX_COMPILER=clang++ ../src
>

For clang, it makes no difference (clang++ is usually a symlink to clang).

> because I think that CXX is the c++ compiler, but this doesn't make any
> difference. I have attached the cmake error and output logs in case that
> is useful.
>
> It just looks like there is something missing or misconfigured in my
> installation. The which clang and which clang++ commands return the
> expected values. If cmake isn't able to build a test app, then there is
> something wrong at that end I think.


This is what cmake tried:

Run Build Command:"/usr/bin/make.exe" "cmTC_29d2e/fast"
/usr/bin/make -f CMakeFiles/cmTC_29d2e.dir/build.make 
CMakeFiles/cmTC_29d2e.dir/build

make[1]: Entering directory 
'/cygdrive/g/shared_data/SMD/ATomilov_quickhull/build/CMakeFiles/CMakeTmp'

Building CXX object CMakeFiles/cmTC_29d2e.dir/testCXXCompiler.cxx.o

/usr/bin/clang++     -o CMakeFiles/cmTC_29d2e.dir/testCXXCompiler.cxx.o 
-c 
/cygdrive/g/shared_data/SMD/ATomilov_quickhull/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx

CMakeFiles/cmTC_29d2e.dir/build.make:65: recipe for target 
'CMakeFiles/cmTC_29d2e.dir/testCXXCompiler.cxx.o' failed
make[1]: Leaving directory 
'/cygdrive/g/shared_data/SMD/ATomilov_quickhull/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_29d2e/fast' failed
make[1]: *** [CMakeFiles/cmTC_29d2e.dir/testCXXCompiler.cxx.o] Error 127
make: *** [cmTC_29d2e/fast] Error 2


Try to run those commands manually:

$ cd 
'/cygdrive/g/shared_data/SMD/ATomilov_quickhull/build/CMakeFiles/CMakeTmp'

$ /usr/bin/clang++     -o 
CMakeFiles/cmTC_29d2e.dir/testCXXCompiler.cxx.o -c 
/cygdrive/g/shared_data/SMD/ATomilov_quickhull/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx

What is the output?


Csaba
-- 
Life is complex, with real and imaginary parts.
The Tao of math: The numbers you can count are not the real numbers.

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019