Flexible I/O Tester development
 help / color / mirror / Atom feed
* problem FIO compiling for Android
       [not found] <CACTzACVkfEmHrCTJExxOpPqD7tZLMbmW7n3pJza-g87sZaaK1g@mail.gmail.com>
@ 2013-02-11 16:13 ` David N
  2013-02-11 17:25   ` Jens Axboe
  0 siblings, 1 reply; 13+ messages in thread
From: David N @ 2013-02-11 16:13 UTC (permalink / raw)
  To: fio

Hello Everyone,

I've been trying to compile FIO for Android but keep getting error
bellow. Can anybody give me any guidance please?

I very much appreciate!

David


david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
UNAME=Android CROSS_COMPILE=$CCOMPILER
    CC init.o
init.c: In function �free_shm�:
init.c:224:18: error: storage size of �sbuf� isn�t known
init.c:233:3: warning: implicit declaration of function �shmdt�
[-Wimplicit-function-declaration]
init.c:234:3: warning: implicit declaration of function �shmctl�
[-Wimplicit-function-declaration]
init.c:224:18: warning: unused variable �sbuf� [-Wunused-variable]
init.c: In function �setup_thread_area�:
init.c:263:3: warning: implicit declaration of function �shmget�
[-Wimplicit-function-declaration]
init.c:277:2: warning: implicit declaration of function �shmat�
[-Wimplicit-function-declaration]
init.c:277:10: warning: assignment makes pointer from integer without
a cast [enabled by default]
make: *** [init.o] Error 1

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: problem FIO compiling for Android
  2013-02-11 16:13 ` problem FIO compiling for Android David N
@ 2013-02-11 17:25   ` Jens Axboe
  2013-02-12  1:53     ` Aaron Carroll
  0 siblings, 1 reply; 13+ messages in thread
From: Jens Axboe @ 2013-02-11 17:25 UTC (permalink / raw)
  To: David N; +Cc: fio, aaronc

On Mon, Feb 11 2013, David N wrote:
> Hello Everyone,
> 
> I've been trying to compile FIO for Android but keep getting error
> bellow. Can anybody give me any guidance please?
> 
> I very much appreciate!
> 
> David
> 
> 
> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
> UNAME=Android CROSS_COMPILE=$CCOMPILER
>     CC init.o
> init.c: In function ‘free_shm’:
> init.c:224:18: error: storage size of ‘sbuf’ isn’t known
> init.c:233:3: warning: implicit declaration of function ‘shmdt’
> [-Wimplicit-function-declaration]
> init.c:234:3: warning: implicit declaration of function ‘shmctl’
> [-Wimplicit-function-declaration]
> init.c:224:18: warning: unused variable ‘sbuf’ [-Wunused-variable]
> init.c: In function ‘setup_thread_area’:
> init.c:263:3: warning: implicit declaration of function ‘shmget’
> [-Wimplicit-function-declaration]
> init.c:277:2: warning: implicit declaration of function ‘shmat’
> [-Wimplicit-function-declaration]
> init.c:277:10: warning: assignment makes pointer from integer without
> a cast [enabled by default]
> make: *** [init.o] Error 1

Lets CC in Aaron, who added the port.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: problem FIO compiling for Android
  2013-02-11 17:25   ` Jens Axboe
@ 2013-02-12  1:53     ` Aaron Carroll
  2013-02-12  5:39       ` David N
  2013-02-12  8:57       ` Jens Axboe
  0 siblings, 2 replies; 13+ messages in thread
From: Aaron Carroll @ 2013-02-12  1:53 UTC (permalink / raw)
  To: Jens Axboe; +Cc: David N, fio

[-- Attachment #1: Type: text/plain, Size: 1465 bytes --]

On 12/02/13 4:25 AM, Jens Axboe wrote:
> On Mon, Feb 11 2013, David N wrote:
>> Hello Everyone,
>>
>> I've been trying to compile FIO for Android but keep getting error
>> bellow. Can anybody give me any guidance please?
>>
>> I very much appreciate!
>>
>> David
>>
>>
>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>> UNAME=Android CROSS_COMPILE=$CCOMPILER
>>     CC init.o
>> init.c: In function ‘free_shm’:
>> init.c:224:18: error: storage size of ‘sbuf’ isn’t known
>> init.c:233:3: warning: implicit declaration of function ‘shmdt’
>> [-Wimplicit-function-declaration]
>> init.c:234:3: warning: implicit declaration of function ‘shmctl’
>> [-Wimplicit-function-declaration]
>> init.c:224:18: warning: unused variable ‘sbuf’ [-Wunused-variable]
>> init.c: In function ‘setup_thread_area’:
>> init.c:263:3: warning: implicit declaration of function ‘shmget’
>> [-Wimplicit-function-declaration]
>> init.c:277:2: warning: implicit declaration of function ‘shmat’
>> [-Wimplicit-function-declaration]
>> init.c:277:10: warning: assignment makes pointer from integer without
>> a cast [enabled by default]
>> make: *** [init.o] Error 1
> 
> Lets CC in Aaron, who added the port.

The switch to configure broke Android.  I got a very minimal build
working with the attached patch and:

  make
cross_prefix=~/dev/android-toolchain-r8c/bin/arm-linux-androideabi-
UNAME=Android


Hope that helps,
  -- Aaron


[-- Attachment #2: fio-android-configure.patch --]
[-- Type: text/plain, Size: 1557 bytes --]

diff --git a/Makefile b/Makefile
index 8a7410a..bb345ed 100644
--- a/Makefile
+++ b/Makefile
@@ -90,7 +90,6 @@ ifeq ($(UNAME), Android)
   SOURCE += diskutil.c fifo.c blktrace.c trim.c profiles/tiobench.c
   LIBS += -ldl
   LDFLAGS += -rdynamic
-  CPPFLAGS += -DFIO_NO_HAVE_SHM_H
 endif
 ifeq ($(UNAME), SunOS)
   LIBS	 += -lpthread -ldl -laio -lrt -lnsl -lsocket
diff --git a/configure b/configure
index 87cc1cf..8267e1c 100755
--- a/configure
+++ b/configure
@@ -161,7 +161,9 @@ if test "$show_help" = "yes" ; then
   exit $exit_val
 fi
 
-if check_define __linux__ ; then
+if check_define __ANDROID__ ; then
+  targetos="Android"
+elif check_define __linux__ ; then
   targetos="Linux"
 elif check_define __OpenBSD__ ; then
   targetos='OpenBSD'
@@ -222,6 +224,15 @@ CYGWIN*)
   echo "CC=$CC" >> $config_host_mak
   echo "EXTFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
   exit 0
+  ;;
+Android)
+  output_sym "CONFIG_32BIT"
+  output_sym "CONFIG_SOCKLEN_T"
+  output_sym "CONFIG_GETTIMEOFDAY"
+  output_sym "CONFIG_CLOCK_GETTIME"
+  echo "CC=$cc" >> $config_host_mak
+  echo "EXTFLAGS=$CFLAGS -include config-host.h -DFIO_NO_HAVE_SHM_H -D_GNU_SOURCE" >> $config_host_mak
+  exit 0
 esac
 
 if test ! -z "$cpu" ; then
diff --git a/os/os-android.h b/os/os-android.h
index e436f8f..cedfdaf 100644
--- a/os/os-android.h
+++ b/os/os-android.h
@@ -30,6 +30,7 @@
 #define FIO_USE_GENERIC_INIT_RANDOM_STATE
 #define FIO_HAVE_E4_ENG
 #define FIO_HAVE_BYTEORDER_FUNCS
+#define FIO_HAVE_MMAP_HUGE
 
 #define OS_MAP_ANON		MAP_ANONYMOUS
 

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: problem FIO compiling for Android
  2013-02-12  1:53     ` Aaron Carroll
@ 2013-02-12  5:39       ` David N
  2013-02-12  5:58         ` Aaron Carroll
  2013-02-12  8:57       ` Jens Axboe
  1 sibling, 1 reply; 13+ messages in thread
From: David N @ 2013-02-12  5:39 UTC (permalink / raw)
  To: Aaron Carroll; +Cc: fio

Hi Aaron,

Thanks much for your help. I still get following errors. Do you have
any idea where the problem can be?

david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
cross_prefix=~/development/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin
UNAME=Android
FIO_VERSION = fio-2.0.13
    DEP .depend
    CC gettime.o
    CC fio.o
    CC ioengines.o
    CC init.o
    CC stat.o
    CC log.o
    CC time.o
    CC filesetup.o
    CC eta.o
    CC verify.o
    CC memory.o
    CC io_u.o
    CC parse.o
    CC mutex.o
    CC options.o
    CC rbtree.o
    CC smalloc.o
    CC filehash.o
    CC profile.o
    CC debug.o
    CC lib/rand.o
    CC lib/num2str.o
    CC lib/ieee754.o
    CC crc/crc16.o
    CC crc/crc32.o
    CC crc/crc32c.o
    CC crc/crc32c-intel.o
    CC crc/crc64.o
    CC crc/crc7.o
    CC crc/md5.o
    CC crc/sha1.o
    CC crc/sha256.o
    CC crc/sha512.o
    CC engines/cpu.o
    CC engines/mmap.o
    CC engines/sync.o
    CC engines/null.o
    CC engines/net.o
    CC memalign.o
    CC server.o
    CC client.o
    CC iolog.o
    CC backend.o
    CC libfio.o
    CC flow.o
    CC json.o
    CC lib/zipf.o
    CC lib/axmap.o
    CC lib/lfsr.o
    CC gettime-thread.o
    CC diskutil.o
    CC fifo.o
    CC blktrace.o
    CC trim.o
    CC profiles/tiobench.o
    CC fio
verify.o: In function `verify_async_init':
/home/david/development/android/external/fio-2.0.13/verify.c:1091:
undefined reference to `pthread_attr_setstacksize'
/home/david/development/android/external/fio-2.0.13/verify.c:1104:
undefined reference to `pthread_detach'
/home/david/development/android/external/fio-2.0.13/verify.c:1097:
undefined reference to `pthread_create'
gettime.o: In function `fio_gettime':
/home/david/development/android/external/fio-2.0.13/gettime.c:152:
undefined reference to `pthread_getspecific'
gettime.o: In function `fio_local_clock_init':
/home/david/development/android/external/fio-2.0.13/gettime.c:295:
undefined reference to `pthread_setspecific'
gettime.o: In function `fio_clock_init':
/home/david/development/android/external/fio-2.0.13/gettime.c:309:
undefined reference to `pthread_key_create'
gettime.o: In function `fio_monotonic_clocktest':
/home/david/development/android/external/fio-2.0.13/gettime.c:492:
undefined reference to `pthread_create'
/home/david/development/android/external/fio-2.0.13/gettime.c:511:
undefined reference to `pthread_join'
stat.o: In function `show_running_run_stats':
/home/david/development/android/external/fio-2.0.13/stat.c:1388:
undefined reference to `pthread_create'
/home/david/development/android/external/fio-2.0.13/stat.c:1389:
undefined reference to `pthread_detach'
mutex.o: In function `fio_mutex_init':
/home/david/development/android/external/fio-2.0.13/mutex.c:44:
undefined reference to `pthread_mutexattr_init'
/home/david/development/android/external/fio-2.0.13/mutex.c:54:
undefined reference to `pthread_mutexattr_setpshared'
/home/david/development/android/external/fio-2.0.13/mutex.c:63:
undefined reference to `pthread_condattr_setpshared'
/home/david/development/android/external/fio-2.0.13/mutex.c:74:
undefined reference to `pthread_mutexattr_destroy'
backend.o: In function `thread_main':
/home/david/development/android/external/fio-2.0.13/backend.c:1299:
undefined reference to `cgroup_shutdown'
/home/david/development/android/external/fio-2.0.13/backend.c:1142:
undefined reference to `cgroup_setup'
backend.o: In function `run_threads':
/home/david/development/android/external/fio-2.0.13/backend.c:1568:
undefined reference to `pthread_create'
/home/david/development/android/external/fio-2.0.13/backend.c:1576:
undefined reference to `pthread_detach'
backend.o: In function `create_disk_util_thread':
/home/david/development/android/external/fio-2.0.13/backend.c:1724:
undefined reference to `pthread_create'
/home/david/development/android/external/fio-2.0.13/backend.c:1731:
undefined reference to `pthread_detach'
backend.o: In function `fio_backend':
/home/david/development/android/external/fio-2.0.13/backend.c:1794:
undefined reference to `cgroup_kill'
gettime-thread.o: In function `fio_start_gtod_thread':
/home/david/development/android/external/fio-2.0.13/gettime-thread.c:56:
undefined reference to `pthread_attr_setstacksize'
/home/david/development/android/external/fio-2.0.13/gettime-thread.c:57:
undefined reference to `pthread_create'
/home/david/development/android/external/fio-2.0.13/gettime-thread.c:64:
undefined reference to `pthread_detach'
collect2: ld returned 1 exit status
make: *** [fio] Error 1
david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ ~~


On Mon, Feb 11, 2013 at 8:53 PM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
> On 12/02/13 4:25 AM, Jens Axboe wrote:
>> On Mon, Feb 11 2013, David N wrote:
>>> Hello Everyone,
>>>
>>> I've been trying to compile FIO for Android but keep getting error
>>> bellow. Can anybody give me any guidance please?
>>>
>>> I very much appreciate!
>>>
>>> David
>>>
>>>
>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>>> UNAME=Android CROSS_COMPILE=$CCOMPILER
>>>     CC init.o
>>> init.c: In function �free_shm�:
>>> init.c:224:18: error: storage size of �sbuf� isn�t known
>>> init.c:233:3: warning: implicit declaration of function �shmdt�
>>> [-Wimplicit-function-declaration]
>>> init.c:234:3: warning: implicit declaration of function �shmctl�
>>> [-Wimplicit-function-declaration]
>>> init.c:224:18: warning: unused variable �sbuf� [-Wunused-variable]
>>> init.c: In function �setup_thread_area�:
>>> init.c:263:3: warning: implicit declaration of function �shmget�
>>> [-Wimplicit-function-declaration]
>>> init.c:277:2: warning: implicit declaration of function �shmat�
>>> [-Wimplicit-function-declaration]
>>> init.c:277:10: warning: assignment makes pointer from integer without
>>> a cast [enabled by default]
>>> make: *** [init.o] Error 1
>>
>> Lets CC in Aaron, who added the port.
>
> The switch to configure broke Android.  I got a very minimal build
> working with the attached patch and:
>
>   make
> cross_prefix=~/dev/android-toolchain-r8c/bin/arm-linux-androideabi-
> UNAME=Android
>
>
> Hope that helps,
>   -- Aaron
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: problem FIO compiling for Android
  2013-02-12  5:39       ` David N
@ 2013-02-12  5:58         ` Aaron Carroll
  2013-02-12  6:20           ` David N
  0 siblings, 1 reply; 13+ messages in thread
From: Aaron Carroll @ 2013-02-12  5:58 UTC (permalink / raw)
  To: David N; +Cc: fio

David,

On 12/02/13 4:39 PM, David N wrote:
> Thanks much for your help. I still get following errors. Do you have
> any idea where the problem can be?

I've not seen that problem before.  I wonder if adding -lpthread to the
linker flags might fix it?

Try adding "V=1" to the make arguments and post the failing command.



   -- Aaron


> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
> cross_prefix=~/development/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin
> UNAME=Android
> FIO_VERSION = fio-2.0.132
>     DEP .depend
>     CC gettime.o
>     CC fio.o
>     CC ioengines.o
>     CC init.o
>     CC stat.o
>     CC log.o
>     CC time.o
>     CC filesetup.o
>     CC eta.o
>     CC verify.o
>     CC memory.o
>     CC io_u.o
>     CC parse.o
>     CC mutex.o
>     CC options.o
>     CC rbtree.o
>     CC smalloc.o
>     CC filehash.o
>     CC profile.o
>     CC debug.o
>     CC lib/rand.o
>     CC lib/num2str.o
>     CC lib/ieee754.o
>     CC crc/crc16.o
>     CC crc/crc32.o
>     CC crc/crc32c.o
>     CC crc/crc32c-intel.o
>     CC crc/crc64.o
>     CC crc/crc7.o
>     CC crc/md5.o
>     CC crc/sha1.o
>     CC crc/sha256.o
>     CC crc/sha512.o
>     CC engines/cpu.o
>     CC engines/mmap.o
>     CC engines/sync.o
>     CC engines/null.o
>     CC engines/net.o
>     CC memalign.o
>     CC server.o
>     CC client.o
>     CC iolog.o
>     CC backend.o
>     CC libfio.o
>     CC flow.o
>     CC json.o
>     CC lib/zipf.o
>     CC lib/axmap.o
>     CC lib/lfsr.o
>     CC gettime-thread.o
>     CC diskutil.o
>     CC fifo.o
>     CC blktrace.o
>     CC trim.o
>     CC profiles/tiobench.o
>     CC fio
> verify.o: In function `verify_async_init':
> /home/david/development/android/external/fio-2.0.13/verify.c:1091:
> undefined reference to `pthread_attr_setstacksize'
> /home/david/development/android/external/fio-2.0.13/verify.c:1104:
> undefined reference to `pthread_detach'
> /home/david/development/android/external/fio-2.0.13/verify.c:1097:
> undefined reference to `pthread_create'
> gettime.o: In function `fio_gettime':
> /home/david/development/android/external/fio-2.0.13/gettime.c:152:
> undefined reference to `pthread_getspecific'
> gettime.o: In function `fio_local_clock_init':
> /home/david/development/android/external/fio-2.0.13/gettime.c:295:
> undefined reference to `pthread_setspecific'
> gettime.o: In function `fio_clock_init':
> /home/david/development/android/external/fio-2.0.13/gettime.c:309:
> undefined reference to `pthread_key_create'
> gettime.o: In function `fio_monotonic_clocktest':
> /home/david/development/android/external/fio-2.0.13/gettime.c:492:
> undefined reference to `pthread_create'
> /home/david/development/android/external/fio-2.0.13/gettime.c:511:
> undefined reference to `pthread_join'
> stat.o: In function `show_running_run_stats':
> /home/david/development/android/external/fio-2.0.13/stat.c:1388:
> undefined reference to `pthread_create'
> /home/david/development/android/external/fio-2.0.13/stat.c:1389:
> undefined reference to `pthread_detach'
> mutex.o: In function `fio_mutex_init':
> /home/david/development/android/external/fio-2.0.13/mutex.c:44:
> undefined reference to `pthread_mutexattr_init'
> /home/david/development/android/external/fio-2.0.13/mutex.c:54:
> undefined reference to `pthread_mutexattr_setpshared'
> /home/david/development/android/external/fio-2.0.13/mutex.c:63:
> undefined reference to `pthread_condattr_setpshared'
> /home/david/development/android/external/fio-2.0.13/mutex.c:74:
> undefined reference to `pthread_mutexattr_destroy'
> backend.o: In function `thread_main':
> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
> undefined reference to `cgroup_shutdown'
> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
> undefined reference to `cgroup_setup'
> backend.o: In function `run_threads':
> /home/david/development/android/external/fio-2.0.13/backend.c:1568:
> undefined reference to `pthread_create'
> /home/david/development/android/external/fio-2.0.13/backend.c:1576:
> undefined reference to `pthread_detach'
> backend.o: In function `create_disk_util_thread':
> /home/david/development/android/external/fio-2.0.13/backend.c:1724:
> undefined reference to `pthread_create'
> /home/david/development/android/external/fio-2.0.13/backend.c:1731:
> undefined reference to `pthread_detach'
> backend.o: In function `fio_backend':
> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
> undefined reference to `cgroup_kill'
> gettime-thread.o: In function `fio_start_gtod_thread':
> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:56:
> undefined reference to `pthread_attr_setstacksize'
> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:57:
> undefined reference to `pthread_create'
> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:64:
> undefined reference to `pthread_detach'
> collect2: ld returned 1 exit status
> make: *** [fio] Error 1
> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ ~~
> 
> 
> On Mon, Feb 11, 2013 at 8:53 PM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
>> On 12/02/13 4:25 AM, Jens Axboe wrote:
>>> On Mon, Feb 11 2013, David N wrote:
>>>> Hello Everyone,
>>>>
>>>> I've been trying to compile FIO for Android but keep getting error
>>>> bellow. Can anybody give me any guidance please?
>>>>
>>>> I very much appreciate!
>>>>
>>>> David
>>>>
>>>>
>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>>>> UNAME=Android CROSS_COMPILE=$CCOMPILER
>>>>     CC init.o
>>>> init.c: In function �free_shm�:
>>>> init.c:224:18: error: storage size of �sbuf� isn�t known
>>>> init.c:233:3: warning: implicit declaration of function �shmdt�
>>>> [-Wimplicit-function-declaration]
>>>> init.c:234:3: warning: implicit declaration of function �shmctl�
>>>> [-Wimplicit-function-declaration]
>>>> init.c:224:18: warning: unused variable �sbuf� [-Wunused-variable]
>>>> init.c: In function �setup_thread_area�:
>>>> init.c:263:3: warning: implicit declaration of function �shmget�
>>>> [-Wimplicit-function-declaration]
>>>> init.c:277:2: warning: implicit declaration of function �shmat�
>>>> [-Wimplicit-function-declaration]
>>>> init.c:277:10: warning: assignment makes pointer from integer without
>>>> a cast [enabled by default]
>>>> make: *** [init.o] Error 1
>>>
>>> Lets CC in Aaron, who added the port.
>>
>> The switch to configure broke Android.  I got a very minimal build
>> working with the attached patch and:
>>
>>   make
>> cross_prefix=~/dev/android-toolchain-r8c/bin/arm-linux-androideabi-
>> UNAME=Android
>>
>>
>> Hope that helps,
>>   -- Aaron
>>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: problem FIO compiling for Android
  2013-02-12  5:58         ` Aaron Carroll
@ 2013-02-12  6:20           ` David N
  2013-02-12  6:27             ` Aaron Carroll
  0 siblings, 1 reply; 13+ messages in thread
From: David N @ 2013-02-12  6:20 UTC (permalink / raw)
  To: Aaron Carroll; +Cc: fio

Aaron,

I added -lpthread in the Makefile and most of the errors disappeared.
This is left:

backend.o: In function `thread_main':
/home/david/development/android/external/fio-2.0.13/backend.c:1299:
undefined reference to `cgroup_shutdown'
/home/david/development/android/external/fio-2.0.13/backend.c:1142:
undefined reference to `cgroup_setup'
backend.o: In function `fio_backend':
/home/david/development/android/external/fio-2.0.13/backend.c:1794:
undefined reference to `cgroup_kill'
collect2: ld returned 1 exit status
make: *** [fio] Error 1


On Tue, Feb 12, 2013 at 12:58 AM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
> David,
>
> On 12/02/13 4:39 PM, David N wrote:
>> Thanks much for your help. I still get following errors. Do you have
>> any idea where the problem can be?
>
> I've not seen that problem before.  I wonder if adding -lpthread to the
> linker flags might fix it?
>
> Try adding "V=1" to the make arguments and post the failing command.
>
>
>
>    -- Aaron
>
>
>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>> cross_prefix=~/development/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin
>> UNAME=Android
>> FIO_VERSION = fio-2.0.132
>>     DEP .depend
>>     CC gettime.o
>>     CC fio.o
>>     CC ioengines.o
>>     CC init.o
>>     CC stat.o
>>     CC log.o
>>     CC time.o
>>     CC filesetup.o
>>     CC eta.o
>>     CC verify.o
>>     CC memory.o
>>     CC io_u.o
>>     CC parse.o
>>     CC mutex.o
>>     CC options.o
>>     CC rbtree.o
>>     CC smalloc.o
>>     CC filehash.o
>>     CC profile.o
>>     CC debug.o
>>     CC lib/rand.o
>>     CC lib/num2str.o
>>     CC lib/ieee754.o
>>     CC crc/crc16.o
>>     CC crc/crc32.o
>>     CC crc/crc32c.o
>>     CC crc/crc32c-intel.o
>>     CC crc/crc64.o
>>     CC crc/crc7.o
>>     CC crc/md5.o
>>     CC crc/sha1.o
>>     CC crc/sha256.o
>>     CC crc/sha512.o
>>     CC engines/cpu.o
>>     CC engines/mmap.o
>>     CC engines/sync.o
>>     CC engines/null.o
>>     CC engines/net.o
>>     CC memalign.o
>>     CC server.o
>>     CC client.o
>>     CC iolog.o
>>     CC backend.o
>>     CC libfio.o
>>     CC flow.o
>>     CC json.o
>>     CC lib/zipf.o
>>     CC lib/axmap.o
>>     CC lib/lfsr.o
>>     CC gettime-thread.o
>>     CC diskutil.o
>>     CC fifo.o
>>     CC blktrace.o
>>     CC trim.o
>>     CC profiles/tiobench.o
>>     CC fio
>> verify.o: In function `verify_async_init':
>> /home/david/development/android/external/fio-2.0.13/verify.c:1091:
>> undefined reference to `pthread_attr_setstacksize'
>> /home/david/development/android/external/fio-2.0.13/verify.c:1104:
>> undefined reference to `pthread_detach'
>> /home/david/development/android/external/fio-2.0.13/verify.c:1097:
>> undefined reference to `pthread_create'
>> gettime.o: In function `fio_gettime':
>> /home/david/development/android/external/fio-2.0.13/gettime.c:152:
>> undefined reference to `pthread_getspecific'
>> gettime.o: In function `fio_local_clock_init':
>> /home/david/development/android/external/fio-2.0.13/gettime.c:295:
>> undefined reference to `pthread_setspecific'
>> gettime.o: In function `fio_clock_init':
>> /home/david/development/android/external/fio-2.0.13/gettime.c:309:
>> undefined reference to `pthread_key_create'
>> gettime.o: In function `fio_monotonic_clocktest':
>> /home/david/development/android/external/fio-2.0.13/gettime.c:492:
>> undefined reference to `pthread_create'
>> /home/david/development/android/external/fio-2.0.13/gettime.c:511:
>> undefined reference to `pthread_join'
>> stat.o: In function `show_running_run_stats':
>> /home/david/development/android/external/fio-2.0.13/stat.c:1388:
>> undefined reference to `pthread_create'
>> /home/david/development/android/external/fio-2.0.13/stat.c:1389:
>> undefined reference to `pthread_detach'
>> mutex.o: In function `fio_mutex_init':
>> /home/david/development/android/external/fio-2.0.13/mutex.c:44:
>> undefined reference to `pthread_mutexattr_init'
>> /home/david/development/android/external/fio-2.0.13/mutex.c:54:
>> undefined reference to `pthread_mutexattr_setpshared'
>> /home/david/development/android/external/fio-2.0.13/mutex.c:63:
>> undefined reference to `pthread_condattr_setpshared'
>> /home/david/development/android/external/fio-2.0.13/mutex.c:74:
>> undefined reference to `pthread_mutexattr_destroy'
>> backend.o: In function `thread_main':
>> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
>> undefined reference to `cgroup_shutdown'
>> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
>> undefined reference to `cgroup_setup'
>> backend.o: In function `run_threads':
>> /home/david/development/android/external/fio-2.0.13/backend.c:1568:
>> undefined reference to `pthread_create'
>> /home/david/development/android/external/fio-2.0.13/backend.c:1576:
>> undefined reference to `pthread_detach'
>> backend.o: In function `create_disk_util_thread':
>> /home/david/development/android/external/fio-2.0.13/backend.c:1724:
>> undefined reference to `pthread_create'
>> /home/david/development/android/external/fio-2.0.13/backend.c:1731:
>> undefined reference to `pthread_detach'
>> backend.o: In function `fio_backend':
>> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
>> undefined reference to `cgroup_kill'
>> gettime-thread.o: In function `fio_start_gtod_thread':
>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:56:
>> undefined reference to `pthread_attr_setstacksize'
>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:57:
>> undefined reference to `pthread_create'
>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:64:
>> undefined reference to `pthread_detach'
>> collect2: ld returned 1 exit status
>> make: *** [fio] Error 1
>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ ~~
>>
>>
>> On Mon, Feb 11, 2013 at 8:53 PM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
>>> On 12/02/13 4:25 AM, Jens Axboe wrote:
>>>> On Mon, Feb 11 2013, David N wrote:
>>>>> Hello Everyone,
>>>>>
>>>>> I've been trying to compile FIO for Android but keep getting error
>>>>> bellow. Can anybody give me any guidance please?
>>>>>
>>>>> I very much appreciate!
>>>>>
>>>>> David
>>>>>
>>>>>
>>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>>>>> UNAME=Android CROSS_COMPILE=$CCOMPILER
>>>>>     CC init.o
>>>>> init.c: In function �free_shm�:
>>>>> init.c:224:18: error: storage size of �sbuf� isn�t known
>>>>> init.c:233:3: warning: implicit declaration of function �shmdt�
>>>>> [-Wimplicit-function-declaration]
>>>>> init.c:234:3: warning: implicit declaration of function �shmctl�
>>>>> [-Wimplicit-function-declaration]
>>>>> init.c:224:18: warning: unused variable �sbuf� [-Wunused-variable]
>>>>> init.c: In function �setup_thread_area�:
>>>>> init.c:263:3: warning: implicit declaration of function �shmget�
>>>>> [-Wimplicit-function-declaration]
>>>>> init.c:277:2: warning: implicit declaration of function �shmat�
>>>>> [-Wimplicit-function-declaration]
>>>>> init.c:277:10: warning: assignment makes pointer from integer without
>>>>> a cast [enabled by default]
>>>>> make: *** [init.o] Error 1
>>>>
>>>> Lets CC in Aaron, who added the port.
>>>
>>> The switch to configure broke Android.  I got a very minimal build
>>> working with the attached patch and:
>>>
>>>   make
>>> cross_prefix=~/dev/android-toolchain-r8c/bin/arm-linux-androideabi-
>>> UNAME=Android
>>>
>>>
>>> Hope that helps,
>>>   -- Aaron
>>>
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: problem FIO compiling for Android
  2013-02-12  6:20           ` David N
@ 2013-02-12  6:27             ` Aaron Carroll
  2013-02-12  6:34               ` David N
  0 siblings, 1 reply; 13+ messages in thread
From: Aaron Carroll @ 2013-02-12  6:27 UTC (permalink / raw)
  To: David N; +Cc: fio

On 12/02/13 5:20 PM, David N wrote:
> Aaron,
> 
> I added -lpthread in the Makefile and most of the errors disappeared.
> This is left:
> 
> backend.o: In function `thread_main':
> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
> undefined reference to `cgroup_shutdown'
> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
> undefined reference to `cgroup_setup'
> backend.o: In function `fio_backend':
> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
> undefined reference to `cgroup_kill'
> collect2: ld returned 1 exit status
> make: *** [fio] Error 1

Somehow FIO_HAVE_CGROUPS got defined... perhaps you need a make clean.
Again, please use V=1 in your make line when posting errors.

Thanks,
  -- Aaron


> 
> 
> On Tue, Feb 12, 2013 at 12:58 AM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
>> David,
>>
>> On 12/02/13 4:39 PM, David N wrote:
>>> Thanks much for your help. I still get following errors. Do you have
>>> any idea where the problem can be?
>>
>> I've not seen that problem before.  I wonder if adding -lpthread to the
>> linker flags might fix it?
>>
>> Try adding "V=1" to the make arguments and post the failing command.
>>
>>
>>
>>    -- Aaron
>>
>>
>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>>> cross_prefix=~/development/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin
>>> UNAME=Android
>>> FIO_VERSION = fio-2.0.132
>>>     DEP .depend
>>>     CC gettime.o
>>>     CC fio.o
>>>     CC ioengines.o
>>>     CC init.o
>>>     CC stat.o
>>>     CC log.o
>>>     CC time.o
>>>     CC filesetup.o
>>>     CC eta.o
>>>     CC verify.o
>>>     CC memory.o
>>>     CC io_u.o
>>>     CC parse.o
>>>     CC mutex.o
>>>     CC options.o
>>>     CC rbtree.o
>>>     CC smalloc.o
>>>     CC filehash.o
>>>     CC profile.o
>>>     CC debug.o
>>>     CC lib/rand.o
>>>     CC lib/num2str.o
>>>     CC lib/ieee754.o
>>>     CC crc/crc16.o
>>>     CC crc/crc32.o
>>>     CC crc/crc32c.o
>>>     CC crc/crc32c-intel.o
>>>     CC crc/crc64.o
>>>     CC crc/crc7.o
>>>     CC crc/md5.o
>>>     CC crc/sha1.o
>>>     CC crc/sha256.o
>>>     CC crc/sha512.o
>>>     CC engines/cpu.o
>>>     CC engines/mmap.o
>>>     CC engines/sync.o
>>>     CC engines/null.o
>>>     CC engines/net.o
>>>     CC memalign.o
>>>     CC server.o
>>>     CC client.o
>>>     CC iolog.o
>>>     CC backend.o
>>>     CC libfio.o
>>>     CC flow.o
>>>     CC json.o
>>>     CC lib/zipf.o
>>>     CC lib/axmap.o
>>>     CC lib/lfsr.o
>>>     CC gettime-thread.o
>>>     CC diskutil.o
>>>     CC fifo.o
>>>     CC blktrace.o
>>>     CC trim.o
>>>     CC profiles/tiobench.o
>>>     CC fio
>>> verify.o: In function `verify_async_init':
>>> /home/david/development/android/external/fio-2.0.13/verify.c:1091:
>>> undefined reference to `pthread_attr_setstacksize'
>>> /home/david/development/android/external/fio-2.0.13/verify.c:1104:
>>> undefined reference to `pthread_detach'
>>> /home/david/development/android/external/fio-2.0.13/verify.c:1097:
>>> undefined reference to `pthread_create'
>>> gettime.o: In function `fio_gettime':
>>> /home/david/development/android/external/fio-2.0.13/gettime.c:152:
>>> undefined reference to `pthread_getspecific'
>>> gettime.o: In function `fio_local_clock_init':
>>> /home/david/development/android/external/fio-2.0.13/gettime.c:295:
>>> undefined reference to `pthread_setspecific'
>>> gettime.o: In function `fio_clock_init':
>>> /home/david/development/android/external/fio-2.0.13/gettime.c:309:
>>> undefined reference to `pthread_key_create'
>>> gettime.o: In function `fio_monotonic_clocktest':
>>> /home/david/development/android/external/fio-2.0.13/gettime.c:492:
>>> undefined reference to `pthread_create'
>>> /home/david/development/android/external/fio-2.0.13/gettime.c:511:
>>> undefined reference to `pthread_join'
>>> stat.o: In function `show_running_run_stats':
>>> /home/david/development/android/external/fio-2.0.13/stat.c:1388:
>>> undefined reference to `pthread_create'
>>> /home/david/development/android/external/fio-2.0.13/stat.c:1389:
>>> undefined reference to `pthread_detach'
>>> mutex.o: In function `fio_mutex_init':
>>> /home/david/development/android/external/fio-2.0.13/mutex.c:44:
>>> undefined reference to `pthread_mutexattr_init'
>>> /home/david/development/android/external/fio-2.0.13/mutex.c:54:
>>> undefined reference to `pthread_mutexattr_setpshared'
>>> /home/david/development/android/external/fio-2.0.13/mutex.c:63:
>>> undefined reference to `pthread_condattr_setpshared'
>>> /home/david/development/android/external/fio-2.0.13/mutex.c:74:
>>> undefined reference to `pthread_mutexattr_destroy'
>>> backend.o: In function `thread_main':
>>> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
>>> undefined reference to `cgroup_shutdown'
>>> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
>>> undefined reference to `cgroup_setup'
>>> backend.o: In function `run_threads':
>>> /home/david/development/android/external/fio-2.0.13/backend.c:1568:
>>> undefined reference to `pthread_create'
>>> /home/david/development/android/external/fio-2.0.13/backend.c:1576:
>>> undefined reference to `pthread_detach'
>>> backend.o: In function `create_disk_util_thread':
>>> /home/david/development/android/external/fio-2.0.13/backend.c:1724:
>>> undefined reference to `pthread_create'
>>> /home/david/development/android/external/fio-2.0.13/backend.c:1731:
>>> undefined reference to `pthread_detach'
>>> backend.o: In function `fio_backend':
>>> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
>>> undefined reference to `cgroup_kill'
>>> gettime-thread.o: In function `fio_start_gtod_thread':
>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:56:
>>> undefined reference to `pthread_attr_setstacksize'
>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:57:
>>> undefined reference to `pthread_create'
>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:64:
>>> undefined reference to `pthread_detach'
>>> collect2: ld returned 1 exit status
>>> make: *** [fio] Error 1
>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ ~~
>>>
>>>
>>> On Mon, Feb 11, 2013 at 8:53 PM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
>>>> On 12/02/13 4:25 AM, Jens Axboe wrote:
>>>>> On Mon, Feb 11 2013, David N wrote:
>>>>>> Hello Everyone,
>>>>>>
>>>>>> I've been trying to compile FIO for Android but keep getting error
>>>>>> bellow. Can anybody give me any guidance please?
>>>>>>
>>>>>> I very much appreciate!
>>>>>>
>>>>>> David
>>>>>>
>>>>>>
>>>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>>>>>> UNAME=Android CROSS_COMPILE=$CCOMPILER
>>>>>>     CC init.o
>>>>>> init.c: In function �free_shm�:
>>>>>> init.c:224:18: error: storage size of �sbuf� isn�t known
>>>>>> init.c:233:3: warning: implicit declaration of function �shmdt�
>>>>>> [-Wimplicit-function-declaration]
>>>>>> init.c:234:3: warning: implicit declaration of function �shmctl�
>>>>>> [-Wimplicit-function-declaration]
>>>>>> init.c:224:18: warning: unused variable �sbuf� [-Wunused-variable]
>>>>>> init.c: In function �setup_thread_area�:
>>>>>> init.c:263:3: warning: implicit declaration of function �shmget�
>>>>>> [-Wimplicit-function-declaration]
>>>>>> init.c:277:2: warning: implicit declaration of function �shmat�
>>>>>> [-Wimplicit-function-declaration]
>>>>>> init.c:277:10: warning: assignment makes pointer from integer without
>>>>>> a cast [enabled by default]
>>>>>> make: *** [init.o] Error 1
>>>>>
>>>>> Lets CC in Aaron, who added the port.
>>>>
>>>> The switch to configure broke Android.  I got a very minimal build
>>>> working with the attached patch and:
>>>>
>>>>   make
>>>> cross_prefix=~/dev/android-toolchain-r8c/bin/arm-linux-androideabi-
>>>> UNAME=Android
>>>>
>>>>
>>>> Hope that helps,
>>>>   -- Aaron
>>>>
>>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: problem FIO compiling for Android
  2013-02-12  6:27             ` Aaron Carroll
@ 2013-02-12  6:34               ` David N
  2013-02-12  6:43                 ` Aaron Carroll
  0 siblings, 1 reply; 13+ messages in thread
From: David N @ 2013-02-12  6:34 UTC (permalink / raw)
  To: Aaron Carroll; +Cc: fio

Here's the output, Aaron. Still the same. Than you!!!

david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make clean
rm -f .depend gettime.o fio.o ioengines.o init.o stat.o log.o time.o
filesetup.o eta.o verify.o memory.o io_u.o parse.o mutex.o options.o
rbtree.o smalloc.o filehash.o profile.o debug.o lib/rand.o
lib/num2str.o lib/ieee754.o crc/crc16.o crc/crc32.o crc/crc32c.o
crc/crc32c-intel.o crc/crc64.o crc/crc7.o crc/md5.o crc/sha1.o
crc/sha256.o crc/sha512.o engines/cpu.o engines/mmap.o engines/sync.o
engines/null.o engines/net.o memalign.o server.o client.o iolog.o
backend.o libfio.o flow.o json.o lib/zipf.o lib/axmap.o lib/lfsr.o
gettime-thread.o diskutil.o fifo.o blktrace.o helpers.o cgroup.o
trim.o engines/libaio.o engines/posixaio.o engines/sg.o
engines/splice.o engines/syslet-rw.o engines/guasi.o engines/binject.o
engines/rdma.o profiles/tiobench.o engines/fusion-aw.o
engines/falloc.o engines/e4defrag.o t/stest.o gettime.o mutex.o
smalloc.o t/log.o t/ieee754.o lib/ieee754.o t/log.o lib/ieee754.o
lib/rand.o lib/zipf.o t/genzipf.o t/axmap.o lib/lfsr.o lib/axmap.o fio
t/stest t/ieee754 t/genzipf t/axmap core.* core FIO-VERSION-FILE
david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
V=1 UNAME=Android
build android
FIO_VERSION = fio-2.0.13
build android
gcc -MM -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG gettime.c
fio.c ioengines.c init.c stat.c log.c time.c filesetup.c eta.c
verify.c memory.c io_u.c parse.c mutex.c options.c rbtree.c smalloc.c
filehash.c profile.c debug.c lib/rand.c lib/num2str.c lib/ieee754.c
crc/crc16.c crc/crc32.c crc/crc32c.c crc/crc32c-intel.c crc/crc64.c
crc/crc7.c crc/md5.c crc/sha1.c crc/sha256.c crc/sha512.c
engines/cpu.c engines/mmap.c engines/sync.c engines/null.c
engines/net.c memalign.c server.c client.c iolog.c backend.c libfio.c
flow.c json.c lib/zipf.c lib/axmap.c lib/lfsr.c gettime-thread.c
diskutil.c fifo.c blktrace.c trim.c profiles/tiobench.c 1> .depend
gcc -o gettime.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG gettime.c
gcc -o fio.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG fio.c
gcc -o ioengines.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG ioengines.c
gcc -o init.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c init.c
gcc -o stat.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG stat.c
gcc -o log.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG log.c
gcc -o time.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG time.c
gcc -o filesetup.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG filesetup.c
gcc -o eta.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG eta.c
gcc -o verify.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
 -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG verify.c
gcc -o memory.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
 -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG memory.c
gcc -o io_u.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG io_u.c
gcc -o parse.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG parse.c
gcc -o mutex.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG mutex.c
gcc -o options.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG options.c
gcc -o rbtree.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
 -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG rbtree.c
gcc -o smalloc.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG smalloc.c
gcc -o filehash.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG filehash.c
gcc -o profile.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG profile.c
gcc -o debug.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG debug.c
gcc -o lib/rand.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG lib/rand.c
gcc -o lib/num2str.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG lib/num2str.c
gcc -o lib/ieee754.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG lib/ieee754.c
gcc -o crc/crc16.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/crc16.c
gcc -o crc/crc32.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/crc32.c
gcc -o crc/crc32c.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/crc32c.c
gcc -o crc/crc32c-intel.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/crc32c-intel.c
gcc -o crc/crc64.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/crc64.c
gcc -o crc/crc7.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/crc7.c
gcc -o crc/md5.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/md5.c
gcc -o crc/sha1.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/sha1.c
gcc -o crc/sha256.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/sha256.c
gcc -o crc/sha512.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/sha512.c
gcc -o engines/cpu.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG engines/cpu.c
gcc -o engines/mmap.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG engines/mmap.c
gcc -o engines/sync.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG engines/sync.c
gcc -o engines/null.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG engines/null.c
gcc -o engines/net.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG engines/net.c
gcc -o memalign.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG memalign.c
gcc -o server.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
 -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG server.c
gcc -o client.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
 -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG client.c
gcc -o iolog.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG iolog.c
gcc -o backend.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG backend.c
gcc -o libfio.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
 -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG libfio.c
gcc -o flow.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG flow.c
gcc -o json.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG json.c
gcc -o lib/zipf.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG lib/zipf.c
gcc -o lib/axmap.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG lib/axmap.c
gcc -o lib/lfsr.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG lib/lfsr.c
gcc -o gettime-thread.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG gettime-thread.c
gcc -o diskutil.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG diskutil.c
gcc -o fifo.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG fifo.c
gcc -o blktrace.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG blktrace.c
gcc -o trim.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG trim.c
gcc -o profiles/tiobench.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG profiles/tiobench.c
gcc -rdynamic -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -o fio gettime.o fio.o ioengines.o init.o
stat.o log.o time.o filesetup.o eta.o verify.o memory.o io_u.o parse.o
mutex.o options.o rbtree.o smalloc.o filehash.o profile.o debug.o
lib/rand.o lib/num2str.o lib/ieee754.o crc/crc16.o crc/crc32.o
crc/crc32c.o crc/crc32c-intel.o crc/crc64.o crc/crc7.o crc/md5.o
crc/sha1.o crc/sha256.o crc/sha512.o engines/cpu.o engines/mmap.o
engines/sync.o engines/null.o engines/net.o memalign.o server.o
client.o iolog.o backend.o libfio.o flow.o json.o lib/zipf.o
lib/axmap.o lib/lfsr.o gettime-thread.o diskutil.o fifo.o blktrace.o
trim.o profiles/tiobench.o -lm  -ldl -lpthread -lrt -ldl -rdynamic
backend.o: In function `thread_main':
/home/david/development/android/external/fio-2.0.13/backend.c:1299:
undefined reference to `cgroup_shutdown'
/home/david/development/android/external/fio-2.0.13/backend.c:1142:
undefined reference to `cgroup_setup'
backend.o: In function `fio_backend':
/home/david/development/android/external/fio-2.0.13/backend.c:1794:
undefined reference to `cgroup_kill'
collect2: ld returned 1 exit status
make: *** [fio] Error 1
david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$


On Tue, Feb 12, 2013 at 1:27 AM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
> On 12/02/13 5:20 PM, David N wrote:
>> Aaron,
>>
>> I added -lpthread in the Makefile and most of the errors disappeared.
>> This is left:
>>
>> backend.o: In function `thread_main':
>> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
>> undefined reference to `cgroup_shutdown'
>> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
>> undefined reference to `cgroup_setup'
>> backend.o: In function `fio_backend':
>> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
>> undefined reference to `cgroup_kill'
>> collect2: ld returned 1 exit status
>> make: *** [fio] Error 1
>
> Somehow FIO_HAVE_CGROUPS got defined... perhaps you need a make clean.
> Again, please use V=1 in your make line when posting errors.
>
> Thanks,
>   -- Aaron
>
>
>>
>>
>> On Tue, Feb 12, 2013 at 12:58 AM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
>>> David,
>>>
>>> On 12/02/13 4:39 PM, David N wrote:
>>>> Thanks much for your help. I still get following errors. Do you have
>>>> any idea where the problem can be?
>>>
>>> I've not seen that problem before.  I wonder if adding -lpthread to the
>>> linker flags might fix it?
>>>
>>> Try adding "V=1" to the make arguments and post the failing command.
>>>
>>>
>>>
>>>    -- Aaron
>>>
>>>
>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>>>> cross_prefix=~/development/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin
>>>> UNAME=Android
>>>> FIO_VERSION = fio-2.0.132
>>>>     DEP .depend
>>>>     CC gettime.o
>>>>     CC fio.o
>>>>     CC ioengines.o
>>>>     CC init.o
>>>>     CC stat.o
>>>>     CC log.o
>>>>     CC time.o
>>>>     CC filesetup.o
>>>>     CC eta.o
>>>>     CC verify.o
>>>>     CC memory.o
>>>>     CC io_u.o
>>>>     CC parse.o
>>>>     CC mutex.o
>>>>     CC options.o
>>>>     CC rbtree.o
>>>>     CC smalloc.o
>>>>     CC filehash.o
>>>>     CC profile.o
>>>>     CC debug.o
>>>>     CC lib/rand.o
>>>>     CC lib/num2str.o
>>>>     CC lib/ieee754.o
>>>>     CC crc/crc16.o
>>>>     CC crc/crc32.o
>>>>     CC crc/crc32c.o
>>>>     CC crc/crc32c-intel.o
>>>>     CC crc/crc64.o
>>>>     CC crc/crc7.o
>>>>     CC crc/md5.o
>>>>     CC crc/sha1.o
>>>>     CC crc/sha256.o
>>>>     CC crc/sha512.o
>>>>     CC engines/cpu.o
>>>>     CC engines/mmap.o
>>>>     CC engines/sync.o
>>>>     CC engines/null.o
>>>>     CC engines/net.o
>>>>     CC memalign.o
>>>>     CC server.o
>>>>     CC client.o
>>>>     CC iolog.o
>>>>     CC backend.o
>>>>     CC libfio.o
>>>>     CC flow.o
>>>>     CC json.o
>>>>     CC lib/zipf.o
>>>>     CC lib/axmap.o
>>>>     CC lib/lfsr.o
>>>>     CC gettime-thread.o
>>>>     CC diskutil.o
>>>>     CC fifo.o
>>>>     CC blktrace.o
>>>>     CC trim.o
>>>>     CC profiles/tiobench.o
>>>>     CC fio
>>>> verify.o: In function `verify_async_init':
>>>> /home/david/development/android/external/fio-2.0.13/verify.c:1091:
>>>> undefined reference to `pthread_attr_setstacksize'
>>>> /home/david/development/android/external/fio-2.0.13/verify.c:1104:
>>>> undefined reference to `pthread_detach'
>>>> /home/david/development/android/external/fio-2.0.13/verify.c:1097:
>>>> undefined reference to `pthread_create'
>>>> gettime.o: In function `fio_gettime':
>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:152:
>>>> undefined reference to `pthread_getspecific'
>>>> gettime.o: In function `fio_local_clock_init':
>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:295:
>>>> undefined reference to `pthread_setspecific'
>>>> gettime.o: In function `fio_clock_init':
>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:309:
>>>> undefined reference to `pthread_key_create'
>>>> gettime.o: In function `fio_monotonic_clocktest':
>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:492:
>>>> undefined reference to `pthread_create'
>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:511:
>>>> undefined reference to `pthread_join'
>>>> stat.o: In function `show_running_run_stats':
>>>> /home/david/development/android/external/fio-2.0.13/stat.c:1388:
>>>> undefined reference to `pthread_create'
>>>> /home/david/development/android/external/fio-2.0.13/stat.c:1389:
>>>> undefined reference to `pthread_detach'
>>>> mutex.o: In function `fio_mutex_init':
>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:44:
>>>> undefined reference to `pthread_mutexattr_init'
>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:54:
>>>> undefined reference to `pthread_mutexattr_setpshared'
>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:63:
>>>> undefined reference to `pthread_condattr_setpshared'
>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:74:
>>>> undefined reference to `pthread_mutexattr_destroy'
>>>> backend.o: In function `thread_main':
>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
>>>> undefined reference to `cgroup_shutdown'
>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
>>>> undefined reference to `cgroup_setup'
>>>> backend.o: In function `run_threads':
>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1568:
>>>> undefined reference to `pthread_create'
>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1576:
>>>> undefined reference to `pthread_detach'
>>>> backend.o: In function `create_disk_util_thread':
>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1724:
>>>> undefined reference to `pthread_create'
>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1731:
>>>> undefined reference to `pthread_detach'
>>>> backend.o: In function `fio_backend':
>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
>>>> undefined reference to `cgroup_kill'
>>>> gettime-thread.o: In function `fio_start_gtod_thread':
>>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:56:
>>>> undefined reference to `pthread_attr_setstacksize'
>>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:57:
>>>> undefined reference to `pthread_create'
>>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:64:
>>>> undefined reference to `pthread_detach'
>>>> collect2: ld returned 1 exit status
>>>> make: *** [fio] Error 1
>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ ~~
>>>>
>>>>
>>>> On Mon, Feb 11, 2013 at 8:53 PM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
>>>>> On 12/02/13 4:25 AM, Jens Axboe wrote:
>>>>>> On Mon, Feb 11 2013, David N wrote:
>>>>>>> Hello Everyone,
>>>>>>>
>>>>>>> I've been trying to compile FIO for Android but keep getting error
>>>>>>> bellow. Can anybody give me any guidance please?
>>>>>>>
>>>>>>> I very much appreciate!
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>>
>>>>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>>>>>>> UNAME=Android CROSS_COMPILE=$CCOMPILER
>>>>>>>     CC init.o
>>>>>>> init.c: In function �free_shm�:
>>>>>>> init.c:224:18: error: storage size of �sbuf� isn�t known
>>>>>>> init.c:233:3: warning: implicit declaration of function �shmdt�
>>>>>>> [-Wimplicit-function-declaration]
>>>>>>> init.c:234:3: warning: implicit declaration of function �shmctl�
>>>>>>> [-Wimplicit-function-declaration]
>>>>>>> init.c:224:18: warning: unused variable �sbuf� [-Wunused-variable]
>>>>>>> init.c: In function �setup_thread_area�:
>>>>>>> init.c:263:3: warning: implicit declaration of function �shmget�
>>>>>>> [-Wimplicit-function-declaration]
>>>>>>> init.c:277:2: warning: implicit declaration of function �shmat�
>>>>>>> [-Wimplicit-function-declaration]
>>>>>>> init.c:277:10: warning: assignment makes pointer from integer without
>>>>>>> a cast [enabled by default]
>>>>>>> make: *** [init.o] Error 1
>>>>>>
>>>>>> Lets CC in Aaron, who added the port.
>>>>>
>>>>> The switch to configure broke Android.  I got a very minimal build
>>>>> working with the attached patch and:
>>>>>
>>>>>   make
>>>>> cross_prefix=~/dev/android-toolchain-r8c/bin/arm-linux-androideabi-
>>>>> UNAME=Android
>>>>>
>>>>>
>>>>> Hope that helps,
>>>>>   -- Aaron
>>>>>
>>>
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: problem FIO compiling for Android
  2013-02-12  6:34               ` David N
@ 2013-02-12  6:43                 ` Aaron Carroll
  2013-02-12  6:55                   ` David N
  0 siblings, 1 reply; 13+ messages in thread
From: Aaron Carroll @ 2013-02-12  6:43 UTC (permalink / raw)
  To: David N; +Cc: fio

On 12/02/13 5:34 PM, David N wrote:
> Here's the output, Aaron. Still the same. Than you!!!
> 
> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make clean
> rm -f .depend gettime.o fio.o ioengines.o init.o stat.o log.o time.o
> filesetup.o eta.o verify.o memory.o io_u.o parse.o mutex.o options.o
> rbtree.o smalloc.o filehash.o profile.o debug.o lib/rand.o
> lib/num2str.o lib/ieee754.o crc/crc16.o crc/crc32.o crc/crc32c.o
> crc/crc32c-intel.o crc/crc64.o crc/crc7.o crc/md5.o crc/sha1.o
> crc/sha256.o crc/sha512.o engines/cpu.o engines/mmap.o engines/sync.o
> engines/null.o engines/net.o memalign.o server.o client.o iolog.o
> backend.o libfio.o flow.o json.o lib/zipf.o lib/axmap.o lib/lfsr.o
> gettime-thread.o diskutil.o fifo.o blktrace.o helpers.o cgroup.o
> trim.o engines/libaio.o engines/posixaio.o engines/sg.o
> engines/splice.o engines/syslet-rw.o engines/guasi.o engines/binject.o
> engines/rdma.o profiles/tiobench.o engines/fusion-aw.o
> engines/falloc.o engines/e4defrag.o t/stest.o gettime.o mutex.o
> smalloc.o t/log.o t/ieee754.o lib/ieee754.o t/log.o lib/ieee754.o
> lib/rand.o lib/zipf.o t/genzipf.o t/axmap.o lib/lfsr.o lib/axmap.o fio
> t/stest t/ieee754 t/genzipf t/axmap core.* core FIO-VERSION-FILE
> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
> V=1 UNAME=Android

David,

You missed the cross_prefix part.  That also explains why you had to add
-lpthread: you're using half the x86 build system and half Android.

    -- Aaron




> build android
> FIO_VERSION = fio-2.0.13
> build android
> gcc -MM -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG gettime.c
> fio.c ioengines.c init.c stat.c log.c time.c filesetup.c eta.c
> verify.c memory.c io_u.c parse.c mutex.c options.c rbtree.c smalloc.c
> filehash.c profile.c debug.c lib/rand.c lib/num2str.c lib/ieee754.c
> crc/crc16.c crc/crc32.c crc/crc32c.c crc/crc32c-intel.c crc/crc64.c
> crc/crc7.c crc/md5.c crc/sha1.c crc/sha256.c crc/sha512.c
> engines/cpu.c engines/mmap.c engines/sync.c engines/null.c
> engines/net.c memalign.c server.c client.c iolog.c backend.c libfio.c
> flow.c json.c lib/zipf.c lib/axmap.c lib/lfsr.c gettime-thread.c
> diskutil.c fifo.c blktrace.c trim.c profiles/tiobench.c 1> .depend
> gcc -o gettime.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG gettime.c
> gcc -o fio.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG fio.c
> gcc -o ioengines.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG ioengines.c
> gcc -o init.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c init.c
> gcc -o stat.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG stat.c
> gcc -o log.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG log.c
> gcc -o time.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG time.c
> gcc -o filesetup.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG filesetup.c
> gcc -o eta.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG eta.c
> gcc -o verify.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG verify.c
> gcc -o memory.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG memory.c
> gcc -o io_u.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG io_u.c
> gcc -o parse.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG parse.c
> gcc -o mutex.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG mutex.c
> gcc -o options.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG options.c
> gcc -o rbtree.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG rbtree.c
> gcc -o smalloc.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG smalloc.c
> gcc -o filehash.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG filehash.c
> gcc -o profile.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG profile.c
> gcc -o debug.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG debug.c
> gcc -o lib/rand.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG lib/rand.c
> gcc -o lib/num2str.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG lib/num2str.c
> gcc -o lib/ieee754.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG lib/ieee754.c
> gcc -o crc/crc16.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/crc16.c
> gcc -o crc/crc32.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/crc32.c
> gcc -o crc/crc32c.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/crc32c.c
> gcc -o crc/crc32c-intel.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/crc32c-intel.c
> gcc -o crc/crc64.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/crc64.c
> gcc -o crc/crc7.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/crc7.c
> gcc -o crc/md5.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/md5.c
> gcc -o crc/sha1.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/sha1.c
> gcc -o crc/sha256.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/sha256.c
> gcc -o crc/sha512.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/sha512.c
> gcc -o engines/cpu.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG engines/cpu.c
> gcc -o engines/mmap.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG engines/mmap.c
> gcc -o engines/sync.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG engines/sync.c
> gcc -o engines/null.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG engines/null.c
> gcc -o engines/net.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG engines/net.c
> gcc -o memalign.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG memalign.c
> gcc -o server.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG server.c
> gcc -o client.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG client.c
> gcc -o iolog.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG iolog.c
> gcc -o backend.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG backend.c
> gcc -o libfio.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG libfio.c
> gcc -o flow.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG flow.c
> gcc -o json.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG json.c
> gcc -o lib/zipf.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG lib/zipf.c
> gcc -o lib/axmap.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG lib/axmap.c
> gcc -o lib/lfsr.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG lib/lfsr.c
> gcc -o gettime-thread.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG gettime-thread.c
> gcc -o diskutil.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG diskutil.c
> gcc -o fifo.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG fifo.c
> gcc -o blktrace.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG blktrace.c
> gcc -o trim.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG trim.c
> gcc -o profiles/tiobench.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG profiles/tiobench.c
> gcc -rdynamic -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -o fio gettime.o fio.o ioengines.o init.o
> stat.o log.o time.o filesetup.o eta.o verify.o memory.o io_u.o parse.o
> mutex.o options.o rbtree.o smalloc.o filehash.o profile.o debug.o
> lib/rand.o lib/num2str.o lib/ieee754.o crc/crc16.o crc/crc32.o
> crc/crc32c.o crc/crc32c-intel.o crc/crc64.o crc/crc7.o crc/md5.o
> crc/sha1.o crc/sha256.o crc/sha512.o engines/cpu.o engines/mmap.o
> engines/sync.o engines/null.o engines/net.o memalign.o server.o
> client.o iolog.o backend.o libfio.o flow.o json.o lib/zipf.o
> lib/axmap.o lib/lfsr.o gettime-thread.o diskutil.o fifo.o blktrace.o
> trim.o profiles/tiobench.o -lm  -ldl -lpthread -lrt -ldl -rdynamic
> backend.o: In function `thread_main':
> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
> undefined reference to `cgroup_shutdown'
> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
> undefined reference to `cgroup_setup'
> backend.o: In function `fio_backend':
> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
> undefined reference to `cgroup_kill'
> collect2: ld returned 1 exit status
> make: *** [fio] Error 1
> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
> 
> 
> On Tue, Feb 12, 2013 at 1:27 AM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
>> On 12/02/13 5:20 PM, David N wrote:
>>> Aaron,
>>>
>>> I added -lpthread in the Makefile and most of the errors disappeared.
>>> This is left:
>>>
>>> backend.o: In function `thread_main':
>>> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
>>> undefined reference to `cgroup_shutdown'
>>> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
>>> undefined reference to `cgroup_setup'
>>> backend.o: In function `fio_backend':
>>> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
>>> undefined reference to `cgroup_kill'
>>> collect2: ld returned 1 exit status
>>> make: *** [fio] Error 1
>>
>> Somehow FIO_HAVE_CGROUPS got defined... perhaps you need a make clean.
>> Again, please use V=1 in your make line when posting errors.
>>
>> Thanks,
>>   -- Aaron
>>
>>
>>>
>>>
>>> On Tue, Feb 12, 2013 at 12:58 AM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
>>>> David,
>>>>
>>>> On 12/02/13 4:39 PM, David N wrote:
>>>>> Thanks much for your help. I still get following errors. Do you have
>>>>> any idea where the problem can be?
>>>>
>>>> I've not seen that problem before.  I wonder if adding -lpthread to the
>>>> linker flags might fix it?
>>>>
>>>> Try adding "V=1" to the make arguments and post the failing command.
>>>>
>>>>
>>>>
>>>>    -- Aaron
>>>>
>>>>
>>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>>>>> cross_prefix=~/development/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin
>>>>> UNAME=Android
>>>>> FIO_VERSION = fio-2.0.132
>>>>>     DEP .depend
>>>>>     CC gettime.o
>>>>>     CC fio.o
>>>>>     CC ioengines.o
>>>>>     CC init.o
>>>>>     CC stat.o
>>>>>     CC log.o
>>>>>     CC time.o
>>>>>     CC filesetup.o
>>>>>     CC eta.o
>>>>>     CC verify.o
>>>>>     CC memory.o
>>>>>     CC io_u.o
>>>>>     CC parse.o
>>>>>     CC mutex.o
>>>>>     CC options.o
>>>>>     CC rbtree.o
>>>>>     CC smalloc.o
>>>>>     CC filehash.o
>>>>>     CC profile.o
>>>>>     CC debug.o
>>>>>     CC lib/rand.o
>>>>>     CC lib/num2str.o
>>>>>     CC lib/ieee754.o
>>>>>     CC crc/crc16.o
>>>>>     CC crc/crc32.o
>>>>>     CC crc/crc32c.o
>>>>>     CC crc/crc32c-intel.o
>>>>>     CC crc/crc64.o
>>>>>     CC crc/crc7.o
>>>>>     CC crc/md5.o
>>>>>     CC crc/sha1.o
>>>>>     CC crc/sha256.o
>>>>>     CC crc/sha512.o
>>>>>     CC engines/cpu.o
>>>>>     CC engines/mmap.o
>>>>>     CC engines/sync.o
>>>>>     CC engines/null.o
>>>>>     CC engines/net.o
>>>>>     CC memalign.o
>>>>>     CC server.o
>>>>>     CC client.o
>>>>>     CC iolog.o
>>>>>     CC backend.o
>>>>>     CC libfio.o
>>>>>     CC flow.o
>>>>>     CC json.o
>>>>>     CC lib/zipf.o
>>>>>     CC lib/axmap.o
>>>>>     CC lib/lfsr.o
>>>>>     CC gettime-thread.o
>>>>>     CC diskutil.o
>>>>>     CC fifo.o
>>>>>     CC blktrace.o
>>>>>     CC trim.o
>>>>>     CC profiles/tiobench.o
>>>>>     CC fio
>>>>> verify.o: In function `verify_async_init':
>>>>> /home/david/development/android/external/fio-2.0.13/verify.c:1091:
>>>>> undefined reference to `pthread_attr_setstacksize'
>>>>> /home/david/development/android/external/fio-2.0.13/verify.c:1104:
>>>>> undefined reference to `pthread_detach'
>>>>> /home/david/development/android/external/fio-2.0.13/verify.c:1097:
>>>>> undefined reference to `pthread_create'
>>>>> gettime.o: In function `fio_gettime':
>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:152:
>>>>> undefined reference to `pthread_getspecific'
>>>>> gettime.o: In function `fio_local_clock_init':
>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:295:
>>>>> undefined reference to `pthread_setspecific'
>>>>> gettime.o: In function `fio_clock_init':
>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:309:
>>>>> undefined reference to `pthread_key_create'
>>>>> gettime.o: In function `fio_monotonic_clocktest':
>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:492:
>>>>> undefined reference to `pthread_create'
>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:511:
>>>>> undefined reference to `pthread_join'
>>>>> stat.o: In function `show_running_run_stats':
>>>>> /home/david/development/android/external/fio-2.0.13/stat.c:1388:
>>>>> undefined reference to `pthread_create'
>>>>> /home/david/development/android/external/fio-2.0.13/stat.c:1389:
>>>>> undefined reference to `pthread_detach'
>>>>> mutex.o: In function `fio_mutex_init':
>>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:44:
>>>>> undefined reference to `pthread_mutexattr_init'
>>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:54:
>>>>> undefined reference to `pthread_mutexattr_setpshared'
>>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:63:
>>>>> undefined reference to `pthread_condattr_setpshared'
>>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:74:
>>>>> undefined reference to `pthread_mutexattr_destroy'
>>>>> backend.o: In function `thread_main':
>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
>>>>> undefined reference to `cgroup_shutdown'
>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
>>>>> undefined reference to `cgroup_setup'
>>>>> backend.o: In function `run_threads':
>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1568:
>>>>> undefined reference to `pthread_create'
>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1576:
>>>>> undefined reference to `pthread_detach'
>>>>> backend.o: In function `create_disk_util_thread':
>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1724:
>>>>> undefined reference to `pthread_create'
>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1731:
>>>>> undefined reference to `pthread_detach'
>>>>> backend.o: In function `fio_backend':
>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
>>>>> undefined reference to `cgroup_kill'
>>>>> gettime-thread.o: In function `fio_start_gtod_thread':
>>>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:56:
>>>>> undefined reference to `pthread_attr_setstacksize'
>>>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:57:
>>>>> undefined reference to `pthread_create'
>>>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:64:
>>>>> undefined reference to `pthread_detach'
>>>>> collect2: ld returned 1 exit status
>>>>> make: *** [fio] Error 1
>>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ ~~
>>>>>
>>>>>
>>>>> On Mon, Feb 11, 2013 at 8:53 PM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
>>>>>> On 12/02/13 4:25 AM, Jens Axboe wrote:
>>>>>>> On Mon, Feb 11 2013, David N wrote:
>>>>>>>> Hello Everyone,
>>>>>>>>
>>>>>>>> I've been trying to compile FIO for Android but keep getting error
>>>>>>>> bellow. Can anybody give me any guidance please?
>>>>>>>>
>>>>>>>> I very much appreciate!
>>>>>>>>
>>>>>>>> David
>>>>>>>>
>>>>>>>>
>>>>>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>>>>>>>> UNAME=Android CROSS_COMPILE=$CCOMPILER
>>>>>>>>     CC init.o
>>>>>>>> init.c: In function �free_shm�:
>>>>>>>> init.c:224:18: error: storage size of �sbuf� isn�t known
>>>>>>>> init.c:233:3: warning: implicit declaration of function �shmdt�
>>>>>>>> [-Wimplicit-function-declaration]
>>>>>>>> init.c:234:3: warning: implicit declaration of function �shmctl�
>>>>>>>> [-Wimplicit-function-declaration]
>>>>>>>> init.c:224:18: warning: unused variable �sbuf� [-Wunused-variable]
>>>>>>>> init.c: In function �setup_thread_area�:
>>>>>>>> init.c:263:3: warning: implicit declaration of function �shmget�
>>>>>>>> [-Wimplicit-function-declaration]
>>>>>>>> init.c:277:2: warning: implicit declaration of function �shmat�
>>>>>>>> [-Wimplicit-function-declaration]
>>>>>>>> init.c:277:10: warning: assignment makes pointer from integer without
>>>>>>>> a cast [enabled by default]
>>>>>>>> make: *** [init.o] Error 1
>>>>>>>
>>>>>>> Lets CC in Aaron, who added the port.
>>>>>>
>>>>>> The switch to configure broke Android.  I got a very minimal build
>>>>>> working with the attached patch and:
>>>>>>
>>>>>>   make
>>>>>> cross_prefix=~/dev/android-toolchain-r8c/bin/arm-linux-androideabi-
>>>>>> UNAME=Android
>>>>>>
>>>>>>
>>>>>> Hope that helps,
>>>>>>   -- Aaron
>>>>>>
>>>>
>>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: problem FIO compiling for Android
  2013-02-12  6:43                 ` Aaron Carroll
@ 2013-02-12  6:55                   ` David N
  2013-02-13  1:12                     ` Aaron Carroll
  0 siblings, 1 reply; 13+ messages in thread
From: David N @ 2013-02-12  6:55 UTC (permalink / raw)
  To: Aaron Carroll; +Cc: fio

I seem to get the same with or without the prefix:

david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make clean
rm -f .depend gettime.o fio.o ioengines.o init.o stat.o log.o time.o
filesetup.o eta.o verify.o memory.o io_u.o parse.o mutex.o options.o
rbtree.o smalloc.o filehash.o profile.o debug.o lib/rand.o
lib/num2str.o lib/ieee754.o crc/crc16.o crc/crc32.o crc/crc32c.o
crc/crc32c-intel.o crc/crc64.o crc/crc7.o crc/md5.o crc/sha1.o
crc/sha256.o crc/sha512.o engines/cpu.o engines/mmap.o engines/sync.o
engines/null.o engines/net.o memalign.o server.o client.o iolog.o
backend.o libfio.o flow.o json.o lib/zipf.o lib/axmap.o lib/lfsr.o
gettime-thread.o diskutil.o fifo.o blktrace.o helpers.o cgroup.o
trim.o engines/libaio.o engines/posixaio.o engines/sg.o
engines/splice.o engines/syslet-rw.o engines/guasi.o engines/binject.o
engines/rdma.o profiles/tiobench.o engines/fusion-aw.o
engines/falloc.o engines/e4defrag.o t/stest.o gettime.o mutex.o
smalloc.o t/log.o t/ieee754.o lib/ieee754.o t/log.o lib/ieee754.o
lib/rand.o lib/zipf.o t/genzipf.o t/axmap.o lib/lfsr.o lib/axmap.o fio
t/stest t/ieee754 t/genzipf t/axmap core.* core FIO-VERSION-FILE
david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
V=1 cross_prefix=~/development/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-gcc
UNAME=Android
build android
FIO_VERSION = fio-2.0.13
build android
gcc -MM -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG gettime.c
fio.c ioengines.c init.c stat.c log.c time.c filesetup.c eta.c
verify.c memory.c io_u.c parse.c mutex.c options.c rbtree.c smalloc.c
filehash.c profile.c debug.c lib/rand.c lib/num2str.c lib/ieee754.c
crc/crc16.c crc/crc32.c crc/crc32c.c crc/crc32c-intel.c crc/crc64.c
crc/crc7.c crc/md5.c crc/sha1.c crc/sha256.c crc/sha512.c
engines/cpu.c engines/mmap.c engines/sync.c engines/null.c
engines/net.c memalign.c server.c client.c iolog.c backend.c libfio.c
flow.c json.c lib/zipf.c lib/axmap.c lib/lfsr.c gettime-thread.c
diskutil.c fifo.c blktrace.c trim.c profiles/tiobench.c 1> .depend
gcc -o gettime.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG gettime.c
gcc -o fio.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG fio.c
gcc -o ioengines.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG ioengines.c
gcc -o init.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c init.c
gcc -o stat.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG stat.c
gcc -o log.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG log.c
gcc -o time.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG time.c
gcc -o filesetup.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG filesetup.c
gcc -o eta.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG eta.c
gcc -o verify.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
 -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG verify.c
gcc -o memory.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
 -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG memory.c
gcc -o io_u.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG io_u.c
gcc -o parse.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG parse.c
gcc -o mutex.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG mutex.c
gcc -o options.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG options.c
gcc -o rbtree.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
 -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG rbtree.c
gcc -o smalloc.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG smalloc.c
gcc -o filehash.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG filehash.c
gcc -o profile.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG profile.c
gcc -o debug.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG debug.c
gcc -o lib/rand.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG lib/rand.c
gcc -o lib/num2str.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG lib/num2str.c
gcc -o lib/ieee754.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG lib/ieee754.c
gcc -o crc/crc16.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/crc16.c
gcc -o crc/crc32.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/crc32.c
gcc -o crc/crc32c.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/crc32c.c
gcc -o crc/crc32c-intel.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/crc32c-intel.c
gcc -o crc/crc64.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/crc64.c
gcc -o crc/crc7.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/crc7.c
gcc -o crc/md5.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/md5.c
gcc -o crc/sha1.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/sha1.c
gcc -o crc/sha256.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/sha256.c
gcc -o crc/sha512.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG crc/sha512.c
gcc -o engines/cpu.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG engines/cpu.c
gcc -o engines/mmap.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG engines/mmap.c
gcc -o engines/sync.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG engines/sync.c
gcc -o engines/null.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG engines/null.c
gcc -o engines/net.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG engines/net.c
gcc -o memalign.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG memalign.c
gcc -o server.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
 -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG server.c
gcc -o client.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
 -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG client.c
gcc -o iolog.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG iolog.c
gcc -o backend.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG backend.c
gcc -o libfio.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
 -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG libfio.c
gcc -o flow.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG flow.c
gcc -o json.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG json.c
gcc -o lib/zipf.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG lib/zipf.c
gcc -o lib/axmap.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG lib/axmap.c
gcc -o lib/lfsr.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG lib/lfsr.c
gcc -o gettime-thread.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG gettime-thread.c
gcc -o diskutil.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG diskutil.c
gcc -o fifo.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG fifo.c
gcc -o blktrace.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG blktrace.c
gcc -o trim.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG trim.c
gcc -o profiles/tiobench.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
-ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DFIO_INC_DEBUG profiles/tiobench.c
gcc -rdynamic -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
-DFIO_VERSION='"fio-2.0.13"' -o fio gettime.o fio.o ioengines.o init.o
stat.o log.o time.o filesetup.o eta.o verify.o memory.o io_u.o parse.o
mutex.o options.o rbtree.o smalloc.o filehash.o profile.o debug.o
lib/rand.o lib/num2str.o lib/ieee754.o crc/crc16.o crc/crc32.o
crc/crc32c.o crc/crc32c-intel.o crc/crc64.o crc/crc7.o crc/md5.o
crc/sha1.o crc/sha256.o crc/sha512.o engines/cpu.o engines/mmap.o
engines/sync.o engines/null.o engines/net.o memalign.o server.o
client.o iolog.o backend.o libfio.o flow.o json.o lib/zipf.o
lib/axmap.o lib/lfsr.o gettime-thread.o diskutil.o fifo.o blktrace.o
trim.o profiles/tiobench.o -lm  -ldl -lpthread -lrt -ldl -rdynamic
backend.o: In function `thread_main':
/home/david/development/android/external/fio-2.0.13/backend.c:1299:
undefined reference to `cgroup_shutdown'
/home/david/development/android/external/fio-2.0.13/backend.c:1142:
undefined reference to `cgroup_setup'
backend.o: In function `fio_backend':
/home/david/development/android/external/fio-2.0.13/backend.c:1794:
undefined reference to `cgroup_kill'
collect2: ld returned 1 exit status
make: *** [fio] Error 1
david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$


On Tue, Feb 12, 2013 at 1:43 AM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
> On 12/02/13 5:34 PM, David N wrote:
>> Here's the output, Aaron. Still the same. Than you!!!
>>
>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make clean
>> rm -f .depend gettime.o fio.o ioengines.o init.o stat.o log.o time.o
>> filesetup.o eta.o verify.o memory.o io_u.o parse.o mutex.o options.o
>> rbtree.o smalloc.o filehash.o profile.o debug.o lib/rand.o
>> lib/num2str.o lib/ieee754.o crc/crc16.o crc/crc32.o crc/crc32c.o
>> crc/crc32c-intel.o crc/crc64.o crc/crc7.o crc/md5.o crc/sha1.o
>> crc/sha256.o crc/sha512.o engines/cpu.o engines/mmap.o engines/sync.o
>> engines/null.o engines/net.o memalign.o server.o client.o iolog.o
>> backend.o libfio.o flow.o json.o lib/zipf.o lib/axmap.o lib/lfsr.o
>> gettime-thread.o diskutil.o fifo.o blktrace.o helpers.o cgroup.o
>> trim.o engines/libaio.o engines/posixaio.o engines/sg.o
>> engines/splice.o engines/syslet-rw.o engines/guasi.o engines/binject.o
>> engines/rdma.o profiles/tiobench.o engines/fusion-aw.o
>> engines/falloc.o engines/e4defrag.o t/stest.o gettime.o mutex.o
>> smalloc.o t/log.o t/ieee754.o lib/ieee754.o t/log.o lib/ieee754.o
>> lib/rand.o lib/zipf.o t/genzipf.o t/axmap.o lib/lfsr.o lib/axmap.o fio
>> t/stest t/ieee754 t/genzipf t/axmap core.* core FIO-VERSION-FILE
>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>> V=1 UNAME=Android
>
> David,
>
> You missed the cross_prefix part.  That also explains why you had to add
> -lpthread: you're using half the x86 build system and half Android.
>
>     -- Aaron
>
>
>
>
>> build android
>> FIO_VERSION = fio-2.0.13
>> build android
>> gcc -MM -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG gettime.c
>> fio.c ioengines.c init.c stat.c log.c time.c filesetup.c eta.c
>> verify.c memory.c io_u.c parse.c mutex.c options.c rbtree.c smalloc.c
>> filehash.c profile.c debug.c lib/rand.c lib/num2str.c lib/ieee754.c
>> crc/crc16.c crc/crc32.c crc/crc32c.c crc/crc32c-intel.c crc/crc64.c
>> crc/crc7.c crc/md5.c crc/sha1.c crc/sha256.c crc/sha512.c
>> engines/cpu.c engines/mmap.c engines/sync.c engines/null.c
>> engines/net.c memalign.c server.c client.c iolog.c backend.c libfio.c
>> flow.c json.c lib/zipf.c lib/axmap.c lib/lfsr.c gettime-thread.c
>> diskutil.c fifo.c blktrace.c trim.c profiles/tiobench.c 1> .depend
>> gcc -o gettime.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG gettime.c
>> gcc -o fio.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG fio.c
>> gcc -o ioengines.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG ioengines.c
>> gcc -o init.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c init.c
>> gcc -o stat.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG stat.c
>> gcc -o log.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG log.c
>> gcc -o time.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG time.c
>> gcc -o filesetup.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG filesetup.c
>> gcc -o eta.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG eta.c
>> gcc -o verify.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG verify.c
>> gcc -o memory.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG memory.c
>> gcc -o io_u.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG io_u.c
>> gcc -o parse.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG parse.c
>> gcc -o mutex.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG mutex.c
>> gcc -o options.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG options.c
>> gcc -o rbtree.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG rbtree.c
>> gcc -o smalloc.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG smalloc.c
>> gcc -o filehash.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG filehash.c
>> gcc -o profile.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG profile.c
>> gcc -o debug.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG debug.c
>> gcc -o lib/rand.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG lib/rand.c
>> gcc -o lib/num2str.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG lib/num2str.c
>> gcc -o lib/ieee754.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG lib/ieee754.c
>> gcc -o crc/crc16.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/crc16.c
>> gcc -o crc/crc32.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/crc32.c
>> gcc -o crc/crc32c.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/crc32c.c
>> gcc -o crc/crc32c-intel.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/crc32c-intel.c
>> gcc -o crc/crc64.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/crc64.c
>> gcc -o crc/crc7.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/crc7.c
>> gcc -o crc/md5.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/md5.c
>> gcc -o crc/sha1.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/sha1.c
>> gcc -o crc/sha256.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/sha256.c
>> gcc -o crc/sha512.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/sha512.c
>> gcc -o engines/cpu.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG engines/cpu.c
>> gcc -o engines/mmap.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG engines/mmap.c
>> gcc -o engines/sync.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG engines/sync.c
>> gcc -o engines/null.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG engines/null.c
>> gcc -o engines/net.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG engines/net.c
>> gcc -o memalign.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG memalign.c
>> gcc -o server.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG server.c
>> gcc -o client.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG client.c
>> gcc -o iolog.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG iolog.c
>> gcc -o backend.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG backend.c
>> gcc -o libfio.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG libfio.c
>> gcc -o flow.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG flow.c
>> gcc -o json.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG json.c
>> gcc -o lib/zipf.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG lib/zipf.c
>> gcc -o lib/axmap.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG lib/axmap.c
>> gcc -o lib/lfsr.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG lib/lfsr.c
>> gcc -o gettime-thread.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG gettime-thread.c
>> gcc -o diskutil.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG diskutil.c
>> gcc -o fifo.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG fifo.c
>> gcc -o blktrace.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG blktrace.c
>> gcc -o trim.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG trim.c
>> gcc -o profiles/tiobench.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG profiles/tiobench.c
>> gcc -rdynamic -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -o fio gettime.o fio.o ioengines.o init.o
>> stat.o log.o time.o filesetup.o eta.o verify.o memory.o io_u.o parse.o
>> mutex.o options.o rbtree.o smalloc.o filehash.o profile.o debug.o
>> lib/rand.o lib/num2str.o lib/ieee754.o crc/crc16.o crc/crc32.o
>> crc/crc32c.o crc/crc32c-intel.o crc/crc64.o crc/crc7.o crc/md5.o
>> crc/sha1.o crc/sha256.o crc/sha512.o engines/cpu.o engines/mmap.o
>> engines/sync.o engines/null.o engines/net.o memalign.o server.o
>> client.o iolog.o backend.o libfio.o flow.o json.o lib/zipf.o
>> lib/axmap.o lib/lfsr.o gettime-thread.o diskutil.o fifo.o blktrace.o
>> trim.o profiles/tiobench.o -lm  -ldl -lpthread -lrt -ldl -rdynamic
>> backend.o: In function `thread_main':
>> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
>> undefined reference to `cgroup_shutdown'
>> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
>> undefined reference to `cgroup_setup'
>> backend.o: In function `fio_backend':
>> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
>> undefined reference to `cgroup_kill'
>> collect2: ld returned 1 exit status
>> make: *** [fio] Error 1
>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
>>
>>
>> On Tue, Feb 12, 2013 at 1:27 AM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
>>> On 12/02/13 5:20 PM, David N wrote:
>>>> Aaron,
>>>>
>>>> I added -lpthread in the Makefile and most of the errors disappeared.
>>>> This is left:
>>>>
>>>> backend.o: In function `thread_main':
>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
>>>> undefined reference to `cgroup_shutdown'
>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
>>>> undefined reference to `cgroup_setup'
>>>> backend.o: In function `fio_backend':
>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
>>>> undefined reference to `cgroup_kill'
>>>> collect2: ld returned 1 exit status
>>>> make: *** [fio] Error 1
>>>
>>> Somehow FIO_HAVE_CGROUPS got defined... perhaps you need a make clean.
>>> Again, please use V=1 in your make line when posting errors.
>>>
>>> Thanks,
>>>   -- Aaron
>>>
>>>
>>>>
>>>>
>>>> On Tue, Feb 12, 2013 at 12:58 AM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
>>>>> David,
>>>>>
>>>>> On 12/02/13 4:39 PM, David N wrote:
>>>>>> Thanks much for your help. I still get following errors. Do you have
>>>>>> any idea where the problem can be?
>>>>>
>>>>> I've not seen that problem before.  I wonder if adding -lpthread to the
>>>>> linker flags might fix it?
>>>>>
>>>>> Try adding "V=1" to the make arguments and post the failing command.
>>>>>
>>>>>
>>>>>
>>>>>    -- Aaron
>>>>>
>>>>>
>>>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>>>>>> cross_prefix=~/development/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin
>>>>>> UNAME=Android
>>>>>> FIO_VERSION = fio-2.0.132
>>>>>>     DEP .depend
>>>>>>     CC gettime.o
>>>>>>     CC fio.o
>>>>>>     CC ioengines.o
>>>>>>     CC init.o
>>>>>>     CC stat.o
>>>>>>     CC log.o
>>>>>>     CC time.o
>>>>>>     CC filesetup.o
>>>>>>     CC eta.o
>>>>>>     CC verify.o
>>>>>>     CC memory.o
>>>>>>     CC io_u.o
>>>>>>     CC parse.o
>>>>>>     CC mutex.o
>>>>>>     CC options.o
>>>>>>     CC rbtree.o
>>>>>>     CC smalloc.o
>>>>>>     CC filehash.o
>>>>>>     CC profile.o
>>>>>>     CC debug.o
>>>>>>     CC lib/rand.o
>>>>>>     CC lib/num2str.o
>>>>>>     CC lib/ieee754.o
>>>>>>     CC crc/crc16.o
>>>>>>     CC crc/crc32.o
>>>>>>     CC crc/crc32c.o
>>>>>>     CC crc/crc32c-intel.o
>>>>>>     CC crc/crc64.o
>>>>>>     CC crc/crc7.o
>>>>>>     CC crc/md5.o
>>>>>>     CC crc/sha1.o
>>>>>>     CC crc/sha256.o
>>>>>>     CC crc/sha512.o
>>>>>>     CC engines/cpu.o
>>>>>>     CC engines/mmap.o
>>>>>>     CC engines/sync.o
>>>>>>     CC engines/null.o
>>>>>>     CC engines/net.o
>>>>>>     CC memalign.o
>>>>>>     CC server.o
>>>>>>     CC client.o
>>>>>>     CC iolog.o
>>>>>>     CC backend.o
>>>>>>     CC libfio.o
>>>>>>     CC flow.o
>>>>>>     CC json.o
>>>>>>     CC lib/zipf.o
>>>>>>     CC lib/axmap.o
>>>>>>     CC lib/lfsr.o
>>>>>>     CC gettime-thread.o
>>>>>>     CC diskutil.o
>>>>>>     CC fifo.o
>>>>>>     CC blktrace.o
>>>>>>     CC trim.o
>>>>>>     CC profiles/tiobench.o
>>>>>>     CC fio
>>>>>> verify.o: In function `verify_async_init':
>>>>>> /home/david/development/android/external/fio-2.0.13/verify.c:1091:
>>>>>> undefined reference to `pthread_attr_setstacksize'
>>>>>> /home/david/development/android/external/fio-2.0.13/verify.c:1104:
>>>>>> undefined reference to `pthread_detach'
>>>>>> /home/david/development/android/external/fio-2.0.13/verify.c:1097:
>>>>>> undefined reference to `pthread_create'
>>>>>> gettime.o: In function `fio_gettime':
>>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:152:
>>>>>> undefined reference to `pthread_getspecific'
>>>>>> gettime.o: In function `fio_local_clock_init':
>>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:295:
>>>>>> undefined reference to `pthread_setspecific'
>>>>>> gettime.o: In function `fio_clock_init':
>>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:309:
>>>>>> undefined reference to `pthread_key_create'
>>>>>> gettime.o: In function `fio_monotonic_clocktest':
>>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:492:
>>>>>> undefined reference to `pthread_create'
>>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:511:
>>>>>> undefined reference to `pthread_join'
>>>>>> stat.o: In function `show_running_run_stats':
>>>>>> /home/david/development/android/external/fio-2.0.13/stat.c:1388:
>>>>>> undefined reference to `pthread_create'
>>>>>> /home/david/development/android/external/fio-2.0.13/stat.c:1389:
>>>>>> undefined reference to `pthread_detach'
>>>>>> mutex.o: In function `fio_mutex_init':
>>>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:44:
>>>>>> undefined reference to `pthread_mutexattr_init'
>>>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:54:
>>>>>> undefined reference to `pthread_mutexattr_setpshared'
>>>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:63:
>>>>>> undefined reference to `pthread_condattr_setpshared'
>>>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:74:
>>>>>> undefined reference to `pthread_mutexattr_destroy'
>>>>>> backend.o: In function `thread_main':
>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
>>>>>> undefined reference to `cgroup_shutdown'
>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
>>>>>> undefined reference to `cgroup_setup'
>>>>>> backend.o: In function `run_threads':
>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1568:
>>>>>> undefined reference to `pthread_create'
>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1576:
>>>>>> undefined reference to `pthread_detach'
>>>>>> backend.o: In function `create_disk_util_thread':
>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1724:
>>>>>> undefined reference to `pthread_create'
>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1731:
>>>>>> undefined reference to `pthread_detach'
>>>>>> backend.o: In function `fio_backend':
>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
>>>>>> undefined reference to `cgroup_kill'
>>>>>> gettime-thread.o: In function `fio_start_gtod_thread':
>>>>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:56:
>>>>>> undefined reference to `pthread_attr_setstacksize'
>>>>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:57:
>>>>>> undefined reference to `pthread_create'
>>>>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:64:
>>>>>> undefined reference to `pthread_detach'
>>>>>> collect2: ld returned 1 exit status
>>>>>> make: *** [fio] Error 1
>>>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ ~~
>>>>>>
>>>>>>
>>>>>> On Mon, Feb 11, 2013 at 8:53 PM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
>>>>>>> On 12/02/13 4:25 AM, Jens Axboe wrote:
>>>>>>>> On Mon, Feb 11 2013, David N wrote:
>>>>>>>>> Hello Everyone,
>>>>>>>>>
>>>>>>>>> I've been trying to compile FIO for Android but keep getting error
>>>>>>>>> bellow. Can anybody give me any guidance please?
>>>>>>>>>
>>>>>>>>> I very much appreciate!
>>>>>>>>>
>>>>>>>>> David
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>>>>>>>>> UNAME=Android CROSS_COMPILE=$CCOMPILER
>>>>>>>>>     CC init.o
>>>>>>>>> init.c: In function �free_shm�:
>>>>>>>>> init.c:224:18: error: storage size of �sbuf� isn�t known
>>>>>>>>> init.c:233:3: warning: implicit declaration of function �shmdt�
>>>>>>>>> [-Wimplicit-function-declaration]
>>>>>>>>> init.c:234:3: warning: implicit declaration of function �shmctl�
>>>>>>>>> [-Wimplicit-function-declaration]
>>>>>>>>> init.c:224:18: warning: unused variable �sbuf� [-Wunused-variable]
>>>>>>>>> init.c: In function �setup_thread_area�:
>>>>>>>>> init.c:263:3: warning: implicit declaration of function �shmget�
>>>>>>>>> [-Wimplicit-function-declaration]
>>>>>>>>> init.c:277:2: warning: implicit declaration of function �shmat�
>>>>>>>>> [-Wimplicit-function-declaration]
>>>>>>>>> init.c:277:10: warning: assignment makes pointer from integer without
>>>>>>>>> a cast [enabled by default]
>>>>>>>>> make: *** [init.o] Error 1
>>>>>>>>
>>>>>>>> Lets CC in Aaron, who added the port.
>>>>>>>
>>>>>>> The switch to configure broke Android.  I got a very minimal build
>>>>>>> working with the attached patch and:
>>>>>>>
>>>>>>>   make
>>>>>>> cross_prefix=~/dev/android-toolchain-r8c/bin/arm-linux-androideabi-
>>>>>>> UNAME=Android
>>>>>>>
>>>>>>>
>>>>>>> Hope that helps,
>>>>>>>   -- Aaron
>>>>>>>
>>>>>
>>>
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: problem FIO compiling for Android
  2013-02-12  1:53     ` Aaron Carroll
  2013-02-12  5:39       ` David N
@ 2013-02-12  8:57       ` Jens Axboe
  1 sibling, 0 replies; 13+ messages in thread
From: Jens Axboe @ 2013-02-12  8:57 UTC (permalink / raw)
  To: Aaron Carroll; +Cc: David N, fio

On Tue, Feb 12 2013, Aaron Carroll wrote:
> On 12/02/13 4:25 AM, Jens Axboe wrote:
> > On Mon, Feb 11 2013, David N wrote:
> >> Hello Everyone,
> >>
> >> I've been trying to compile FIO for Android but keep getting error
> >> bellow. Can anybody give me any guidance please?
> >>
> >> I very much appreciate!
> >>
> >> David
> >>
> >>
> >> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
> >> UNAME=Android CROSS_COMPILE=$CCOMPILER
> >>     CC init.o
> >> init.c: In function ‘free_shm’:
> >> init.c:224:18: error: storage size of ‘sbuf’ isn’t known
> >> init.c:233:3: warning: implicit declaration of function ‘shmdt’
> >> [-Wimplicit-function-declaration]
> >> init.c:234:3: warning: implicit declaration of function ‘shmctl’
> >> [-Wimplicit-function-declaration]
> >> init.c:224:18: warning: unused variable ‘sbuf’ [-Wunused-variable]
> >> init.c: In function ‘setup_thread_area’:
> >> init.c:263:3: warning: implicit declaration of function ‘shmget’
> >> [-Wimplicit-function-declaration]
> >> init.c:277:2: warning: implicit declaration of function ‘shmat’
> >> [-Wimplicit-function-declaration]
> >> init.c:277:10: warning: assignment makes pointer from integer without
> >> a cast [enabled by default]
> >> make: *** [init.o] Error 1
> > 
> > Lets CC in Aaron, who added the port.
> 
> The switch to configure broke Android.  I got a very minimal build
> working with the attached patch and:
> 
>   make
> cross_prefix=~/dev/android-toolchain-r8c/bin/arm-linux-androideabi-
> UNAME=Android

I thought it might have broken it, Android is pretty much the only
platform I cannot build/test on myself.

Will apply your patch.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: problem FIO compiling for Android
  2013-02-12  6:55                   ` David N
@ 2013-02-13  1:12                     ` Aaron Carroll
  2013-02-13  5:13                       ` David N
  0 siblings, 1 reply; 13+ messages in thread
From: Aaron Carroll @ 2013-02-13  1:12 UTC (permalink / raw)
  To: David N; +Cc: fio

David,

You might want to try updating to git tip and try again.

git pull
make clean
make UNAME=Android 
cross_prefix=~/dev/android-toolchain-r8c/bin/arm-linux-androideabi-

works for me.

Jens: what's the right way to propagate $targetos from configure to Makefile?


       -- Aaron


On 12/02/13 17:55, David N wrote:
> I seem to get the same with or without the prefix:
>
> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make clean
> rm -f .depend gettime.o fio.o ioengines.o init.o stat.o log.o time.o
> filesetup.o eta.o verify.o memory.o io_u.o parse.o mutex.o options.o
> rbtree.o smalloc.o filehash.o profile.o debug.o lib/rand.o
> lib/num2str.o lib/ieee754.o crc/crc16.o crc/crc32.o crc/crc32c.o
> crc/crc32c-intel.o crc/crc64.o crc/crc7.o crc/md5.o crc/sha1.o
> crc/sha256.o crc/sha512.o engines/cpu.o engines/mmap.o engines/sync.o
> engines/null.o engines/net.o memalign.o server.o client.o iolog.o
> backend.o libfio.o flow.o json.o lib/zipf.o lib/axmap.o lib/lfsr.o
> gettime-thread.o diskutil.o fifo.o blktrace.o helpers.o cgroup.o
> trim.o engines/libaio.o engines/posixaio.o engines/sg.o
> engines/splice.o engines/syslet-rw.o engines/guasi.o engines/binject.o
> engines/rdma.o profiles/tiobench.o engines/fusion-aw.o
> engines/falloc.o engines/e4defrag.o t/stest.o gettime.o mutex.o
> smalloc.o t/log.o t/ieee754.o lib/ieee754.o t/log.o lib/ieee754.o
> lib/rand.o lib/zipf.o t/genzipf.o t/axmap.o lib/lfsr.o lib/axmap.o fio
> t/stest t/ieee754 t/genzipf t/axmap core.* core FIO-VERSION-FILE
> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
> V=1 cross_prefix=~/development/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-gcc
> UNAME=Android
> build android
> FIO_VERSION = fio-2.0.13
> build android
> gcc -MM -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG gettime.c
> fio.c ioengines.c init.c stat.c log.c time.c filesetup.c eta.c
> verify.c memory.c io_u.c parse.c mutex.c options.c rbtree.c smalloc.c
> filehash.c profile.c debug.c lib/rand.c lib/num2str.c lib/ieee754.c
> crc/crc16.c crc/crc32.c crc/crc32c.c crc/crc32c-intel.c crc/crc64.c
> crc/crc7.c crc/md5.c crc/sha1.c crc/sha256.c crc/sha512.c
> engines/cpu.c engines/mmap.c engines/sync.c engines/null.c
> engines/net.c memalign.c server.c client.c iolog.c backend.c libfio.c
> flow.c json.c lib/zipf.c lib/axmap.c lib/lfsr.c gettime-thread.c
> diskutil.c fifo.c blktrace.c trim.c profiles/tiobench.c 1> .depend
> gcc -o gettime.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG gettime.c
> gcc -o fio.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG fio.c
> gcc -o ioengines.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG ioengines.c
> gcc -o init.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c init.c
> gcc -o stat.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG stat.c
> gcc -o log.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG log.c
> gcc -o time.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG time.c
> gcc -o filesetup.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG filesetup.c
> gcc -o eta.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG eta.c
> gcc -o verify.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG verify.c
> gcc -o memory.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG memory.c
> gcc -o io_u.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG io_u.c
> gcc -o parse.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG parse.c
> gcc -o mutex.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG mutex.c
> gcc -o options.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG options.c
> gcc -o rbtree.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG rbtree.c
> gcc -o smalloc.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG smalloc.c
> gcc -o filehash.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG filehash.c
> gcc -o profile.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG profile.c
> gcc -o debug.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG debug.c
> gcc -o lib/rand.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG lib/rand.c
> gcc -o lib/num2str.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG lib/num2str.c
> gcc -o lib/ieee754.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG lib/ieee754.c
> gcc -o crc/crc16.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/crc16.c
> gcc -o crc/crc32.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/crc32.c
> gcc -o crc/crc32c.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/crc32c.c
> gcc -o crc/crc32c-intel.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/crc32c-intel.c
> gcc -o crc/crc64.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/crc64.c
> gcc -o crc/crc7.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/crc7.c
> gcc -o crc/md5.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/md5.c
> gcc -o crc/sha1.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/sha1.c
> gcc -o crc/sha256.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/sha256.c
> gcc -o crc/sha512.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG crc/sha512.c
> gcc -o engines/cpu.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG engines/cpu.c
> gcc -o engines/mmap.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG engines/mmap.c
> gcc -o engines/sync.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG engines/sync.c
> gcc -o engines/null.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG engines/null.c
> gcc -o engines/net.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG engines/net.c
> gcc -o memalign.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG memalign.c
> gcc -o server.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG server.c
> gcc -o client.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG client.c
> gcc -o iolog.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG iolog.c
> gcc -o backend.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG backend.c
> gcc -o libfio.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG libfio.c
> gcc -o flow.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG flow.c
> gcc -o json.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG json.c
> gcc -o lib/zipf.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG lib/zipf.c
> gcc -o lib/axmap.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG lib/axmap.c
> gcc -o lib/lfsr.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG lib/lfsr.c
> gcc -o gettime-thread.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG gettime-thread.c
> gcc -o diskutil.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG diskutil.c
> gcc -o fifo.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG fifo.c
> gcc -o blktrace.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG blktrace.c
> gcc -o trim.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG trim.c
> gcc -o profiles/tiobench.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
> -DFIO_INC_DEBUG profiles/tiobench.c
> gcc -rdynamic -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
> -DFIO_VERSION='"fio-2.0.13"' -o fio gettime.o fio.o ioengines.o init.o
> stat.o log.o time.o filesetup.o eta.o verify.o memory.o io_u.o parse.o
> mutex.o options.o rbtree.o smalloc.o filehash.o profile.o debug.o
> lib/rand.o lib/num2str.o lib/ieee754.o crc/crc16.o crc/crc32.o
> crc/crc32c.o crc/crc32c-intel.o crc/crc64.o crc/crc7.o crc/md5.o
> crc/sha1.o crc/sha256.o crc/sha512.o engines/cpu.o engines/mmap.o
> engines/sync.o engines/null.o engines/net.o memalign.o server.o
> client.o iolog.o backend.o libfio.o flow.o json.o lib/zipf.o
> lib/axmap.o lib/lfsr.o gettime-thread.o diskutil.o fifo.o blktrace.o
> trim.o profiles/tiobench.o -lm  -ldl -lpthread -lrt -ldl -rdynamic
> backend.o: In function `thread_main':
> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
> undefined reference to `cgroup_shutdown'
> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
> undefined reference to `cgroup_setup'
> backend.o: In function `fio_backend':
> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
> undefined reference to `cgroup_kill'
> collect2: ld returned 1 exit status
> make: *** [fio] Error 1
> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
>
>
> On Tue, Feb 12, 2013 at 1:43 AM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
>> On 12/02/13 5:34 PM, David N wrote:
>>> Here's the output, Aaron. Still the same. Than you!!!
>>>
>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make clean
>>> rm -f .depend gettime.o fio.o ioengines.o init.o stat.o log.o time.o
>>> filesetup.o eta.o verify.o memory.o io_u.o parse.o mutex.o options.o
>>> rbtree.o smalloc.o filehash.o profile.o debug.o lib/rand.o
>>> lib/num2str.o lib/ieee754.o crc/crc16.o crc/crc32.o crc/crc32c.o
>>> crc/crc32c-intel.o crc/crc64.o crc/crc7.o crc/md5.o crc/sha1.o
>>> crc/sha256.o crc/sha512.o engines/cpu.o engines/mmap.o engines/sync.o
>>> engines/null.o engines/net.o memalign.o server.o client.o iolog.o
>>> backend.o libfio.o flow.o json.o lib/zipf.o lib/axmap.o lib/lfsr.o
>>> gettime-thread.o diskutil.o fifo.o blktrace.o helpers.o cgroup.o
>>> trim.o engines/libaio.o engines/posixaio.o engines/sg.o
>>> engines/splice.o engines/syslet-rw.o engines/guasi.o engines/binject.o
>>> engines/rdma.o profiles/tiobench.o engines/fusion-aw.o
>>> engines/falloc.o engines/e4defrag.o t/stest.o gettime.o mutex.o
>>> smalloc.o t/log.o t/ieee754.o lib/ieee754.o t/log.o lib/ieee754.o
>>> lib/rand.o lib/zipf.o t/genzipf.o t/axmap.o lib/lfsr.o lib/axmap.o fio
>>> t/stest t/ieee754 t/genzipf t/axmap core.* core FIO-VERSION-FILE
>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>>> V=1 UNAME=Android
>>
>> David,
>>
>> You missed the cross_prefix part.  That also explains why you had to add
>> -lpthread: you're using half the x86 build system and half Android.
>>
>>      -- Aaron
>>
>>
>>
>>
>>> build android
>>> FIO_VERSION = fio-2.0.13
>>> build android
>>> gcc -MM -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG gettime.c
>>> fio.c ioengines.c init.c stat.c log.c time.c filesetup.c eta.c
>>> verify.c memory.c io_u.c parse.c mutex.c options.c rbtree.c smalloc.c
>>> filehash.c profile.c debug.c lib/rand.c lib/num2str.c lib/ieee754.c
>>> crc/crc16.c crc/crc32.c crc/crc32c.c crc/crc32c-intel.c crc/crc64.c
>>> crc/crc7.c crc/md5.c crc/sha1.c crc/sha256.c crc/sha512.c
>>> engines/cpu.c engines/mmap.c engines/sync.c engines/null.c
>>> engines/net.c memalign.c server.c client.c iolog.c backend.c libfio.c
>>> flow.c json.c lib/zipf.c lib/axmap.c lib/lfsr.c gettime-thread.c
>>> diskutil.c fifo.c blktrace.c trim.c profiles/tiobench.c 1> .depend
>>> gcc -o gettime.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG gettime.c
>>> gcc -o fio.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG fio.c
>>> gcc -o ioengines.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG ioengines.c
>>> gcc -o init.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c init.c
>>> gcc -o stat.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG stat.c
>>> gcc -o log.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG log.c
>>> gcc -o time.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG time.c
>>> gcc -o filesetup.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG filesetup.c
>>> gcc -o eta.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG eta.c
>>> gcc -o verify.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG verify.c
>>> gcc -o memory.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG memory.c
>>> gcc -o io_u.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG io_u.c
>>> gcc -o parse.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG parse.c
>>> gcc -o mutex.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG mutex.c
>>> gcc -o options.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG options.c
>>> gcc -o rbtree.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG rbtree.c
>>> gcc -o smalloc.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG smalloc.c
>>> gcc -o filehash.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG filehash.c
>>> gcc -o profile.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG profile.c
>>> gcc -o debug.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG debug.c
>>> gcc -o lib/rand.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG lib/rand.c
>>> gcc -o lib/num2str.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG lib/num2str.c
>>> gcc -o lib/ieee754.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG lib/ieee754.c
>>> gcc -o crc/crc16.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG crc/crc16.c
>>> gcc -o crc/crc32.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG crc/crc32.c
>>> gcc -o crc/crc32c.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG crc/crc32c.c
>>> gcc -o crc/crc32c-intel.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG crc/crc32c-intel.c
>>> gcc -o crc/crc64.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG crc/crc64.c
>>> gcc -o crc/crc7.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG crc/crc7.c
>>> gcc -o crc/md5.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG crc/md5.c
>>> gcc -o crc/sha1.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG crc/sha1.c
>>> gcc -o crc/sha256.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG crc/sha256.c
>>> gcc -o crc/sha512.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG crc/sha512.c
>>> gcc -o engines/cpu.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG engines/cpu.c
>>> gcc -o engines/mmap.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG engines/mmap.c
>>> gcc -o engines/sync.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG engines/sync.c
>>> gcc -o engines/null.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG engines/null.c
>>> gcc -o engines/net.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG engines/net.c
>>> gcc -o memalign.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG memalign.c
>>> gcc -o server.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG server.c
>>> gcc -o client.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG client.c
>>> gcc -o iolog.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG iolog.c
>>> gcc -o backend.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG backend.c
>>> gcc -o libfio.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG libfio.c
>>> gcc -o flow.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG flow.c
>>> gcc -o json.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG json.c
>>> gcc -o lib/zipf.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG lib/zipf.c
>>> gcc -o lib/axmap.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG lib/axmap.c
>>> gcc -o lib/lfsr.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG lib/lfsr.c
>>> gcc -o gettime-thread.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG gettime-thread.c
>>> gcc -o diskutil.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG diskutil.c
>>> gcc -o fifo.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG fifo.c
>>> gcc -o blktrace.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG blktrace.c
>>> gcc -o trim.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG trim.c
>>> gcc -o profiles/tiobench.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>> -DFIO_INC_DEBUG profiles/tiobench.c
>>> gcc -rdynamic -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>> -DFIO_VERSION='"fio-2.0.13"' -o fio gettime.o fio.o ioengines.o init.o
>>> stat.o log.o time.o filesetup.o eta.o verify.o memory.o io_u.o parse.o
>>> mutex.o options.o rbtree.o smalloc.o filehash.o profile.o debug.o
>>> lib/rand.o lib/num2str.o lib/ieee754.o crc/crc16.o crc/crc32.o
>>> crc/crc32c.o crc/crc32c-intel.o crc/crc64.o crc/crc7.o crc/md5.o
>>> crc/sha1.o crc/sha256.o crc/sha512.o engines/cpu.o engines/mmap.o
>>> engines/sync.o engines/null.o engines/net.o memalign.o server.o
>>> client.o iolog.o backend.o libfio.o flow.o json.o lib/zipf.o
>>> lib/axmap.o lib/lfsr.o gettime-thread.o diskutil.o fifo.o blktrace.o
>>> trim.o profiles/tiobench.o -lm  -ldl -lpthread -lrt -ldl -rdynamic
>>> backend.o: In function `thread_main':
>>> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
>>> undefined reference to `cgroup_shutdown'
>>> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
>>> undefined reference to `cgroup_setup'
>>> backend.o: In function `fio_backend':
>>> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
>>> undefined reference to `cgroup_kill'
>>> collect2: ld returned 1 exit status
>>> make: *** [fio] Error 1
>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
>>>
>>>
>>> On Tue, Feb 12, 2013 at 1:27 AM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
>>>> On 12/02/13 5:20 PM, David N wrote:
>>>>> Aaron,
>>>>>
>>>>> I added -lpthread in the Makefile and most of the errors disappeared.
>>>>> This is left:
>>>>>
>>>>> backend.o: In function `thread_main':
>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
>>>>> undefined reference to `cgroup_shutdown'
>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
>>>>> undefined reference to `cgroup_setup'
>>>>> backend.o: In function `fio_backend':
>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
>>>>> undefined reference to `cgroup_kill'
>>>>> collect2: ld returned 1 exit status
>>>>> make: *** [fio] Error 1
>>>>
>>>> Somehow FIO_HAVE_CGROUPS got defined... perhaps you need a make clean.
>>>> Again, please use V=1 in your make line when posting errors.
>>>>
>>>> Thanks,
>>>>    -- Aaron
>>>>
>>>>
>>>>>
>>>>>
>>>>> On Tue, Feb 12, 2013 at 12:58 AM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
>>>>>> David,
>>>>>>
>>>>>> On 12/02/13 4:39 PM, David N wrote:
>>>>>>> Thanks much for your help. I still get following errors. Do you have
>>>>>>> any idea where the problem can be?
>>>>>>
>>>>>> I've not seen that problem before.  I wonder if adding -lpthread to the
>>>>>> linker flags might fix it?
>>>>>>
>>>>>> Try adding "V=1" to the make arguments and post the failing command.
>>>>>>
>>>>>>
>>>>>>
>>>>>>     -- Aaron
>>>>>>
>>>>>>
>>>>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>>>>>>> cross_prefix=~/development/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin
>>>>>>> UNAME=Android
>>>>>>> FIO_VERSION = fio-2.0.132
>>>>>>>      DEP .depend
>>>>>>>      CC gettime.o
>>>>>>>      CC fio.o
>>>>>>>      CC ioengines.o
>>>>>>>      CC init.o
>>>>>>>      CC stat.o
>>>>>>>      CC log.o
>>>>>>>      CC time.o
>>>>>>>      CC filesetup.o
>>>>>>>      CC eta.o
>>>>>>>      CC verify.o
>>>>>>>      CC memory.o
>>>>>>>      CC io_u.o
>>>>>>>      CC parse.o
>>>>>>>      CC mutex.o
>>>>>>>      CC options.o
>>>>>>>      CC rbtree.o
>>>>>>>      CC smalloc.o
>>>>>>>      CC filehash.o
>>>>>>>      CC profile.o
>>>>>>>      CC debug.o
>>>>>>>      CC lib/rand.o
>>>>>>>      CC lib/num2str.o
>>>>>>>      CC lib/ieee754.o
>>>>>>>      CC crc/crc16.o
>>>>>>>      CC crc/crc32.o
>>>>>>>      CC crc/crc32c.o
>>>>>>>      CC crc/crc32c-intel.o
>>>>>>>      CC crc/crc64.o
>>>>>>>      CC crc/crc7.o
>>>>>>>      CC crc/md5.o
>>>>>>>      CC crc/sha1.o
>>>>>>>      CC crc/sha256.o
>>>>>>>      CC crc/sha512.o
>>>>>>>      CC engines/cpu.o
>>>>>>>      CC engines/mmap.o
>>>>>>>      CC engines/sync.o
>>>>>>>      CC engines/null.o
>>>>>>>      CC engines/net.o
>>>>>>>      CC memalign.o
>>>>>>>      CC server.o
>>>>>>>      CC client.o
>>>>>>>      CC iolog.o
>>>>>>>      CC backend.o
>>>>>>>      CC libfio.o
>>>>>>>      CC flow.o
>>>>>>>      CC json.o
>>>>>>>      CC lib/zipf.o
>>>>>>>      CC lib/axmap.o
>>>>>>>      CC lib/lfsr.o
>>>>>>>      CC gettime-thread.o
>>>>>>>      CC diskutil.o
>>>>>>>      CC fifo.o
>>>>>>>      CC blktrace.o
>>>>>>>      CC trim.o
>>>>>>>      CC profiles/tiobench.o
>>>>>>>      CC fio
>>>>>>> verify.o: In function `verify_async_init':
>>>>>>> /home/david/development/android/external/fio-2.0.13/verify.c:1091:
>>>>>>> undefined reference to `pthread_attr_setstacksize'
>>>>>>> /home/david/development/android/external/fio-2.0.13/verify.c:1104:
>>>>>>> undefined reference to `pthread_detach'
>>>>>>> /home/david/development/android/external/fio-2.0.13/verify.c:1097:
>>>>>>> undefined reference to `pthread_create'
>>>>>>> gettime.o: In function `fio_gettime':
>>>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:152:
>>>>>>> undefined reference to `pthread_getspecific'
>>>>>>> gettime.o: In function `fio_local_clock_init':
>>>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:295:
>>>>>>> undefined reference to `pthread_setspecific'
>>>>>>> gettime.o: In function `fio_clock_init':
>>>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:309:
>>>>>>> undefined reference to `pthread_key_create'
>>>>>>> gettime.o: In function `fio_monotonic_clocktest':
>>>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:492:
>>>>>>> undefined reference to `pthread_create'
>>>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:511:
>>>>>>> undefined reference to `pthread_join'
>>>>>>> stat.o: In function `show_running_run_stats':
>>>>>>> /home/david/development/android/external/fio-2.0.13/stat.c:1388:
>>>>>>> undefined reference to `pthread_create'
>>>>>>> /home/david/development/android/external/fio-2.0.13/stat.c:1389:
>>>>>>> undefined reference to `pthread_detach'
>>>>>>> mutex.o: In function `fio_mutex_init':
>>>>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:44:
>>>>>>> undefined reference to `pthread_mutexattr_init'
>>>>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:54:
>>>>>>> undefined reference to `pthread_mutexattr_setpshared'
>>>>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:63:
>>>>>>> undefined reference to `pthread_condattr_setpshared'
>>>>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:74:
>>>>>>> undefined reference to `pthread_mutexattr_destroy'
>>>>>>> backend.o: In function `thread_main':
>>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
>>>>>>> undefined reference to `cgroup_shutdown'
>>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
>>>>>>> undefined reference to `cgroup_setup'
>>>>>>> backend.o: In function `run_threads':
>>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1568:
>>>>>>> undefined reference to `pthread_create'
>>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1576:
>>>>>>> undefined reference to `pthread_detach'
>>>>>>> backend.o: In function `create_disk_util_thread':
>>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1724:
>>>>>>> undefined reference to `pthread_create'
>>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1731:
>>>>>>> undefined reference to `pthread_detach'
>>>>>>> backend.o: In function `fio_backend':
>>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
>>>>>>> undefined reference to `cgroup_kill'
>>>>>>> gettime-thread.o: In function `fio_start_gtod_thread':
>>>>>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:56:
>>>>>>> undefined reference to `pthread_attr_setstacksize'
>>>>>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:57:
>>>>>>> undefined reference to `pthread_create'
>>>>>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:64:
>>>>>>> undefined reference to `pthread_detach'
>>>>>>> collect2: ld returned 1 exit status
>>>>>>> make: *** [fio] Error 1
>>>>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ ~~
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Feb 11, 2013 at 8:53 PM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
>>>>>>>> On 12/02/13 4:25 AM, Jens Axboe wrote:
>>>>>>>>> On Mon, Feb 11 2013, David N wrote:
>>>>>>>>>> Hello Everyone,
>>>>>>>>>>
>>>>>>>>>> I've been trying to compile FIO for Android but keep getting error
>>>>>>>>>> bellow. Can anybody give me any guidance please?
>>>>>>>>>>
>>>>>>>>>> I very much appreciate!
>>>>>>>>>>
>>>>>>>>>> David
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>>>>>>>>>> UNAME=Android CROSS_COMPILE=$CCOMPILER
>>>>>>>>>>      CC init.o
>>>>>>>>>> init.c: In function �free_shm�:
>>>>>>>>>> init.c:224:18: error: storage size of �sbuf� isn�t known
>>>>>>>>>> init.c:233:3: warning: implicit declaration of function �shmdt�
>>>>>>>>>> [-Wimplicit-function-declaration]
>>>>>>>>>> init.c:234:3: warning: implicit declaration of function �shmctl�
>>>>>>>>>> [-Wimplicit-function-declaration]
>>>>>>>>>> init.c:224:18: warning: unused variable �sbuf� [-Wunused-variable]
>>>>>>>>>> init.c: In function �setup_thread_area�:
>>>>>>>>>> init.c:263:3: warning: implicit declaration of function �shmget�
>>>>>>>>>> [-Wimplicit-function-declaration]
>>>>>>>>>> init.c:277:2: warning: implicit declaration of function �shmat�
>>>>>>>>>> [-Wimplicit-function-declaration]
>>>>>>>>>> init.c:277:10: warning: assignment makes pointer from integer without
>>>>>>>>>> a cast [enabled by default]
>>>>>>>>>> make: *** [init.o] Error 1
>>>>>>>>>
>>>>>>>>> Lets CC in Aaron, who added the port.
>>>>>>>>
>>>>>>>> The switch to configure broke Android.  I got a very minimal build
>>>>>>>> working with the attached patch and:
>>>>>>>>
>>>>>>>>    make
>>>>>>>> cross_prefix=~/dev/android-toolchain-r8c/bin/arm-linux-androideabi-
>>>>>>>> UNAME=Android
>>>>>>>>
>>>>>>>>
>>>>>>>> Hope that helps,
>>>>>>>>    -- Aaron
>>>>>>>>
>>>>>>
>>>>
>>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: problem FIO compiling for Android
  2013-02-13  1:12                     ` Aaron Carroll
@ 2013-02-13  5:13                       ` David N
  0 siblings, 0 replies; 13+ messages in thread
From: David N @ 2013-02-13  5:13 UTC (permalink / raw)
  To: Aaron Carroll; +Cc: fio

Hi Aaron and Jens,

I will definitely try that and report back. When we get stuff figured,
I think it will be useful to have somewhere FIO android external
package just like Blktrace or Strace. That would greatly help android
users. Just download android, compile with FIO enabled, and it's ready
to go.

Thanks much for all help!
David

On Tue, Feb 12, 2013 at 8:12 PM, Aaron Carroll <aaronc@cse.unsw.edu.au> wrote:
> David,
>
> You might want to try updating to git tip and try again.
>
> git pull
> make clean
> make UNAME=Android
> cross_prefix=~/dev/android-toolchain-r8c/bin/arm-linux-androideabi-
>
> works for me.
>
> Jens: what's the right way to propagate $targetos from configure to
> Makefile?
>
>
>       -- Aaron
>
>
>
> On 12/02/13 17:55, David N wrote:
>>
>> I seem to get the same with or without the prefix:
>>
>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>> clean
>> rm -f .depend gettime.o fio.o ioengines.o init.o stat.o log.o time.o
>> filesetup.o eta.o verify.o memory.o io_u.o parse.o mutex.o options.o
>> rbtree.o smalloc.o filehash.o profile.o debug.o lib/rand.o
>> lib/num2str.o lib/ieee754.o crc/crc16.o crc/crc32.o crc/crc32c.o
>> crc/crc32c-intel.o crc/crc64.o crc/crc7.o crc/md5.o crc/sha1.o
>> crc/sha256.o crc/sha512.o engines/cpu.o engines/mmap.o engines/sync.o
>> engines/null.o engines/net.o memalign.o server.o client.o iolog.o
>> backend.o libfio.o flow.o json.o lib/zipf.o lib/axmap.o lib/lfsr.o
>> gettime-thread.o diskutil.o fifo.o blktrace.o helpers.o cgroup.o
>> trim.o engines/libaio.o engines/posixaio.o engines/sg.o
>> engines/splice.o engines/syslet-rw.o engines/guasi.o engines/binject.o
>> engines/rdma.o profiles/tiobench.o engines/fusion-aw.o
>> engines/falloc.o engines/e4defrag.o t/stest.o gettime.o mutex.o
>> smalloc.o t/log.o t/ieee754.o lib/ieee754.o t/log.o lib/ieee754.o
>> lib/rand.o lib/zipf.o t/genzipf.o t/axmap.o lib/lfsr.o lib/axmap.o fio
>> t/stest t/ieee754 t/genzipf t/axmap core.* core FIO-VERSION-FILE
>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>> V=1
>> cross_prefix=~/development/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-gcc
>> UNAME=Android
>> build android
>> FIO_VERSION = fio-2.0.13
>> build android
>> gcc -MM -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG gettime.c
>> fio.c ioengines.c init.c stat.c log.c time.c filesetup.c eta.c
>> verify.c memory.c io_u.c parse.c mutex.c options.c rbtree.c smalloc.c
>> filehash.c profile.c debug.c lib/rand.c lib/num2str.c lib/ieee754.c
>> crc/crc16.c crc/crc32.c crc/crc32c.c crc/crc32c-intel.c crc/crc64.c
>> crc/crc7.c crc/md5.c crc/sha1.c crc/sha256.c crc/sha512.c
>> engines/cpu.c engines/mmap.c engines/sync.c engines/null.c
>> engines/net.c memalign.c server.c client.c iolog.c backend.c libfio.c
>> flow.c json.c lib/zipf.c lib/axmap.c lib/lfsr.c gettime-thread.c
>> diskutil.c fifo.c blktrace.c trim.c profiles/tiobench.c 1> .depend
>> gcc -o gettime.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG gettime.c
>> gcc -o fio.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG fio.c
>> gcc -o ioengines.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG ioengines.c
>> gcc -o init.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c init.c
>> gcc -o stat.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG stat.c
>> gcc -o log.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG log.c
>> gcc -o time.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG time.c
>> gcc -o filesetup.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG filesetup.c
>> gcc -o eta.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG eta.c
>> gcc -o verify.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG verify.c
>> gcc -o memory.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG memory.c
>> gcc -o io_u.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG io_u.c
>> gcc -o parse.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG parse.c
>> gcc -o mutex.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG mutex.c
>> gcc -o options.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG options.c
>> gcc -o rbtree.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG rbtree.c
>> gcc -o smalloc.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG smalloc.c
>> gcc -o filehash.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG filehash.c
>> gcc -o profile.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG profile.c
>> gcc -o debug.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG debug.c
>> gcc -o lib/rand.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG lib/rand.c
>> gcc -o lib/num2str.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG lib/num2str.c
>> gcc -o lib/ieee754.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG lib/ieee754.c
>> gcc -o crc/crc16.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/crc16.c
>> gcc -o crc/crc32.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/crc32.c
>> gcc -o crc/crc32c.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/crc32c.c
>> gcc -o crc/crc32c-intel.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/crc32c-intel.c
>> gcc -o crc/crc64.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/crc64.c
>> gcc -o crc/crc7.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/crc7.c
>> gcc -o crc/md5.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/md5.c
>> gcc -o crc/sha1.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/sha1.c
>> gcc -o crc/sha256.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/sha256.c
>> gcc -o crc/sha512.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG crc/sha512.c
>> gcc -o engines/cpu.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG engines/cpu.c
>> gcc -o engines/mmap.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG engines/mmap.c
>> gcc -o engines/sync.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG engines/sync.c
>> gcc -o engines/null.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG engines/null.c
>> gcc -o engines/net.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG engines/net.c
>> gcc -o memalign.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG memalign.c
>> gcc -o server.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG server.c
>> gcc -o client.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG client.c
>> gcc -o iolog.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG iolog.c
>> gcc -o backend.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG backend.c
>> gcc -o libfio.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG libfio.c
>> gcc -o flow.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG flow.c
>> gcc -o json.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG json.c
>> gcc -o lib/zipf.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG lib/zipf.c
>> gcc -o lib/axmap.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG lib/axmap.c
>> gcc -o lib/lfsr.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG lib/lfsr.c
>> gcc -o gettime-thread.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG gettime-thread.c
>> gcc -o diskutil.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG diskutil.c
>> gcc -o fifo.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG fifo.c
>> gcc -o blktrace.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG blktrace.c
>> gcc -o trim.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG trim.c
>> gcc -o profiles/tiobench.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>> -DFIO_INC_DEBUG profiles/tiobench.c
>> gcc -rdynamic -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>> -DFIO_VERSION='"fio-2.0.13"' -o fio gettime.o fio.o ioengines.o init.o
>> stat.o log.o time.o filesetup.o eta.o verify.o memory.o io_u.o parse.o
>> mutex.o options.o rbtree.o smalloc.o filehash.o profile.o debug.o
>> lib/rand.o lib/num2str.o lib/ieee754.o crc/crc16.o crc/crc32.o
>> crc/crc32c.o crc/crc32c-intel.o crc/crc64.o crc/crc7.o crc/md5.o
>> crc/sha1.o crc/sha256.o crc/sha512.o engines/cpu.o engines/mmap.o
>> engines/sync.o engines/null.o engines/net.o memalign.o server.o
>> client.o iolog.o backend.o libfio.o flow.o json.o lib/zipf.o
>> lib/axmap.o lib/lfsr.o gettime-thread.o diskutil.o fifo.o blktrace.o
>> trim.o profiles/tiobench.o -lm  -ldl -lpthread -lrt -ldl -rdynamic
>> backend.o: In function `thread_main':
>> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
>> undefined reference to `cgroup_shutdown'
>> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
>> undefined reference to `cgroup_setup'
>> backend.o: In function `fio_backend':
>> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
>> undefined reference to `cgroup_kill'
>> collect2: ld returned 1 exit status
>> make: *** [fio] Error 1
>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
>>
>>
>> On Tue, Feb 12, 2013 at 1:43 AM, Aaron Carroll <aaronc@cse.unsw.edu.au>
>> wrote:
>>>
>>> On 12/02/13 5:34 PM, David N wrote:
>>>>
>>>> Here's the output, Aaron. Still the same. Than you!!!
>>>>
>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>>>> clean
>>>> rm -f .depend gettime.o fio.o ioengines.o init.o stat.o log.o time.o
>>>> filesetup.o eta.o verify.o memory.o io_u.o parse.o mutex.o options.o
>>>> rbtree.o smalloc.o filehash.o profile.o debug.o lib/rand.o
>>>> lib/num2str.o lib/ieee754.o crc/crc16.o crc/crc32.o crc/crc32c.o
>>>> crc/crc32c-intel.o crc/crc64.o crc/crc7.o crc/md5.o crc/sha1.o
>>>> crc/sha256.o crc/sha512.o engines/cpu.o engines/mmap.o engines/sync.o
>>>> engines/null.o engines/net.o memalign.o server.o client.o iolog.o
>>>> backend.o libfio.o flow.o json.o lib/zipf.o lib/axmap.o lib/lfsr.o
>>>> gettime-thread.o diskutil.o fifo.o blktrace.o helpers.o cgroup.o
>>>> trim.o engines/libaio.o engines/posixaio.o engines/sg.o
>>>> engines/splice.o engines/syslet-rw.o engines/guasi.o engines/binject.o
>>>> engines/rdma.o profiles/tiobench.o engines/fusion-aw.o
>>>> engines/falloc.o engines/e4defrag.o t/stest.o gettime.o mutex.o
>>>> smalloc.o t/log.o t/ieee754.o lib/ieee754.o t/log.o lib/ieee754.o
>>>> lib/rand.o lib/zipf.o t/genzipf.o t/axmap.o lib/lfsr.o lib/axmap.o fio
>>>> t/stest t/ieee754 t/genzipf t/axmap core.* core FIO-VERSION-FILE
>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ make
>>>> V=1 UNAME=Android
>>>
>>>
>>> David,
>>>
>>> You missed the cross_prefix part.  That also explains why you had to add
>>> -lpthread: you're using half the x86 build system and half Android.
>>>
>>>      -- Aaron
>>>
>>>
>>>
>>>
>>>> build android
>>>> FIO_VERSION = fio-2.0.13
>>>> build android
>>>> gcc -MM -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG gettime.c
>>>> fio.c ioengines.c init.c stat.c log.c time.c filesetup.c eta.c
>>>> verify.c memory.c io_u.c parse.c mutex.c options.c rbtree.c smalloc.c
>>>> filehash.c profile.c debug.c lib/rand.c lib/num2str.c lib/ieee754.c
>>>> crc/crc16.c crc/crc32.c crc/crc32c.c crc/crc32c-intel.c crc/crc64.c
>>>> crc/crc7.c crc/md5.c crc/sha1.c crc/sha256.c crc/sha512.c
>>>> engines/cpu.c engines/mmap.c engines/sync.c engines/null.c
>>>> engines/net.c memalign.c server.c client.c iolog.c backend.c libfio.c
>>>> flow.c json.c lib/zipf.c lib/axmap.c lib/lfsr.c gettime-thread.c
>>>> diskutil.c fifo.c blktrace.c trim.c profiles/tiobench.c 1> .depend
>>>> gcc -o gettime.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG gettime.c
>>>> gcc -o fio.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG fio.c
>>>> gcc -o ioengines.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG ioengines.c
>>>> gcc -o init.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c init.c
>>>> gcc -o stat.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG stat.c
>>>> gcc -o log.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG log.c
>>>> gcc -o time.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG time.c
>>>> gcc -o filesetup.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG filesetup.c
>>>> gcc -o eta.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG eta.c
>>>> gcc -o verify.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG verify.c
>>>> gcc -o memory.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG memory.c
>>>> gcc -o io_u.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG io_u.c
>>>> gcc -o parse.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG parse.c
>>>> gcc -o mutex.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG mutex.c
>>>> gcc -o options.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG options.c
>>>> gcc -o rbtree.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG rbtree.c
>>>> gcc -o smalloc.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG smalloc.c
>>>> gcc -o filehash.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG filehash.c
>>>> gcc -o profile.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG profile.c
>>>> gcc -o debug.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG debug.c
>>>> gcc -o lib/rand.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG lib/rand.c
>>>> gcc -o lib/num2str.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG lib/num2str.c
>>>> gcc -o lib/ieee754.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG lib/ieee754.c
>>>> gcc -o crc/crc16.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG crc/crc16.c
>>>> gcc -o crc/crc32.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG crc/crc32.c
>>>> gcc -o crc/crc32c.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG crc/crc32c.c
>>>> gcc -o crc/crc32c-intel.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG crc/crc32c-intel.c
>>>> gcc -o crc/crc64.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG crc/crc64.c
>>>> gcc -o crc/crc7.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG crc/crc7.c
>>>> gcc -o crc/md5.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG crc/md5.c
>>>> gcc -o crc/sha1.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG crc/sha1.c
>>>> gcc -o crc/sha256.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG crc/sha256.c
>>>> gcc -o crc/sha512.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG crc/sha512.c
>>>> gcc -o engines/cpu.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG engines/cpu.c
>>>> gcc -o engines/mmap.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG engines/mmap.c
>>>> gcc -o engines/sync.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG engines/sync.c
>>>> gcc -o engines/null.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG engines/null.c
>>>> gcc -o engines/net.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG engines/net.c
>>>> gcc -o memalign.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG memalign.c
>>>> gcc -o server.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG server.c
>>>> gcc -o client.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG client.c
>>>> gcc -o iolog.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG iolog.c
>>>> gcc -o backend.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG backend.c
>>>> gcc -o libfio.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>>   -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG libfio.c
>>>> gcc -o flow.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG flow.c
>>>> gcc -o json.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG json.c
>>>> gcc -o lib/zipf.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG lib/zipf.c
>>>> gcc -o lib/axmap.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG lib/axmap.c
>>>> gcc -o lib/lfsr.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG lib/lfsr.c
>>>> gcc -o gettime-thread.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG gettime-thread.c
>>>> gcc -o diskutil.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG diskutil.c
>>>> gcc -o fifo.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG fifo.c
>>>> gcc -o blktrace.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG blktrace.c
>>>> gcc -o trim.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE
>>>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG trim.c
>>>> gcc -o profiles/tiobench.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g
>>>> -ffast-math  -DFIO_VERSION='"fio-2.0.13"' -D_GNU_SOURCE
>>>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
>>>> -DFIO_INC_DEBUG profiles/tiobench.c
>>>> gcc -rdynamic -std=gnu99 -Wwrite-strings -Wall -O3 -g -ffast-math
>>>> -DFIO_VERSION='"fio-2.0.13"' -o fio gettime.o fio.o ioengines.o init.o
>>>> stat.o log.o time.o filesetup.o eta.o verify.o memory.o io_u.o parse.o
>>>> mutex.o options.o rbtree.o smalloc.o filehash.o profile.o debug.o
>>>> lib/rand.o lib/num2str.o lib/ieee754.o crc/crc16.o crc/crc32.o
>>>> crc/crc32c.o crc/crc32c-intel.o crc/crc64.o crc/crc7.o crc/md5.o
>>>> crc/sha1.o crc/sha256.o crc/sha512.o engines/cpu.o engines/mmap.o
>>>> engines/sync.o engines/null.o engines/net.o memalign.o server.o
>>>> client.o iolog.o backend.o libfio.o flow.o json.o lib/zipf.o
>>>> lib/axmap.o lib/lfsr.o gettime-thread.o diskutil.o fifo.o blktrace.o
>>>> trim.o profiles/tiobench.o -lm  -ldl -lpthread -lrt -ldl -rdynamic
>>>> backend.o: In function `thread_main':
>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
>>>> undefined reference to `cgroup_shutdown'
>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
>>>> undefined reference to `cgroup_setup'
>>>> backend.o: In function `fio_backend':
>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
>>>> undefined reference to `cgroup_kill'
>>>> collect2: ld returned 1 exit status
>>>> make: *** [fio] Error 1
>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
>>>>
>>>>
>>>> On Tue, Feb 12, 2013 at 1:27 AM, Aaron Carroll <aaronc@cse.unsw.edu.au>
>>>> wrote:
>>>>>
>>>>> On 12/02/13 5:20 PM, David N wrote:
>>>>>>
>>>>>> Aaron,
>>>>>>
>>>>>> I added -lpthread in the Makefile and most of the errors disappeared.
>>>>>> This is left:
>>>>>>
>>>>>> backend.o: In function `thread_main':
>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
>>>>>> undefined reference to `cgroup_shutdown'
>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
>>>>>> undefined reference to `cgroup_setup'
>>>>>> backend.o: In function `fio_backend':
>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
>>>>>> undefined reference to `cgroup_kill'
>>>>>> collect2: ld returned 1 exit status
>>>>>> make: *** [fio] Error 1
>>>>>
>>>>>
>>>>> Somehow FIO_HAVE_CGROUPS got defined... perhaps you need a make clean.
>>>>> Again, please use V=1 in your make line when posting errors.
>>>>>
>>>>> Thanks,
>>>>>    -- Aaron
>>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Feb 12, 2013 at 12:58 AM, Aaron Carroll
>>>>>> <aaronc@cse.unsw.edu.au> wrote:
>>>>>>>
>>>>>>> David,
>>>>>>>
>>>>>>> On 12/02/13 4:39 PM, David N wrote:
>>>>>>>>
>>>>>>>> Thanks much for your help. I still get following errors. Do you have
>>>>>>>> any idea where the problem can be?
>>>>>>>
>>>>>>>
>>>>>>> I've not seen that problem before.  I wonder if adding -lpthread to
>>>>>>> the
>>>>>>> linker flags might fix it?
>>>>>>>
>>>>>>> Try adding "V=1" to the make arguments and post the failing command.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>     -- Aaron
>>>>>>>
>>>>>>>
>>>>>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
>>>>>>>> make
>>>>>>>>
>>>>>>>> cross_prefix=~/development/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin
>>>>>>>> UNAME=Android
>>>>>>>> FIO_VERSION = fio-2.0.132
>>>>>>>>      DEP .depend
>>>>>>>>      CC gettime.o
>>>>>>>>      CC fio.o
>>>>>>>>      CC ioengines.o
>>>>>>>>      CC init.o
>>>>>>>>      CC stat.o
>>>>>>>>      CC log.o
>>>>>>>>      CC time.o
>>>>>>>>      CC filesetup.o
>>>>>>>>      CC eta.o
>>>>>>>>      CC verify.o
>>>>>>>>      CC memory.o
>>>>>>>>      CC io_u.o
>>>>>>>>      CC parse.o
>>>>>>>>      CC mutex.o
>>>>>>>>      CC options.o
>>>>>>>>      CC rbtree.o
>>>>>>>>      CC smalloc.o
>>>>>>>>      CC filehash.o
>>>>>>>>      CC profile.o
>>>>>>>>      CC debug.o
>>>>>>>>      CC lib/rand.o
>>>>>>>>      CC lib/num2str.o
>>>>>>>>      CC lib/ieee754.o
>>>>>>>>      CC crc/crc16.o
>>>>>>>>      CC crc/crc32.o
>>>>>>>>      CC crc/crc32c.o
>>>>>>>>      CC crc/crc32c-intel.o
>>>>>>>>      CC crc/crc64.o
>>>>>>>>      CC crc/crc7.o
>>>>>>>>      CC crc/md5.o
>>>>>>>>      CC crc/sha1.o
>>>>>>>>      CC crc/sha256.o
>>>>>>>>      CC crc/sha512.o
>>>>>>>>      CC engines/cpu.o
>>>>>>>>      CC engines/mmap.o
>>>>>>>>      CC engines/sync.o
>>>>>>>>      CC engines/null.o
>>>>>>>>      CC engines/net.o
>>>>>>>>      CC memalign.o
>>>>>>>>      CC server.o
>>>>>>>>      CC client.o
>>>>>>>>      CC iolog.o
>>>>>>>>      CC backend.o
>>>>>>>>      CC libfio.o
>>>>>>>>      CC flow.o
>>>>>>>>      CC json.o
>>>>>>>>      CC lib/zipf.o
>>>>>>>>      CC lib/axmap.o
>>>>>>>>      CC lib/lfsr.o
>>>>>>>>      CC gettime-thread.o
>>>>>>>>      CC diskutil.o
>>>>>>>>      CC fifo.o
>>>>>>>>      CC blktrace.o
>>>>>>>>      CC trim.o
>>>>>>>>      CC profiles/tiobench.o
>>>>>>>>      CC fio
>>>>>>>> verify.o: In function `verify_async_init':
>>>>>>>> /home/david/development/android/external/fio-2.0.13/verify.c:1091:
>>>>>>>> undefined reference to `pthread_attr_setstacksize'
>>>>>>>> /home/david/development/android/external/fio-2.0.13/verify.c:1104:
>>>>>>>> undefined reference to `pthread_detach'
>>>>>>>> /home/david/development/android/external/fio-2.0.13/verify.c:1097:
>>>>>>>> undefined reference to `pthread_create'
>>>>>>>> gettime.o: In function `fio_gettime':
>>>>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:152:
>>>>>>>> undefined reference to `pthread_getspecific'
>>>>>>>> gettime.o: In function `fio_local_clock_init':
>>>>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:295:
>>>>>>>> undefined reference to `pthread_setspecific'
>>>>>>>> gettime.o: In function `fio_clock_init':
>>>>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:309:
>>>>>>>> undefined reference to `pthread_key_create'
>>>>>>>> gettime.o: In function `fio_monotonic_clocktest':
>>>>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:492:
>>>>>>>> undefined reference to `pthread_create'
>>>>>>>> /home/david/development/android/external/fio-2.0.13/gettime.c:511:
>>>>>>>> undefined reference to `pthread_join'
>>>>>>>> stat.o: In function `show_running_run_stats':
>>>>>>>> /home/david/development/android/external/fio-2.0.13/stat.c:1388:
>>>>>>>> undefined reference to `pthread_create'
>>>>>>>> /home/david/development/android/external/fio-2.0.13/stat.c:1389:
>>>>>>>> undefined reference to `pthread_detach'
>>>>>>>> mutex.o: In function `fio_mutex_init':
>>>>>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:44:
>>>>>>>> undefined reference to `pthread_mutexattr_init'
>>>>>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:54:
>>>>>>>> undefined reference to `pthread_mutexattr_setpshared'
>>>>>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:63:
>>>>>>>> undefined reference to `pthread_condattr_setpshared'
>>>>>>>> /home/david/development/android/external/fio-2.0.13/mutex.c:74:
>>>>>>>> undefined reference to `pthread_mutexattr_destroy'
>>>>>>>> backend.o: In function `thread_main':
>>>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1299:
>>>>>>>> undefined reference to `cgroup_shutdown'
>>>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1142:
>>>>>>>> undefined reference to `cgroup_setup'
>>>>>>>> backend.o: In function `run_threads':
>>>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1568:
>>>>>>>> undefined reference to `pthread_create'
>>>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1576:
>>>>>>>> undefined reference to `pthread_detach'
>>>>>>>> backend.o: In function `create_disk_util_thread':
>>>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1724:
>>>>>>>> undefined reference to `pthread_create'
>>>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1731:
>>>>>>>> undefined reference to `pthread_detach'
>>>>>>>> backend.o: In function `fio_backend':
>>>>>>>> /home/david/development/android/external/fio-2.0.13/backend.c:1794:
>>>>>>>> undefined reference to `cgroup_kill'
>>>>>>>> gettime-thread.o: In function `fio_start_gtod_thread':
>>>>>>>>
>>>>>>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:56:
>>>>>>>> undefined reference to `pthread_attr_setstacksize'
>>>>>>>>
>>>>>>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:57:
>>>>>>>> undefined reference to `pthread_create'
>>>>>>>>
>>>>>>>> /home/david/development/android/external/fio-2.0.13/gettime-thread.c:64:
>>>>>>>> undefined reference to `pthread_detach'
>>>>>>>> collect2: ld returned 1 exit status
>>>>>>>> make: *** [fio] Error 1
>>>>>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$ ~~
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Feb 11, 2013 at 8:53 PM, Aaron Carroll
>>>>>>>> <aaronc@cse.unsw.edu.au> wrote:
>>>>>>>>>
>>>>>>>>> On 12/02/13 4:25 AM, Jens Axboe wrote:
>>>>>>>>>>
>>>>>>>>>> On Mon, Feb 11 2013, David N wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hello Everyone,
>>>>>>>>>>>
>>>>>>>>>>> I've been trying to compile FIO for Android but keep getting
>>>>>>>>>>> error
>>>>>>>>>>> bellow. Can anybody give me any guidance please?
>>>>>>>>>>>
>>>>>>>>>>> I very much appreciate!
>>>>>>>>>>>
>>>>>>>>>>> David
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> david@david-HP-ubuntu:~/development/android/external/fio-2.0.13$
>>>>>>>>>>> make
>>>>>>>>>>> UNAME=Android CROSS_COMPILE=$CCOMPILER
>>>>>>>>>>>      CC init.o
>>>>>>>>>>> init.c: In function �free_shm�:
>>>>>>>>>>> init.c:224:18: error: storage size of �sbuf� isn�t known
>>>>>>>>>>> init.c:233:3: warning: implicit declaration of function �shmdt�
>>>>>>>>>>> [-Wimplicit-function-declaration]
>>>>>>>>>>> init.c:234:3: warning: implicit declaration of function �shmctl�
>>>>>>>>>>> [-Wimplicit-function-declaration]
>>>>>>>>>>> init.c:224:18: warning: unused variable �sbuf�
>>>>>>>>>>> [-Wunused-variable]
>>>>>>>>>>> init.c: In function �setup_thread_area�:
>>>>>>>>>>> init.c:263:3: warning: implicit declaration of function �shmget�
>>>>>>>>>>> [-Wimplicit-function-declaration]
>>>>>>>>>>> init.c:277:2: warning: implicit declaration of function �shmat�
>>>>>>>>>>> [-Wimplicit-function-declaration]
>>>>>>>>>>> init.c:277:10: warning: assignment makes pointer from integer
>>>>>>>>>>> without
>>>>>>>>>>> a cast [enabled by default]
>>>>>>>>>>> make: *** [init.o] Error 1
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Lets CC in Aaron, who added the port.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> The switch to configure broke Android.  I got a very minimal build
>>>>>>>>> working with the attached patch and:
>>>>>>>>>
>>>>>>>>>    make
>>>>>>>>> cross_prefix=~/dev/android-toolchain-r8c/bin/arm-linux-androideabi-
>>>>>>>>> UNAME=Android
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Hope that helps,
>>>>>>>>>    -- Aaron
>>>>>>>>>
>>>>>>>
>>>>>
>>>
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-02-13  5:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CACTzACVkfEmHrCTJExxOpPqD7tZLMbmW7n3pJza-g87sZaaK1g@mail.gmail.com>
2013-02-11 16:13 ` problem FIO compiling for Android David N
2013-02-11 17:25   ` Jens Axboe
2013-02-12  1:53     ` Aaron Carroll
2013-02-12  5:39       ` David N
2013-02-12  5:58         ` Aaron Carroll
2013-02-12  6:20           ` David N
2013-02-12  6:27             ` Aaron Carroll
2013-02-12  6:34               ` David N
2013-02-12  6:43                 ` Aaron Carroll
2013-02-12  6:55                   ` David N
2013-02-13  1:12                     ` Aaron Carroll
2013-02-13  5:13                       ` David N
2013-02-12  8:57       ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox