[LLVMbugs] [Bug 2846] LLVM does not build (Linux AMD64 GCC 3.4.6)

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Oct 3 12:59:23 PDT 2008


http://llvm.org/bugs/show_bug.cgi?id=2846


Óscar Fuentes <ofv at wanadoo.es> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |INVALID




--- Comment #12 from Óscar Fuentes <ofv at wanadoo.es>  2008-10-03 14:59:22 ---
(In reply to comment #10)
> Concerning the error: I let cmake regenerate verbose Makefiles. This showed me
> that it invokes /usr/bin/c++ (GCC 3.4.6 in my case), not what is set as CXX
> when running cmake, nor what's in the $PATH (both was pointing to GCC 4.3.1):

You mean that there is a `c++' executable on your PATH that comes before than
the one on /usr/bin, and that it was ignored? If the answer is yes, it is a bug
on CMake. Please report it on http://www.cmake.org

[snip]
> So that explains, and you could rightfully call it my fault. I switched the
> cmake variables CMAKE_CXX_COMPILER, CMAKE_C_COMPILER to GCC 4.3.1 and the
> compilation succeeded.
> 

(In reply to comment #11)
> Ok, thanks for clarification. I'd consider this behaviour really error-prone,
> cmake should honour user-supplied standard CC, CXX, LD, etc variables

CMake uses the CXX environment variable. But if you want to specify a compiler
on the CMake command line invocation, you need to use CMAKE_CXX_COMPILER. This
makes some sense, because `make -DCXX=foo` sets the CXX *variable*, but there
is no CXX variable within CMake, it has CMAKE_CXX_COMPILER, which default value
is taken from the CXX environment variable, if defined. You can argue that this
is a bit verbose, but it is consistent with CMake's naming conventions.

One more thing to keep in mind is that CMake != make. If there is a confusing
thing here is CMake's name itself :-).


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list