Hi Elmar,
I get the following error when i cmake with the android toolchain i
have created. I have pasted the toolchain for android after the cmake
configuration.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- Buildversion: 0.8
-- Found XSLTproc: /usr/bin/xsltproc
-- Found GnuPatch: /usr/bin/patch
-- Found GnuSed: /bin/sed
-- Found gSOAP in: /home/aricent/praga/smartenergy/gsoap-2.7
-- Found and included DPWS host executables in /home/aricent/praga/
smartenergy/ws4d-gsoap-install
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - not found.
-- Could NOT find Threads (missing: Threads_FOUND)
-- Found Doxygen: /usr/bin/doxygen
-- Could NOT find SystemTap Development Tools! See
http://sourceware.org/systemtap/
for details. (missing: DTRACE_EXECUTABLE)
-- Doing a cross compile CC=/home/aricent/mydroid/prebuilt/linux-x86/
toolchain/arm-eabi-4.2.1/bin/arm-eabi-gcc
-- Looking for inet_pton
-- Looking for inet_pton - not found
-- Looking for inet_ntop
-- Looking for inet_ntop - not found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/aricent/praga/smartenergy/
ws4d-gsoap-build-cross
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Copyright (C) 2007 University of Rostock
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA.
# this one is important
INCLUDE(CMakeForceCompiler)
SET (CMAKE_SYSTEM_NAME Linux)
SET (CMAKE_SYSTEM_PROCESSOR arm-eabi)
SET (CMAKE_CROSSCOMPILING 1)
SET (ANDROID 1)
SET (DEVROOT "/home/aricent/mydroid")
SET (SDKROOT "${DEVROOT}/development/ndk/build/platforms/android-4/
arch-arm")
#SET (TOOLSROOT "${DEVROOT}/build/prebuilt/linux-x86/arm-eabi-4.4.0")
SET (TOOLSROOT "${DEVROOT}/prebuilt/linux-x86/toolchain/arm-
eabi-4.2.1")
# specify the cross compiler
#SET(CROSS_COMPILER_PATH /usr/bin)
#SET(C_CROSS_COMPILER arm-linux-gnueabi-)
#SET(CROSS_COMPILER_PATH /home/aricent/mydroid/prebuilt/linux-x86/
toolchain/arm-eabi-4.2.1/bin)
#SET(C_CROSS_COMPILER arm-eabi-)
#FIND_PROGRAM(CCACHE ccache)
#IF(CCACHE)
# SET(CMAKE_C_COMPILER "${CCACHE}" "${CROSS_COMPILER_PATH}/$
{C_CROSS_COMPILER}gcc")
# SET(CMAKE_CXX_COMPILER "${CCACHE}" "${CROSS_COMPILER_PATH}/$
{C_CROSS_COMPILER}c++")
#ELSE(CCACHE)
#SET(CMAKE_C_COMPILER "${CROSS_COMPILER_PATH}/${C_CROSS_COMPILER}
gcc" "")
#SET(CMAKE_CXX_COMPILER "${CROSS_COMPILER_PATH}/${C_CROSS_COMPILER}
c++" "")
# SET(CMAKE_C_COMPILER "${CROSS_COMPILER_PATH}/${C_CROSS_COMPILER}
gcc")
# SET(CMAKE_CXX_COMPILER "${CROSS_COMPILER_PATH}/${C_CROSS_COMPILER}
c++")
#ENDIF(CCACHE)
CMAKE_FORCE_C_COMPILER( "${TOOLSROOT}/bin/arm-eabi-gcc" GNU)
CMAKE_FORCE_CXX_COMPILER( "${TOOLSROOT}/bin/arm-eabi-g++" GNU)
##########################################################################################################################
#function verbose_command
#{
# if [ "$V" = "1" -o "$DRY_RUN" = "1" ]; then
# echo "$@"
# fi
#
# if [ "$DRY_RUN" != "1" ]; then
# "$@"
# fi
#}
# Building dynamic executable
# LD_PREFIX="--sysroot=$SDKROOT -nostdlib -Bdynamic -Wl,-
dynamic-linker,/system/bin/linker -Wl,--gc-sections -Wl,-
z,nocopyreloc"
# STLport static lib explodes here, needs to come after
objects (??)
# LD_BEGIN="$SDKROOT/usr/lib/libc.so $SDKROOT/usr/lib/libm.so
$SDKROOT/usr/lib/crtbegin_dynamic.o"
# user objects
# user dyn. libs
# LD_END="-Wl,--no-undefined -Wl,-rpath-link=$SDKROOT/usr/lib
arm-eabi-gcc -mthumb-interwork -print-libgcc-file-name $SDKROOT/usr/
lib/crtend_android.o"
# verbose_command "$WRAPPED" $LD_PREFIX $LD_BEGIN $LD_END
##########################################################################################################################
#SET(CMAKE_RANLIB "${CROSS_COMPILER_PATH}/${C_CROSS_COMPILER}ranlib")
#SET(CMAKE_AR "${CROSS_COMPILER_PATH}/${C_CROSS_COMPILER}ar")
SET(CMAKE_RANLIB "${TOOLSROOT}/bin/arm-eabi-ranlib")
SET(CMAKE_AR "${TOOLSROOT}/bin/arm-eabi-ar")
SET(CMAKE_COMPILER_IS_GNUCC 1)
SET(CMAKE_COMPILER_IS_GNUCXX 1)
SET(CMAKE_SKIP_RPATH ON)
#SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
SET (CMAKE_C_FLAGS
"--sysroot=${SDKROOT} -nostdlib -I{SDKROOT}/usr/include -fpic -
mthumb-interwork -ffunction-sections -funwind-tables -fstack-protector
-fno-short-enums -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -
D__ARM_ARCH_5TE__ -march=armv5te -mtune=xscale -msoft-float -mthumb -
Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -
DANDROID -O2 -DNDEBUG -g -MMD -MP -MF" )
SET (CMAKE_CXX_FLAGS
"--sysroot=${SDKROOT} -nostdlib -I{SDKROOT}/usr/include -fpic -
mthumb-interwork -ffunction-sections -funwind-tables -fstack-protector
-fno-short-enums -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -
D__ARM_ARCH_5TE__ -march=armv5te -mtune=xscale -msoft-float -mthumb -
Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -
DANDROID -O2 -DNDEBUG -g -MMD -MP -MF")
#SET(LDFLAGS
# "--sysroot=${SDKROOT} -Wl,-rpath-link=$SDKROOT/usr/lib/ -L$SDKROOT/
usr/lib/")
#SET(LIBS
# "-lc")
set(CMAKE_SHARED_LINKER_FLAGS CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-
nostdlib -Wl,--no-undefined")
#INCLUDE_DIRECTORIES(BEFORE SYSTEM /usr/arm-linux-gnueabi/include)
#LINK_DIRECTORIES(/usr/arm-linux-gnueabi/lib)
#INCLUDE_DIRECTORIES(BEFORE SYSTEM /home/aricent/mydroid/prebuilt/
linux-x86/toolchain/arm-eabi-4.2.1/lib/gcc/arm-eabi/4.2.1/include)
#LINK_DIRECTORIES(/home/aricent/mydroid/prebuilt/linux-x86/toolchain/
arm-eabi-4.2.1/lib/gcc/arm-eabi/4.2.1)
INCLUDE_DIRECTORIES(BEFORE SYSTEM "${SDKROOT}/usr/include")
LINK_DIRECTORIES("${SDKROOT}/usr/lib")
# where is the target environment
#SET(CMAKE_FIND_ROOT_PATH /usr/arm-linux-gnueabi/ ${GSOAP_PATH} $
{DPWS_PATH} ${DPWS_HOSTEXEC_PATH})
#SET(CMAKE_FIND_ROOT_PATH /home/aricent/mydroid/prebuilt/linux-x86/
toolchain/arm-eabi-4.2.1/ ${GSOAP_PATH} ${DPWS_PATH} $
{DPWS_HOSTEXEC_PATH})
SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${TOOLSROOT}" ${GSOAP_PATH} $
{DPWS_PATH} ${DPWS_HOSTEXEC_PATH})
#search for libraries and header files only in the target environment
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Regards,
ManiInn
On Oct 18, 10:44 am, Elmar Zeeb <
elmar.z...@uni-rostock.de> wrote:
> Am 18.10.2010 07:01, schrieb ManiInn:> Hi Elmar,
>
> > Please help me on this.
>
> I didn't have time to further look at this issue, and won't be able to
> look at it until wednesday. The last time I looked at this issues I had
> problems to to create a toolchain file that passes the compiler check of
> cmake. So it looks like you made more progress. Could you send me your
> toolchain file and how you call cmake for cross compilation.
>
>
>
> > Regards,
> > ManiInn
>
> > On Oct 15, 5:15 pm, ManiInn<
jay.manikan...@gmail.com> wrote:
> >> Hi,
>
> >> I am able to cross compile ws4d-gsoap source using arm-eabi present in
> >> android toolchain.
>
> >> But at the end I get linker error before creating the C executable
>
> >> ld: this linker was not configured to use sysroots
>
> >> Please let me know how to add the ld flags in cmake build system.
>
> You can use the CMAKE_SHARED_LINKER_FLAGS and CMAKE_MODULE_LINKER_FLAGS
> in the toolchain file. Seehttp://
trac.e-technik.uni-rostock.de/projects/ws4d-gsoap/browser/trun...
> for an example.
>
> Regards,
> Elmar
>
> --
> *******************************************************************************
> Dipl.-Inf. Elmar Zeeb
> Universit t Rostock, Fakult t f. Informatik und Elektrotechnik
> Institut f. Angewandte Mikroelektronik und Datentechnik
> University of Rostock, Faculty of CS and EE
> Institute of Applied Microelectronics and Computer Engineering,
> 18051 Rostock
> Deutschland/Germany
> Tel. :
++49 (0)381 498 - 7262
> Fax :
++49 (0)381 498 - 7252
> Email:
elmar.z...@uni-rostock.de
> www :
http://www.imd.uni-rostock.de/,http://www.ws4d.org/
> *******************************************************************************