Cross-compile tensorflow c library for mips64 failed - tensorflow

I found a problem when trying to cross-compile tensorflow c library for mips64 with mips64 cross-compile toolchains using cmake way. I want to deploy a small speech model on the mips64 board.
My steps:
I clone docker env and crooss compile using cmake way.
docker run -d -v /home/hart/Desktop/workspace/toolchains:/toochains --name=cmake_tflite tensorflow/tensorflow:latest-devel tail -f /dev/null
cmake cmds: `ARMCC_FLAGS="-Wall -O3"
ARMCC_PREFIX=/toochains/t31a/mips-gcc472-glibc216-64bit/bin/mips-linux-gnu-
cmake -DCMAKE_C_COMPILER=${ARMCC_PREFIX}gcc
-DCMAKE_CXX_COMPILER=${ARMCC_PREFIX}g++
-DCMAKE_C_FLAGS="${ARMCC_FLAGS}"
-DCMAKE_CXX_FLAGS="${ARMCC_FLAGS}"
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-DCMAKE_SYSTEM_NAME=Linux
../tensorflow_src/tensorflow/lite/c
Error found when running CMake cmds above:
Setting build type to Release, for debug builds use'-DCMAKE_BUILD_TYPE=Debug'.
CMake Warning at /build_t31a/abseil-cpp/absl/copts/AbseilConfigureCopts.cmake:30 (message):
Value of CMAKE_SYSTEM_PROCESSOR (mips) is unknown and cannot be used to set
ABSL_RANDOM_RANDEN_COPTS
Call Stack (most recent call first):
/build_t31a/abseil-cpp/CMake/AbseilHelpers.cmake:18 (include)
/build_t31a/abseil-cpp/CMakeLists.txt:85 (include)
CMake Error at /build_t31a/eigen/CMakeLists.txt:119 (message):
Can't link to the standard math library. Please report to the Eigen
developers, telling them about your platform.
-- Configuring incomplete, errors occurred!
See also "/build_t31a/CMakeFiles/CMakeOutput.log".
See also "/build_t31a/CMakeFiles/CMakeError.log".
What's wrong with my cross-compile steps? Is MIPS64 not supported?
I also leave this message on tensorflow github.
I will appreciate any reply.
enter link description here

Related

error in CMake Cyclone DDS, cannot find openssl

How can i fix this error,
while doing Cmake, it cant find Openssl, im trying to install cycloneDDS in windows
rkpsr#Rahul MINGW64 ~
$ cd cyclonedds
rkpsr#Rahul MINGW64 ~/cyclonedds (master)
$ cd build
rkpsr#Rahul MINGW64 ~/cyclonedds/build (master)
$ cmake -G "Eclipse CDT4 - MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=/user -DBUILD_EXAMPLES=ON ..-- Eclipse version is set to 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
-- Building without OpenSSL support
-- Feature rusage disabled
-- Feature netstat disabled
CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find BISON (missing: BISON_EXECUTABLE) (Required is at least
version "3.0.4")
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.20/Modules/FindBISON.cmake:306 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
src/idl/CMakeLists.txt:17 (find_package)
-- Configuring incomplete, errors occurred!
See also "C:/Users/rkpsr/cyclonedds/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/rkpsr/cyclonedds/build/CMakeFiles/CMakeError.log".
rkpsr#Rahul MINGW64 ~/cyclonedds/build (master)
I have included Openssl in Path variable as
Openssl Environment Variable
OpenSSL
Openssl verification
It can't find OpenSSL, true, but that means it simply builds without any features requiring OpenSSL. The error that causes the build to fail is because I can't find "bison", which is one of the prerequisites listed in the README.
Besides that, MinGW has its own quirks. I know other people have run into some issues building with it, but they seem to have made it through the CMake stage without trouble.
We currently only check that it builds with Visual Studio. In part that is because of limited resources, but in part it is also because you can easily use one built using VS in MinGW, so it is not like it forces you to build everything with VS.
Anyway, any patches that make it play nice with MinGW are most welcome.

espidf COMPONENT_DIR

I'm trying to compile a simple Hello_world example using the Smooth component (https://github.com/PerMalmberg/Smooth), and get error: include could not find load file:
../lib/compiler_options.cmake.
It seems that COMPONENT_DIR is not set, but I'm not aware whether/where to set this, or where this should have been set.
I've been staring at this too long, and am not finding the (apparently) obvious problem. Anyone any thoughts?
ERROR
Note: You are using Python 3.8.0. Python 3 support is new, please report any problems you encounter. Search for 'Setting
the Python Interpreter' in the ESP-IDF docs if you want to use Python 2.7.
Checking Python dependencies...
Python requirements from C:\Esp32_tools\esp-idf-v3.3\requirements.txt are satisfied.
Running cmake in directory C:\Temp\esp\testCPP\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 --warn-uninitialized C:\Temp\esp\testCPP"...
Warn about uninitialized values.
-- Building for target esp32
-- ccache will be used for faster builds
CMake Error at C:/Temp/esp/testCPP/externals/smooth/smooth_component/CMakeLists.txt:21 (include):
include could not find load file:
../lib/compiler_options.cmake
Call Stack (most recent call first):
C:/Esp32_tools/esp-idf-v3.3/tools/cmake/scripts/expand_requirements.cmake:107 (include)
C:/Esp32_tools/esp-idf-v3.3/tools/cmake/scripts/expand_requirements.cmake:217 (expand_component_requirements)`
CMake Error at C:/Esp32_tools/esp-idf-v3.3/CMakeLists.txt:39 (message):
Failed to expand component requirements
VERSION
C:\Temp\esp\testCPP>cmake --version
cmake version 3.13.4
CMake suite maintained and supported by Kitware (kitware.com/cmake).
CMakeLists.txt
set(CMAKE_CXX_STANDARD 17)
if(${ESP_PLATFORM})
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
# Include Smooth as a component
set(EXTRA_COMPONENT_DIRS
externals/smooth/smooth_component)
project(name_of_your_project)
else()
# Empty project when not building for ESP (i.e. when loading the project into an IDE with already configured tool chains for native Linux)
endif()```
CMake Error at C:/Esp32_tools/esp-idf-v3.3/CMakeLists.txt:39 (message):
Failed to expand component requirements
You are missing this line in CMakeLists.txt
https://github.com/espressif/esp-idf/blob/master/examples/get-started/hello_world/CMakeLists.txt#L3

Cmake when building LLVM

Trying to build llvm project LLVM Project with CMake, it gives me an error that I can't solve by my own.
For doing this, I am using an Ubuntu Virtual Machine (version 18.04) and I am trying to build the project with "ninja".
I have tried to build this with the following commands (which the LLVM Builder Guide says to use, https://llvm.org/docs/GettingStarted.html)
git clone https://github.com/llvm/llvm-project.git
cd llvm-project/
mkdir build && cd build
cmake -DLLVM_ENABLE_PROJECTS='all' -DCMAKE_BUILD_TYPE=Release -G 'Ninja' ../llvm
At the last command, I use the first flag to download all the projects and the second because I do not need the Debug tools.
The last command gives me the following error several times with different targets:
CMake Error at /usr/share/cmake-3.10/Modules/ExternalProject.cmake:2759 (get_property):
get_property could not find TARGET llgo. Perhaps it has not yet been
created.
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/ExternalProject.cmake:3032 (_ep_add_configure_command)
/home/enrique/Escritorio/llvm-project/llgo/CMakeLists.txt:200 (externalproject_add)
/home/enrique/Escritorio/llvm-project/llgo/CMakeLists.txt:219 (add_libgo_variant)
And this library error:
-- LLD version: 10.0.0
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find LibEdit (missing: libedit_INCLUDE_DIRS libedit_LIBRARIES)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/home/enrique/Escritorio/llvm-project/lldb/cmake/modules/FindLibEdit.cmake:54 (find_package_handle_standard_args)
/home/enrique/Escritorio/llvm-project/lldb/cmake/modules/LLDBConfig.cmake:104 (find_package)
/home/enrique/Escritorio/llvm-project/lldb/CMakeLists.txt:21 (include)
-- Configuring incomplete, errors occurred!
See also "/home/enrique/Escritorio/llvm-project/build/CMakeFiles/CMakeOutput.log".
See also "/home/enrique/Escritorio/llvm-project/build/CMakeFiles/CMakeError.log".
I had the same issue, tried uninstalling the golang compiler (because I don't need llvm support for go); to no avail. I'm not an LLVM expert so this might not be the canonical solution but here's how I solved it:
I replaced
-DLLVM_ENABLE_PROJECTS='all'
by
-DLLVM_ENABLE_PROJECTS="proj1;proj2;proj3"
where I built the list "proj1;proj2;proj3" by grepping project is enabled$ in cmake output and removed the llgo project. I got a list like:
-- clang project is enabled
-- clang-tools-extra project is enabled
-- compiler-rt project is enabled
-- debuginfo-tests project is enabled
-- libclc project is enabled
-- libcxx project is enabled
-- libcxxabi project is enabled
-- libunwind project is enabled
-- lld project is enabled
-- lldb project is enabled
-- llgo project is enabled
-- openmp project is enabled
-- parallel-libs project is enabled
-- polly project is enabled
-- pstl project is enabled
and then built the following list with some vim macros/whatever you master (note: no llgo in there):
clang;clang-tools-extra;compiler-rt;debuginfo-tests;libclc;libcxx;libcxxabi;libunwind;lld;lldb;openmp;parallel-libs;polly;pstl
Then compiling llvm succeeded \o/

CMake error while compiling linphone android project in ubuntu 16.04

I am new in linphone. I clone linphone git repo here, I got error when i am going to compiling linphone project.
As mention step in linphone github page here, follow all the step. and install required software in ubuntu 16.04.
When i am going to do ./prepare.py -ac or ./prepare.py -L got same error.
Issues is,
/linphone-android$ ./prepare.py ac
cmake /home/krunal/linphone-android/submodules/cmake-builder -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/home/krunal/linphone-android/liblinphone-sdk/android-arm -DCMAKE_INSTALL_PREFIX=/home/krunal/linphone-android/liblinphone-sdk/android-arm -DLINPHONE_BUILDER_WORK_DIR=/home/krunal/linphone-android/WORK/android-arm -DCMAKE_TOOLCHAIN_FILE=toolchains/toolchain-android-arm.cmake -DLINPHONE_BUILDER_CONFIG_FILE=configs/config-android.cmake -DCMAKE_INSTALL_MESSAGE=LAZY -DLINPHONE_BUILDER_EXTERNAL_SOURCE_PATH=/home/krunal/linphone-android/submodules -DENABLE_VIDEO=NO -G "Unix Makefiles" -DENABLE_GPL_THIRD_PARTIES=YES -DENABLE_NON_FREE_CODECS=YES -DENABLE_AMRNB=YES -DENABLE_AMRWB=YES -DENABLE_BV16=YES -DENABLE_CODEC2=YES -DENABLE_G729=YES -DENABLE_GSM=YES -DENABLE_ILBC=YES -DENABLE_ISAC=YES -DENABLE_OPUS=YES -DENABLE_SILK=YES -DENABLE_SPEEX=YES -DENABLE_FFMPEG=YES -DENABLE_H263=YES -DENABLE_H263P=YES -DENABLE_MPEG4=YES -DENABLE_OPENH264=YES -DENABLE_VPX=YES
CMake Error at toolchains/android/toolchain-android.cmake:53 (message):
Cannot find the compiler
Call Stack (most recent call first):
toolchains/toolchain-android-arm.cmake:27 (include)
/usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake:98 (include)
CMakeLists.txt
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
- Configuring incomplete, errors occurred!
Set your compiler, and have a compiler with the -Doption:
-DCMAKE_C_COMPILER=/usr/bin/gcc
Related: cmake: problems specifying the compiler (2)

CGAL cmake on cygwin fails

I'm trying to compile CGAL 4.5 on cygwin (windows 7). i have gcc-core, gcc-g++ and gmp installed but when i try to run cmake i get following error:
$ cmake .
-- The CXX compiler identification is GNU 4.8.3
CMake Error: Could not find cmake module file:/home/metalab/CGAL-4.5/CMakeFiles/2.8.11.2/CMakeCXXCompiler.cmake
-- The C compiler identification is GNU 4.8.3
CMake Error: Could not find cmake module file:/home/metalab/CGAL-4.5/CMakeFiles/2.8.11.2/CMakeCCompiler.cmake
CMake Warning at /usr/share/cmake-2.8.11.2/Modules/Platform/CYGWIN.cmake:15 (message):
CMake no longer defines WIN32 on Cygwin!
(1) If you are just trying to build this project, ignore this warning or
quiet it by setting CMAKE_LEGACY_CYGWIN_WIN32=0 in your environment or in
the CMake cache. If later configuration or build errors occur then this
project may have been written under the assumption that Cygwin is WIN32.
In that case, set CMAKE_LEGACY_CYGWIN_WIN32=1 instead.
(2) If you are developing this project, add the line
set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
at the top of your top-level CMakeLists.txt file or set the minimum
required version of CMake to 2.8.4 or higher. Then teach your project to
build on Cygwin without WIN32.
Call Stack (most recent call first):
/usr/share/cmake-2.8.11.2/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
CMakeLists.txt:7 (project)
CMake Error: Could not find cmake module file:/home/metalab/CGAL-4.5/CMakeFiles/2.8.11.2/CMakeRCCompiler.cmake
-- Check for working CXX compiler: /usr/bin/c++.exe
CMake Error at /usr/share/cmake-2.8.11.2/Modules/CMakeTestCXXCompiler.cmake:40 (try_compile):
Unknown extension ".cxx" for file
/home/metalab/CGAL-4.5/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
try_compile() works only for enabled languages. Currently these are:
C CXX RC
See project() command to enable other languages.
Call Stack (most recent call first):
CMakeLists.txt:7 (project)
-- Check for working CXX compiler: /usr/bin/c++.exe -- broken
CMake Error at /usr/share/cmake-2.8.11.2/Modules/CMakeTestCXXCompiler.cmake:54 (message):
The C++ compiler "/usr/bin/c++.exe" is not able to compile a simple test
program.
It fails with the following output:
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:7 (project)
-- Configuring incomplete, errors occurred!
i already tried playing with CMAKE_LEGACY_CYGWIN_WIN32 but no success.
I ran in a similar error. cmake seemed to not be able to find anything from Cygwin.
The fact is that you need to run the Cygwin version of cmake. If you installed cmake from an installer and it went under C:\Program Files, you have the wrong cmake and it won't find most everything which it should otherwise find.