Optware / Optware-ng

279 stars 52 forks source link

cannot build the cmake package #241

Closed houaq closed 6 years ago

houaq commented 6 years ago

Hi, all!

When I trying to build the cmake package for MIPSEL, it failed with error:

---------------------------------------------
CMake 2.8.1, Copyright 2000-2009 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: /home/houaq/openwrt/Optware-ng/buildroot-mipsel-ng/builds/cmake/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------

And contents of cmake_bootstrap.log:

Try: /home/houaq/openwrt/Optware-ng/buildroot-mipsel-ng/toolchain/buildroot-2017.08/output/host/bin/mipsel-buildroot-linux-uclibc-gcc
Line: /home/houaq/openwrt/Optware-ng/buildroot-mipsel-ng/toolchain/buildroot-2017.08/output/host/bin/mipsel-buildroot-linux-uclibc-gcc  cmake_bootstrap_767_test.c -o cmake_bootstrap_767_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;
}

------------------------------------------
/lib/ld-uClibc.so.0: No such file or directory
Test produced non-zero return code

But I can build other package without error, Can someone tell me why?

alllexx88 commented 6 years ago

Hi,

cmake package was added to original Optware back in 2010 as a native package. This means it was designed to be built on the target device itself. I don't of a way to cross-compile cmake. If you find a way to do this, PRs are welcome 😃

alllexx88 commented 6 years ago

@houaq We now have a cmake package: c9dee04e505fc819906ea6bceba9ec1e8722bb97