Hello Will,

Thank you for your reply.

 

Please find my comments below in yellow highlitgh.

 

> On 07/30/2013 05:24 AM, Florian Girault wrote:

> > PS:

> >

> > Here is the error during binutil compilation:

> >

> >          else true; fi

> > gcc -c -DHAVE_CONFIG_H -g -O2  -I. -I./../include  -W -Wall

> > -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic 

> > ./strncmp.c -o strncmp.o

Hmm, this gcc looks like the host GCC. Are you trying to cross-compile, or building natively?

@fg: I am trying to cross-compile, this is why I set --target=arm-linux during ./configure

 

> > ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o

> > ./xstrerror.o ./xstrndup.o  ./setproctitle.o ./strncmp.o

> > /bin/bash: arm-linux-ar: command not found

Ok, so this is a problem with your tools installation. Where did you get your toolchain from, is it on your $PATH and what is the full name of your gcc executable (including the triplet)?

@fg: actually I dumbly followed the guide here:

http://www.cnx-software.com/2010/03/25/profiling-in-embedded-systems-with-o-profile/

I think that what I would really like todo is compile with the android toolchain, so during one of my trys this I put the {android}/prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.6/bin/

in my path, and tried to do:

./configure --target=arm-linux-androideabi --host=arm-linux-androideabi, but I had a similar error on arm-linux-androideabi-ar.

But I think the arm-linux-androideabi-ar exists in the android source tree (I can't verify right now, but I just realized that using linux-x86 might not be good if there is a x64 folder since I'm on 64bit ubuntu. I will have to check).

Would you happen to know what environment variables I need to set/command I need to run to make sure that the android toolchain and libraries are used during the build?

Something like 

export LIBS=path/to/lib/folder/in/android/source/tree

export CCTOOLCHAIN=path/to/gcc/toolchain/in/android/tree

etc…?

 

 

> >

> > But actually host "linux" wasn't recognized, so I set arm-linux instead...

The host/build/target options will need triplets that match both your cross toolchain *and* hit the relevant entries in your gnuconfig files iirc (config.guess, config.sub).

@fg:hmmm I'm not sure to understand (Basically I am quite a beginner with automake)… Where can I find these files? Should I edit them?

 

 

 

 

 

 

 

 

-----Original Message-----
From: Will Deacon [mailto:will.deacon@arm.com]
Sent: Friday, August 02, 2013 6:50 PM
To: Maynard Johnson
Cc: ジロー フローラン; 'oprofile-list@lists.sf.net'
Subject: Re: Latest Oprofile on Android

 

On Thu, Aug 01, 2013 at 03:07:53PM +0100, Maynard Johnson wrote:

> Will, would you be able to help Florian?

 

Sure.

 

> On 07/30/2013 05:24 AM, Florian Girault wrote:

> > PS:

> >

> > Here is the error during binutil compilation:

> >

> >          else true; fi

> > gcc -c -DHAVE_CONFIG_H -g -O2  -I. -I./../include  -W -Wall

> > -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic 

> > ./strncmp.c -o strncmp.o

 

Hmm, this gcc looks like the host GCC. Are you trying to cross-compile, or building natively?

 

> > rm -f ./libiberty.a pic/./libiberty.a arm-linux-ar rc ./libiberty.a

> > \

> >            ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o ./sha1.o

> > ./alloca.o ./argv.o ./choose-temp.o ./concat.o ./cp-demint.o

> > ./crc32.o ./dyn-string.o ./fdmatch.o ./fibheap.o ./filename_cmp.o

> > ./floatformat.o ./fnmatch.o ./fopen_unlocked.o ./getopt.o

> > ./getopt1.o ./getpwd.o ./getruntime.o ./hashtab.o ./hex.o

> > ./lbasename.o ./lrealpath.o ./make-relative-prefix.o

> > ./make-temp-file.o ./objalloc.o ./obstack.o ./partition.o

> > ./pexecute.o ./physmem.o ./pex-common.o ./pex-one.o ./pex-unix.o

> > ./safe-ctype.o ./simple-object.o ./simple-object-coff.o

> > ./simple-object-elf.o ./simple-object-mach-o.o ./sort.o ./spaces.o

> > ./splay-tree.o ./strerror.o ./strsignal.o ./unlink-if-ordinary.o

> > ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o

> > ./xstrerror.o ./xstrndup.o  ./setproctitle.o ./strncmp.o

> > /bin/bash: arm-linux-ar: command not found

 

Ok, so this is a problem with your tools installation. Where did you get your toolchain from, is it on your $PATH and what is the full name of your gcc executable (including the triplet)?

 

> > make[2]: *** [libiberty.a] Error 127

> > make[2]: Leaving directory `/home/user/src/binutils-2.21.51.0.5/libiberty'

> > make[1]: *** [all-libiberty] Error 2

> > make[1]: Leaving directory `/home/user/src/binutils-2.21.51.0.5'

> > make: *** [all] Error 2

> > user@ubuntu:~/src/binutils-2.21.51.0.5$

> >

> > In the guide it was written:

> > ./configure --target=arm-linux --host= linux --build=i686

> > --without-gettext --without-intl --prefix=$SRCBLD/lib

> >

> > But actually host "linux" wasn't recognized, so I set arm-linux instead...

 

The host/build/target options will need triplets that match both your cross toolchain *and* hit the relevant entries in your gnuconfig files iirc (config.guess, config.sub).

 

Will