MantisBT - CMake
View Issue Details
0015883CMakeCMakepublic2015-12-12 13:342016-05-02 08:30
Dennis Clarke 
 
normalmajorhave not tried
closedduplicate 
Fujitsu M4000 SPARC VII+Solaris 10
CMake 3.4.1 
 
0015883: cmake bootstrap fails with Cannot find appropriate C compiler on this system.
Strange :

$ echo $CC
/opt/solarisstudio12.4/bin/cc

$ /opt/solarisstudio12.4/bin/cc -V
cc: Sun C 5.13 SunOS_sparc 2014/10/20

./bootstrap --no-qt-gui --no-system-libarchive
CMake 3.4.1, Copyright 2000-2015 Kitware, Inc.
---------------------------------------------
Error when bootstrapping CMake:
Cannot find appropriate C compiler on this system.
Please specify one using environment variable CC.
See cmake_bootstrap.log for compilers attempted.

---------------------------------------------
Log of errors: /usr/local/build/cmake-3.4.1_SunOS5.10_sparcv9.004/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
No tags attached.
duplicate of 0015880closed Kitware Robot Trouble building CMake on Solaris 10 
Issue History
2015-12-12 13:34Dennis ClarkeNew Issue
2015-12-12 13:37Dennis ClarkeNote Added: 0039973
2015-12-12 13:40Dennis ClarkeNote Added: 0039974
2015-12-12 13:41Dennis ClarkeNote Added: 0039975
2015-12-12 16:15Dennis ClarkeNote Added: 0039976
2015-12-14 08:50Brad KingRelationship addedrelated to 0015880
2015-12-14 08:56Brad KingRelationship replacedduplicate of 0015880
2015-12-14 08:56Brad KingNote Added: 0039980
2015-12-14 08:56Brad KingStatusnew => resolved
2015-12-14 08:56Brad KingResolutionopen => duplicate
2015-12-14 08:56Brad KingDescription Updatedbug_revision_view_page.php?rev_id=1976#r1976
2016-05-02 08:30Robert MaynardNote Added: 0040983
2016-05-02 08:30Robert MaynardStatusresolved => closed

Notes
(0039973)
Dennis Clarke   
2015-12-12 13:37   
This is almost funny :

$ cat /usr/local/build/cmake-3.4.1_SunOS5.10_sparcv9.004/Bootstrap.cmk/cmake_bootstrap.log
Try: /opt/solarisstudio12.4/bin/cc
Line: /opt/solarisstudio12.4/bin/cc cmake_bootstrap_16866_test.c -o cmake_bootstrap_16866_test
---------- file -----------------------

#ifdef __cplusplus
# error "The CMAKE_C_COMPILER is set to a C++ compiler"
#endif

#include<stdio.h>

#if defined(__CLASSIC_C__)
int main(argc, argv)
  int argc;
  char* argv[];
#else
int main(int argc, char* argv[])
#endif
{
  printf("%d%c", (argv != 0), (char)0x0a);
  return argc-1;
}

------------------------------------------
ld: fatal: file /opt/solarisstudio12.4/lib/compilers/crti.o: wrong ELF class: ELFCLASS32
ld: fatal: file processing errors. No output written to cmake_bootstrap_16866_test
Test failed to compile

Seems as if the bootstrap process does not know how to specify a 64-bit compile.
(0039974)
Dennis Clarke   
2015-12-12 13:40   
set CFLAGS thus :

$ CFLAGS=\-errfmt=error\ \-erroff=%none\ \-errshort=full\ \-xstrconst\ \
> \-xildoff\ \-m64\ \-xmemalign=8s\ \-xnolibmil\ \-Xa\ \-xcode=pic32\ \
> \-xregs=no%appl\ \-xlibmieee\ \-mc\ \-g\ \-xs\ \-ftrap=%none\ \-Qy\ \
> \-xbuiltin=%none\ \-xdebugformat=dwarf\ \-xunroll=1\ \-xtarget=ultraT2\ \
> \-xcache=8/16/4:4096/64/16

restart bootstrap and watch it fails again because of C++ compiler problems :

./bootstrap --no-qt-gui --no-system-libarchive

---------------------------------------------
CMake 3.4.1, Copyright 2000-2015 Kitware, Inc.
C compiler on this system is: /opt/solarisstudio12.4/bin/cc -errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xa -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=ultraT2 -xcache=8/16/4:4096/64/16
---------------------------------------------
Error when bootstrapping CMake:
Cannot find appropriate C++ compiler on this system.
Please specify one using environment variable CXX.
See cmake_bootstrap.log for compilers attempted.
---------------------------------------------
Log of errors: /usr/local/build/cmake-3.4.1_SunOS5.10_sparcv9.004/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
(0039975)
Dennis Clarke   
2015-12-12 13:41   
There appears to be little or no docs anywhere that show how to compile this.
(0039976)
Dennis Clarke   
2015-12-12 16:15   
It apprears that the CMake build process can not determine the architecture of a system and thus the CGLAGS and CXXFLAGS must be set in advance to specify 64-bit. Otherwise it looks like the default is a 32-bit compile.
(0039980)
Brad King   
2015-12-14 08:56   
To keep discussion of trouble on Solaris focused in one place I'm resolving this as a duplicate of 0015880.
(0040983)
Robert Maynard   
2016-05-02 08:30   
Closing resolved issues that have not been updated in more than 4 months.