public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Garrett Cooper <yanegomi@gmail.com>
To: Rejish Rajagopala <rejish.rajagopala@sasken.com>
Cc: "ltp-list@lists.sourceforge.net" <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] Need help in cross compiling LTP for android
Date: Wed, 11 Apr 2012 02:23:21 -0700	[thread overview]
Message-ID: <3319EDD9-0FB3-4DB6-9251-ACFC01032122@gmail.com> (raw)
In-Reply-To: <6F91E0FFDA542149961F7BDED2D2B94B56372F8DEA@EXGMBX01.sasken.com>

Not enough context was provided to determine why linking failed.

On Apr 2, 2012, at 2:33 AM, Rejish Rajagopala <rejish.rajagopala@sasken.com> wrote:

> Hi Maxin,
> 
> I could resolve the configuration issue and I could cross compile on of the LTP modules (pty) for Android. Now I am trying to cross compile another  module (timers) for Andorid using the tool chain NDK r-7. I am facing the below error:
> 
> collect2: ld returned 1 exit status
> make[2]: *** [clock_gettime02] Error 1
> make[2]: Leaving directory `/u/ltp/ltp-full-20120104/testcases/kernel/timers/clock_gettime'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/u/ltp/ltp-full-20120104/testcases/kernel/timers'
> make: *** [testcases/kernel/timers-all] Error 2
> 
> 
> Please let me know why this is coming and what should I do to overcome this issue.
> 
> Thanks & Regards,
> Rejish
> ________________________________________
> From: Maxin B John [maxin.john@gmail.com]
> Sent: Thursday, March 08, 2012 2:27 PM
> To: Rejish Rajagopala
> Cc: Cyril Hrubis; ltp-list@lists.sourceforge.net
> Subject: Re: [LTP] Need help in cross compiling LTP for android
> 
> Hi,
> 
> On Wed, Mar 7, 2012 at 12:21 PM, Rejish Rajagopala
> <rejish.rajagopala@sasken.com> wrote:
>> Hi Maxin,
>> 
>> Thanks for your reply.
>> 
>> I downloaded busybox and super user apk from android market, But its not working.
> 
> It's a bit difficult to believe as you  are doubting the integrity of
> "Android Market" here :)
> 
>> Even I tried cross compiling busybox with Android tool chain. I used the following script to cross compile it.
> 
> IMHO, cross compiling LTP for any platform isn't really a nice topic
> of discussion in a mailing-list like this.
> Your life will be a lot simpler if you try to use the available
> "busybox" package in Android Market itself.
> 
>> #!/bin/sh
>> # Build Busybox against Android's bionic
>> # Originally by Dan Fandrich
>> #
>> # Configure with android_defconfig
>> # This file has been tested on Android Froyo (the lack of ttyname_r in
>> # the must be patched around) and Gingerbread.
>> 
>> # Point this to the Android root directory; it's used in the defconfig CFLAGS
>> export A="/u/android-ndk-r5b"
>> 
>> # Android product being built
>> P=android-3
>> 
>> # Toolchain version in use by this version of Android
>> GCCVER=4.4.0
>> 
>> export PATH="$A/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi-$GCCVER:$PATH"
>> 
>> # Set the linker flags; compiler flags are in the defconfig file
>> if grep "^CONFIG_STATIC=y" .config >/dev/null ; then
>>       # Static linking
>>       LDFLAGS="-static -Xlinker -z -Xlinker muldefs -nostdlib $A/platforms/$P/arch-arm/usr/lib/crtbegin_static.o $A/platforms/$P/arch-arm/usr/lib/crtend_android.o -L$A/platforms/$P/arch-arm/usr/lib -L$A/platforms/$P/arch-arm/usr/lib/libm.so -L$A/platforms/$P/arch-arm/usr/lib/libc.so"
>>       LDLIBS="m c gcc"
>> else
>>       # Dynamic linking
>>       LDFLAGS="-Xlinker -z -Xlinker muldefs -nostdlib -Bdynamic -Xlinker -Xlinker -dynamic-linker -Xlinker /system/bin/linker -Xlinker -z -Xlinker nocopyreloc -#Xlinker --no-undefined $A/platforms/$P/arch-arm/usr/lib/crtbegin_dynamic.o $A/platforms/$P/arch-arm/usr/lib/crtend_android.o -L$A/platforms/$P/arch-arm/usr/lib/"
>>       LDLIBS="dl m c gcc"
>> fi
>> 
>> make EXTRA_LDFLAGS="$LDFLAGS" LDLIBS="$LDLIBS" "$@"
>> 
>> In the above script am facing some issue with linkers
>> [ LDFLAGS="-Xlinker -z -Xlinker muldefs -nostdlib -Bdynamic -Xlinker -T$A/build/core/armelf.x -Xlinker -dynamic-linker -Xlinker /system/bin/linker -Xlinker -z -Xlinker nocopyreloc -Xlinker --no-undefined $A/out/target/product/$P/obj/lib/crtbegin_dynamic.o $A/out/target/product/$P/obj/lib/crtend_android.o -L$A/out/target/product/$P/obj/lib" ]
>> 
>> That is am not able to set linker properly and so system is failing to recognize it. Can you please look into and suggest me what to do.
> 
> Hmm.. The Android toolchain (Android NDK) wasn't really a "developer
> friendly" one and it still keep that status. The procedure and helper
> scripts doesn't work nice with every NDK releases.  Just start with a
> simple hello world program and then proceed to something complex like
> LTP.
> 
>> Thanks & Regards,
>> Rejish
> 
> Warm Regards,
> Maxin B. John
> ________________________________________
>> From: Maxin B John [maxin.john@gmail.com]
>> Sent: Tuesday, March 06, 2012 5:27 PM
>> To: Rejish Rajagopala
>> Cc: Cyril Hrubis; ltp-list@lists.sourceforge.net
>> Subject: Re: [LTP] Need help in cross compiling LTP for android
>> 
>> Hi,
>> 
>> On Mon, Mar 5, 2012 at 6:25 AM, Rejish Rajagopala
>> <rejish.rajagopala@sasken.com> wrote:
>>> Hi Cyril,
>>> Thanks for your input.
>>> I have one more doubt that is if I want to check whether my LTP has been cross compiled properly then how can I confirm that without running the LTP in android phone.
>> 
>> You can copy any one of the cross compiled binaries in LTP (eg:
>> testcases/kernel/syscalls/open/open01) to Android device and execute
>> it there.
>> It is better to have "busybox" ready in your Android device to run LTP
>> properly.  If you finds it difficult to cross-compile "Busybox", it is
>> available in Android Market also.
>> 
>>> Thanks & Regards,
>>> Rejish
>> 
>> Warm Regards,
>> Maxin B. John
>> ________________________________________
>>> From: Cyril Hrubis [chrubis@suse.cz]
>>> Sent: Friday, March 02, 2012 6:28 PM
>>> To: Rejish Rajagopala
>>> Cc: ltp-list@lists.sourceforge.net
>>> Subject: Re: [LTP] Need help in cross compiling LTP for android
>>> 
>>> Hi!
>>>> + LOGFILE_NAME=2012_Mar_02-14h_25m_52s
>>>> + LOGFILE=-l /data/ltp/make_2802_02_2012/results/LTP_RUN_ON-2012_Mar_02-14h_25m_52s.log
>>>> + ALT_DIR_RES=1
>>>> + PRETTY_PRT= -p
>>>> + [ !  ]
>>>> + ALT_DIR_OUT=1
>>>> + [ !  ]
>>>> + [ ! -l /data/ltp/make_2802_02_2012/results/LTP_RUN_ON-2012_Mar_02-14h_25m_52s.log ]
>>>> + basename 2012_Mar_02-14h_25m_52s
>>>> + FAILED_FILE_NAME=2012_Mar_02-14h_25m_52s
>>>> + FAILCMDFILE=-C /data/ltp/make_2802_02_2012/output/LTP_RUN_ON-2012_Mar_02-14h_25m_52s.failed
>>>> + [ 0 -eq 1 ]
>>>> + [ 1 -eq 1 ]
>>>> + [ ! -d /data/ltp/make_2802_02_2012/output ]
>>>> + [ 1 -eq 1 ]
>>>> + echo INFO: creating /data/ltp/make_2802_02_2012/results directory
>>>> INFO: creating /data/ltp/make_2802_02_2012/results directory
>>>> + [ ! -d /data/ltp/make_2802_02_2012/results ]
>>>> + mkdir -m 777 -p /data/ltp/make_2802_02_2012/tmp
>>>> mkdir failed for -m, File exists
>>>> + echo FATAL: Unable to make temporary directory /data/ltp/make_2802_02_2012/tmp
>>>> FATAL: Unable to make temporary directory /data/ltp/make_2802_02_2012/tmp
>>> 
>>> Hmm, this is strange, mkdir -p must not fail with 'File exists'.
>>> 
>>>> + export TMPTEMPLATE=/data/ltp/make_2802_02_2012/tmp/ltp-XXXXXXXXXX
>>>> + mktemp -d /data/ltp/make_2802_02_2012/tmp/ltp-XXXXXXXXXX
>>>> + TMP=/data/ltp/make_2802_02_2012/tmp/ltp-hYXbVD3460
>>>> + export TMP
>>>> + export TMPDIR=/data/ltp/make_2802_02_2012/tmp/ltp-hYXbVD3460
>>>> + chmod 777 /data/ltp/make_2802_02_2012/tmp/ltp-hYXbVD3460
>>>> + cd /data/ltp/make_2802_02_2012/tmp/ltp-hYXbVD3460
>>>> + [ -n  ]
>>>> + [ 0 -eq 1 ]
>>>> + [ -z  ]
>>>> + [ -z  ]
>>>> + cat
>>>> + + cat /data/ltp/make_2802_02_2012/scenario_groups/default
>>>> tr \012
>>> 
>>> ...
>>> 
>>>> + rm -f /data/ltp/make_2802_02_2012/tmp/ltp-hYXbVD3460/cat_ok.3443
>>>> rm failed for -f, No such file or directory
>>> 
>>> And this is even much more wrong.
>>> 
>>> I'm not familiar with android but this sugests that you have very
>>> crippled busybox or whatever is installed there to provide basic
>>> commands like rm, mkdir and so.
>>> 
>>> --
>>> Cyril Hrubis
>>> chrubis@suse.cz
>>> 
>>> SASKEN BUSINESS DISCLAIMER: This message may contain confidential, proprietary or legally privileged information. In case you are not the original intended Recipient of the message, you must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message and you are requested to delete it and inform the sender. Any views expressed in this message are those of the individual sender unless otherwise stated. Nothing contained in this message shall be construed as an offer or acceptance of any offer by Sasken Communication Technologies Limited ("Sasken") unless sent with that express intent and with due authority of Sasken. Sasken has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email.
>>> Read Disclaimer at http://www.sasken.com/extras/mail_disclaimer.html
>>> 
>>> ------------------------------------------------------------------------------
>>> Keep Your Developer Skills Current with LearnDevNow!
>>> The most comprehensive online learning library for Microsoft developers
>>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>>> Metro Style Apps, more. Free future releases when you subscribe now!
>>> http://p.sf.net/sfu/learndevnow-d2d
>>> _______________________________________________
>>> Ltp-list mailing list
>>> Ltp-list@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/ltp-list
> 
> ------------------------------------------------------------------------------
> Better than sec? Nothing is better than sec when it comes to
> monitoring Big Data applications. Try Boundary one-second 
> resolution app monitoring today. Free.
> http://p.sf.net/sfu/Boundary-dev2dev
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2012-04-11  9:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28  9:56 [LTP] Need help in cross compiling LTP for android rejish
2012-02-29 16:22 ` Cyril Hrubis
     [not found]   ` <6F91E0FFDA542149961F7BDED2D2B94B549365C4B6@EXGMBX01.sasken.com>
2012-03-02 12:58     ` Cyril Hrubis
     [not found]       ` <6F91E0FFDA542149961F7BDED2D2B94B549F7328E7@EXGMBX01.sasken.com>
     [not found]         ` <CAMhs6YzaQ_1gKqCskOX1F8db-nKg=P_Zsy-FgHYnhczDvm9UhQ@mail.gmail.com>
     [not found]           ` <6F91E0FFDA542149961F7BDED2D2B94B56372F8DCD@EXGMBX01.sasken.com>
     [not found]             ` <CAMhs6Yyv_-v_TWKpVxv6tVeyg=jnH_VDZpaOQYnkZxF5C-O2fQ@mail.gmail.com>
     [not found]               ` <6F91E0FFDA542149961F7BDED2D2B94B56372F8DEA@EXGMBX01.sasken.com>
2012-04-11  9:23                 ` Garrett Cooper [this message]
2012-04-11  9:28                   ` Rejish Rajagopala
2012-05-02 12:07                     ` Cyril Hrubis
2014-05-29 11:21                       ` meena

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3319EDD9-0FB3-4DB6-9251-ACFC01032122@gmail.com \
    --to=yanegomi@gmail.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=rejish.rajagopala@sasken.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox