View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015883CMakeCMakepublic2015-12-12 13:342016-05-02 08:30
ReporterDennis Clarke 
Assigned To 
PrioritynormalSeveritymajorReproducibilityhave not tried
StatusclosedResolutionduplicate 
PlatformFujitsu M4000 SPARC VII+OSSolaris 10OS Version
Product VersionCMake 3.4.1 
Target VersionFixed in Version 
Summary0015883: cmake bootstrap fails with Cannot find appropriate C compiler on this system.
DescriptionStrange :

$ 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
---------------------------------------------
TagsNo tags attached.
Attached Files

 Relationships
duplicate of 0015880closedKitware Robot Trouble building CMake on Solaris 10 

  Notes
(0039973)
Dennis Clarke (reporter)
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 (reporter)
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 (reporter)
2015-12-12 13:41

There appears to be little or no docs anywhere that show how to compile this.
(0039976)
Dennis Clarke (reporter)
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 (manager)
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 (manager)
2016-05-02 08:30

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2015-12-12 13:34 Dennis Clarke New Issue
2015-12-12 13:37 Dennis Clarke Note Added: 0039973
2015-12-12 13:40 Dennis Clarke Note Added: 0039974
2015-12-12 13:41 Dennis Clarke Note Added: 0039975
2015-12-12 16:15 Dennis Clarke Note Added: 0039976
2015-12-14 08:50 Brad King Relationship added related to 0015880
2015-12-14 08:56 Brad King Relationship replaced duplicate of 0015880
2015-12-14 08:56 Brad King Note Added: 0039980
2015-12-14 08:56 Brad King Status new => resolved
2015-12-14 08:56 Brad King Resolution open => duplicate
2015-12-14 08:56 Brad King Description Updated
2016-05-02 08:30 Robert Maynard Note Added: 0040983
2016-05-02 08:30 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team