[CMake] Cross Compile MySQL Connector/C for Linux/PowerPC architecture using CMake - Failure

Niranjan M studywireless at gmail.com
Tue Mar 19 17:51:47 EDT 2013


Hi All,
        I am trying to cross compile MySql Connector/C for Linux/PowerPC
architecture and I am getting the below error.

PS: CMAKE Version used is 2.8.7

Command:
Step 1: Setup my tool chain for PowerPC
Step 2: Cmake command

cmake -G "Unix Makefiles"
-DCMAKE_INSTALL_PREFIX=~/NewDataBaseStuff/mysqlclient_c/lib
-DCMAKE_C_COMPILER="ppc_4xx-gcc" -DCMAKE_CXX_COMPILER="ppc_4xx-g++"
-DCMAKE_C_FLAGS="-c -g -static -I. -I/opt/ELDK/4.2/ppc_4xx/usr/include/"
--debug-trycompile

debug trycompile on
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /opt/ELDK/4.2/usr/bin/ppc_4xx-gcc
-- Check for working C compiler: /opt/ELDK/4.2/usr/bin/ppc_4xx-gcc -- works
-- Detecting C compiler ABI info
CMake Error at
/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerABI.cmake:31
(TRY_COMPILE):
  Cannot copy output executable

    ''

  to destination specified by COPY_FILE:

    'DIR/mysql-connector-c-6.0.2/CMakeFiles/CMakeDetermineCompilerABI_C.bin'

  Unable to find the executable at any of:

    DIR/mysql-connector-c-6.0.2/CMakeFiles/CMakeTmp/cmTryCompileExec
    DIR/mysql-connector-c-6.0.2/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec

DIR/mysql-connector-c-6.0.2/CMakeFiles/CMakeTmp/Development/cmTryCompileExec

Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:71
(CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:21 (PROJECT)


-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/ELDK/4.2/usr/bin/ppc_4xx-g++
-- Check for working CXX compiler: /opt/ELDK/4.2/usr/bin/ppc_4xx-g++ --
works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
.
.
.
CMake Error at /usr/share/cmake-2.8/Modules/TestBigEndian.cmake:44
(MESSAGE):
  no suitable type found
Call Stack (most recent call first):
  CMakePlatformTests.txt:200 (TEST_BIG_ENDIAN)
  CMakeLists.txt:267 (INCLUDE)


-- Configuring incomplete, errors occurred!

So I have 2 problems:

1. Failure in detecting Compiler ABI information
2. Failing in Big Endianess test: I checked couple of posts online and
tried to suppress the endianess check by modifying CMakePlatformTests.txt,
but the build process still failed. Below is the log:

debug trycompile on
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /opt/ELDK/4.2/usr/bin/ppc_4xx-gcc
-- Check for working C compiler: /opt/ELDK/4.2/usr/bin/ppc_4xx-gcc -- works
-- Detecting C compiler ABI info
CMake Error at
/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerABI.cmake:31
(TRY_COMPILE):
  Cannot copy output executable

    ''

  to destination specified by COPY_FILE:

    'DIR/mysql-connector-c-6.0.2/CMakeFiles/CMakeDetermineCompilerABI_C.bin'

  Unable to find the executable at any of:

    DIR/mysql-connector-c-6.0.2/CMakeFiles/CMakeTmp/cmTryCompileExec
    DIR/mysql-connector-c-6.0.2/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec

DIR/mysql-connector-c-6.0.2/CMakeFiles/CMakeTmp/Development/cmTryCompileExec

Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:71
(CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:21 (PROJECT)


-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/ELDK/4.2/usr/bin/ppc_4xx-g++
-- Check for working CXX compiler: /opt/ELDK/4.2/usr/bin/ppc_4xx-g++ --
works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
.
.
.
-- Check size of int8
-- Check size of int8 - failed
-- Check size of uint8
-- Check size of uint8 - failed
-- Check size of int16
-- Check size of int16 - failed
-- Check size of uint16
-- Check size of uint16 - failed
-- Check size of int32
-- Check size of int32 - failed
-- Check size of uint32
-- Check size of uint32 - failed
-- Check size of u_int32_t
-- Check size of u_int32_t - done
-- Check size of int64
-- Check size of int64 - failed
-- Check size of uint64
-- Check size of uint64 - failed
-- Check size of socklen_t
-- Check size of socklen_t - done
-- Performing Test HAVE_TIMESPEC_TS_SEC
-- Performing Test HAVE_TIMESPEC_TS_SEC - Failed
-- Performing Test QSORT_TYPE_IS_VOID
-- Performing Test QSORT_TYPE_IS_VOID - Success
-- Performing Test SIGNAL_RETURN_TYPE_IS_VOID
-- Performing Test SIGNAL_RETURN_TYPE_IS_VOID - Success
-- Performing Test HAVE_ISNAN
-- Performing Test HAVE_ISNAN - Success
-- Performing Test HAVE_RINT
-- Performing Test HAVE_RINT - Success
-- Performing Test C_HAS_inline
-- Performing Test C_HAS_inline - Success
-- Configuring incomplete, errors occurred!

I am attaching the build logs along the mail.

With Regards,
Neo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130319/c8eed196/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Make_With_Endianess_Check.log
Type: application/octet-stream
Size: 12602 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130319/c8eed196/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Make_Without_Endianess_Check.log
Type: application/octet-stream
Size: 13811 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130319/c8eed196/attachment-0003.obj>


More information about the CMake mailing list