All of lore.kernel.org
 help / color / mirror / Atom feed
* FIO 2.0.14 - getting a compile error on opensuse
@ 2013-03-25 18:44 Greg Freemyer
  2013-03-26 21:15 ` Jens Axboe
  2013-03-27  3:57 ` Aaron Carroll
  0 siblings, 2 replies; 11+ messages in thread
From: Greg Freemyer @ 2013-03-25 18:44 UTC (permalink / raw)
  To: fio

All,

fio v2.0.13 compiled fine on opensuse.

fio v2.0.14 is failing on opensuse (multiple releases including 12.3
and factory).  I assume because of the new configure logic.

A full build log is at:
https://build.opensuse.org/package/live_build_log?arch=x86_64&package=fio&project=home%3Agregfreemyer%3Abranches%3Abenchmark&repository=openSUSE_Factory

But this is the basic error which happens on the first gcc call.

[   48s] gcc -o gettime.o -std=gnu99 -Wwrite-strings -Wall
-fomit-frame-pointer -fmessage-length=0 -grecord-gcc-switches -O2
-Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -DBITS_PER_LONG=32
-DFIO_VERSION='"fio-2.0.14"' -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c
gettime.c
[   48s] In file included from os/os.h:28:0,
[   48s]                  from fio.h:24,
[   48s]                  from gettime.c:10:
[   48s] os/os-linux.h: In function 'fio_cpuset_init':
[   48s] os/os-linux.h:67:2: warning: implicit declaration of function
'CPU_ZERO' [-Wimplicit-function-declaration]
[   48s] In file included from os/os.h:60:0,
[   48s]                  from fio.h:24,
[   48s]                  from gettime.c:10:
[   48s] os/../lib/strsep.h: At top level:
[   48s] os/../lib/strsep.h:4:7: error: expected identifier or '('
before '__extension__'
[   48s] os/../lib/strsep.h:4:7: error: expected identifier or '('
before ')' token
[   48s] In file included from fio.h:32:0,
[   48s]                  from gettime.c:10:
[   48s] helpers.h:11:36: error: unknown type name 'off64_t'
[   48s] helpers.h:11:52: error: unknown type name 'off64_t'
[   48s] make: *** [gettime.o] Error 1
[   48s] error: Bad exit status from /var/tmp/rpm-tmp.QKC5od (%build)

Thanks
Greg

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

* Re: FIO 2.0.14 - getting a compile error on opensuse
  2013-03-25 18:44 FIO 2.0.14 - getting a compile error on opensuse Greg Freemyer
@ 2013-03-26 21:15 ` Jens Axboe
  2013-03-26 22:00   ` Greg Freemyer
  2013-03-27  3:57 ` Aaron Carroll
  1 sibling, 1 reply; 11+ messages in thread
From: Jens Axboe @ 2013-03-26 21:15 UTC (permalink / raw)
  To: Greg Freemyer; +Cc: fio

On Mon, Mar 25 2013, Greg Freemyer wrote:
> All,
> 
> fio v2.0.13 compiled fine on opensuse.
> 
> fio v2.0.14 is failing on opensuse (multiple releases including 12.3
> and factory).  I assume because of the new configure logic.
> 
> A full build log is at:
> https://build.opensuse.org/package/live_build_log?arch=x86_64&package=fio&project=home%3Agregfreemyer%3Abranches%3Abenchmark&repository=openSUSE_Factory
> 
> But this is the basic error which happens on the first gcc call.
> 
> [   48s] gcc -o gettime.o -std=gnu99 -Wwrite-strings -Wall
> -fomit-frame-pointer -fmessage-length=0 -grecord-gcc-switches -O2
> -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
> -fasynchronous-unwind-tables -DBITS_PER_LONG=32
> -DFIO_VERSION='"fio-2.0.14"' -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c
> gettime.c
> [   48s] In file included from os/os.h:28:0,
> [   48s]                  from fio.h:24,
> [   48s]                  from gettime.c:10:
> [   48s] os/os-linux.h: In function 'fio_cpuset_init':
> [   48s] os/os-linux.h:67:2: warning: implicit declaration of function
> 'CPU_ZERO' [-Wimplicit-function-declaration]
> [   48s] In file included from os/os.h:60:0,
> [   48s]                  from fio.h:24,
> [   48s]                  from gettime.c:10:
> [   48s] os/../lib/strsep.h: At top level:
> [   48s] os/../lib/strsep.h:4:7: error: expected identifier or '('
> before '__extension__'
> [   48s] os/../lib/strsep.h:4:7: error: expected identifier or '('
> before ')' token
> [   48s] In file included from fio.h:32:0,
> [   48s]                  from gettime.c:10:
> [   48s] helpers.h:11:36: error: unknown type name 'off64_t'
> [   48s] helpers.h:11:52: error: unknown type name 'off64_t'
> [   48s] make: *** [gettime.o] Error 1
> [   48s] error: Bad exit status from /var/tmp/rpm-tmp.QKC5od (%build)

Odd. Could you send me the config.log output? I don't have an opensuse
install, unfortunately. If you have one that is reachable from the
outside, send me a private reply and perhaps I could investigate myself.

-- 
Jens Axboe


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

* Re: FIO 2.0.14 - getting a compile error on opensuse
  2013-03-26 21:15 ` Jens Axboe
@ 2013-03-26 22:00   ` Greg Freemyer
  0 siblings, 0 replies; 11+ messages in thread
From: Greg Freemyer @ 2013-03-26 22:00 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

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

On Tue, Mar 26, 2013 at 5:15 PM, Jens Axboe <axboe@kernel.dk> wrote:
> On Mon, Mar 25 2013, Greg Freemyer wrote:
>> All,
>>
>> fio v2.0.13 compiled fine on opensuse.
>>
>> fio v2.0.14 is failing on opensuse (multiple releases including 12.3
>> and factory).  I assume because of the new configure logic.
>>
>> A full build log is at:
>> https://build.opensuse.org/package/live_build_log?arch=x86_64&package=fio&project=home%3Agregfreemyer%3Abranches%3Abenchmark&repository=openSUSE_Factory
>>
>> But this is the basic error which happens on the first gcc call.
>>
>> [   48s] gcc -o gettime.o -std=gnu99 -Wwrite-strings -Wall
>> -fomit-frame-pointer -fmessage-length=0 -grecord-gcc-switches -O2
>> -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
>> -fasynchronous-unwind-tables -DBITS_PER_LONG=32
>> -DFIO_VERSION='"fio-2.0.14"' -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c
>> gettime.c
>> [   48s] In file included from os/os.h:28:0,
>> [   48s]                  from fio.h:24,
>> [   48s]                  from gettime.c:10:
>> [   48s] os/os-linux.h: In function 'fio_cpuset_init':
>> [   48s] os/os-linux.h:67:2: warning: implicit declaration of function
>> 'CPU_ZERO' [-Wimplicit-function-declaration]
>> [   48s] In file included from os/os.h:60:0,
>> [   48s]                  from fio.h:24,
>> [   48s]                  from gettime.c:10:
>> [   48s] os/../lib/strsep.h: At top level:
>> [   48s] os/../lib/strsep.h:4:7: error: expected identifier or '('
>> before '__extension__'
>> [   48s] os/../lib/strsep.h:4:7: error: expected identifier or '('
>> before ')' token
>> [   48s] In file included from fio.h:32:0,
>> [   48s]                  from gettime.c:10:
>> [   48s] helpers.h:11:36: error: unknown type name 'off64_t'
>> [   48s] helpers.h:11:52: error: unknown type name 'off64_t'
>> [   48s] make: *** [gettime.o] Error 1
>> [   48s] error: Bad exit status from /var/tmp/rpm-tmp.QKC5od (%build)
>
> Odd. Could you send me the config.log output? I don't have an opensuse
> install, unfortunately. If you have one that is reachable from the
> outside, send me a private reply and perhaps I could investigate myself.
>
> --
> Jens Axboe
>

Jens,

I'm building within a chroot environment with a minimal set of
packages installed.  It could easily be that I just need to install
some more header files, etc.  Note, that all opensuse packages shipped
as part of the distro all built inside a chroot environment and I'm
using the standard distro tools to do this.

The only "buildrequires" commands I'm using are:

BuildRequires:  gcc
BuildRequires:  libaio-devel
BuildRequires:  make

fio 2.0.13 builds fine with the same specfile and buildrequires lines.

I attached config.log

Greg

[-- Attachment #2: config.log --]
[-- Type: application/octet-stream, Size: 6144 bytes --]

# FIO configure log Mon Mar 25 18:04:58 UTC 2013
# Configured with: './configure'
#
gcc -D_GNU_SOURCE -c -o /tmp/fio-conf-2672-22678-29174.o /tmp/fio-conf-29770-22678-29039.c
/tmp/fio-conf-29770-22678-29039.c:2:2: error: #error __ANDROID__ not defined
gcc -D_GNU_SOURCE -c -o /tmp/fio-conf-2672-22678-29174.o /tmp/fio-conf-29770-22678-29039.c
gcc -D_GNU_SOURCE -c -o /tmp/fio-conf-2672-22678-29174.o /tmp/fio-conf-29770-22678-29039.c
Compiling test case endian
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case wordsize
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case libaio
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c -laio
Compiling test case posixaio
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
/tmp/ccCb6on4.o: In function `main':
fio-conf-29770-22678-29039.c:(.text+0x14): undefined reference to `aio_read'
collect2: error: ld returned 1 exit status
Compiling test case posixaio
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c -lrt
Compiling test case posix_aio_fsync
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c -lrt -laio
Compiling test case solarisaio
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c -laio
/tmp/fio-conf-29770-22678-29039.c:2:24: fatal error: sys/asynch.h: No such file or directory
compilation terminated.
Compiling test case __sync_fetch_and_add()
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case libverbs
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c -libverbs
/tmp/fio-conf-29770-22678-29039.c:2:29: fatal error: infiniband/arch.h: No such file or directory
compilation terminated.
Compiling test case rdma
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c -lrdmacm
/tmp/fio-conf-29770-22678-29039.c:2:27: fatal error: rdma/rdma_cma.h: No such file or directory
compilation terminated.
Compiling test case linux_fallocate
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case posix_fadvise
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case posix_fallocate
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case sched_setaffinity(,,)
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case clock_gettime
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case clock monotonic
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c -lrt -laio
Compiling test case clock monotonic precise
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c -lrt -laio
/tmp/fio-conf-29770-22678-29039.c: In function 'main':
/tmp/fio-conf-29770-22678-29039.c:5:24: error: 'CLOCK_MONOTONIC_PRECISE' undeclared (first use in this function)
/tmp/fio-conf-29770-22678-29039.c:5:24: note: each undeclared identifier is reported only once for each function it appears in
Compiling test case gettimeofday
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case fdatasync
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case sync_file_range
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case ext4 move extent
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
/tmp/fio-conf-29770-22678-29039.c: In function 'main':
/tmp/fio-conf-29770-22678-29039.c:5:22: error: storage size of 'me' isn't known
/tmp/fio-conf-29770-22678-29039.c:6:19: error: 'EXT4_IOC_MOVE_EXT' undeclared (first use in this function)
/tmp/fio-conf-29770-22678-29039.c:6:19: note: each undeclared identifier is reported only once for each function it appears in
Compiling test case linux splice
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case guasi
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
/tmp/fio-conf-29770-22678-29039.c:1:19: fatal error: guasi.h: No such file or directory
compilation terminated.
Compiling test case fusion-aw
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c -L/usr/lib/fio -lnvm-primitives
/tmp/fio-conf-29770-22678-29039.c:1:32: fatal error: nvm/vectored_write.h: No such file or directory
compilation terminated.
Compiling test case libnuma
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c -lnuma
/tmp/fio-conf-29770-22678-29039.c:1:18: fatal error: numa.h: No such file or directory
compilation terminated.
Compiling test case strsep
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case getopt_long_only
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case inet_aton
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case socklen_t
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case __thread
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case RUSAGE_THREAD
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case SCHED_IDLE
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c
Compiling test case TCP_NODELAY
gcc -D_GNU_SOURCE -o /tmp/fio-conf-25493-22678-29178.exe /tmp/fio-conf-29770-22678-29039.c


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

* Re: FIO 2.0.14 - getting a compile error on opensuse
  2013-03-25 18:44 FIO 2.0.14 - getting a compile error on opensuse Greg Freemyer
  2013-03-26 21:15 ` Jens Axboe
@ 2013-03-27  3:57 ` Aaron Carroll
  2013-03-28 21:21   ` Jens Axboe
  1 sibling, 1 reply; 11+ messages in thread
From: Aaron Carroll @ 2013-03-27  3:57 UTC (permalink / raw)
  To: Greg Freemyer; +Cc: fio

On 26 March 2013 05:44, Greg Freemyer <greg.freemyer@gmail.com> wrote:
> But this is the basic error which happens on the first gcc call.
>
> [   48s] gcc -o gettime.o -std=gnu99 -Wwrite-strings -Wall
> -fomit-frame-pointer -fmessage-length=0 -grecord-gcc-switches -O2
> -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
> -fasynchronous-unwind-tables -DBITS_PER_LONG=32
> -DFIO_VERSION='"fio-2.0.14"' -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c
> gettime.c

Something has happened to the CFLAGS -- you're missing -D_GNU_SOURCE
which is needed for the definition of CPU_ZERO.

I can get the same behaviour with:
   make EXTFLAGS=
but then I got confused looking at the Makefile. I don't understand
how that ever works, since EXTFLAGS is used before it's defined.


    -- Aaron

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

* Re: FIO 2.0.14 - getting a compile error on opensuse
  2013-03-27  3:57 ` Aaron Carroll
@ 2013-03-28 21:21   ` Jens Axboe
  2013-03-28 23:35     ` Greg Freemyer
  0 siblings, 1 reply; 11+ messages in thread
From: Jens Axboe @ 2013-03-28 21:21 UTC (permalink / raw)
  To: Aaron Carroll; +Cc: Greg Freemyer, fio

On Wed, Mar 27 2013, Aaron Carroll wrote:
> On 26 March 2013 05:44, Greg Freemyer <greg.freemyer@gmail.com> wrote:
> > But this is the basic error which happens on the first gcc call.
> >
> > [   48s] gcc -o gettime.o -std=gnu99 -Wwrite-strings -Wall
> > -fomit-frame-pointer -fmessage-length=0 -grecord-gcc-switches -O2
> > -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
> > -fasynchronous-unwind-tables -DBITS_PER_LONG=32
> > -DFIO_VERSION='"fio-2.0.14"' -D_LARGEFILE_SOURCE
> > -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c
> > gettime.c
> 
> Something has happened to the CFLAGS -- you're missing -D_GNU_SOURCE
> which is needed for the definition of CPU_ZERO.
> 
> I can get the same behaviour with:
>    make EXTFLAGS=
> but then I got confused looking at the Makefile. I don't understand
> how that ever works, since EXTFLAGS is used before it's defined.

This should (hopefully) improve the situation. Greg, can you test with
this?

diff --git a/Makefile b/Makefile
index ea96a89..cae07c3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,3 @@
-DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
-CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS)
-OPTFLAGS= -O3 -g -ffast-math $(EXTFLAGS)
-CFLAGS	= -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS)
-LIBS	= -lm $(EXTLIBS)
-PROGS	= fio
-SCRIPTS = fio_generate_plots
-
 ifneq ($(wildcard config-host.mak),)
 all:
 include config-host.mak
@@ -20,6 +12,14 @@ all:
 include config-host.mak
 endif
 
+DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
+CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS)
+OPTFLAGS= -O3 -g -ffast-math $(EXTFLAGS) $(BUILD_CFLAGS)
+CFLAGS	= -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS)
+LIBS	= -lm $(EXTLIBS)
+PROGS	= fio
+SCRIPTS = fio_generate_plots
+
 SOURCE := 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 \
diff --git a/configure b/configure
index 836d7ad..13cf8d5 100755
--- a/configure
+++ b/configure
@@ -39,7 +39,7 @@ fatal() {
 
 # Default CFLAGS
 CFLAGS="-D_GNU_SOURCE"
-EXTFLAGS="-include config-host.h"
+BUILD_CFLAGS="-include config-host.h"
 
 # Print a helpful header at the top of config.log
 echo "# FIO configure log $(date)" >> config.log
@@ -230,7 +230,7 @@ CYGWIN*)
   output_sym "CONFIG_SCHED_IDLE"
   output_sym "CONFIG_TCP_NODELAY"
   echo "CC=$CC" >> $config_host_mak
-  echo "EXTFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
+  echo "BUILD_CFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
   exit 0
   ;;
 esac
@@ -1088,4 +1088,4 @@ fi
 
 echo "LIBS+=$LIBS" >> $config_host_mak
 echo "CC=$cc" >> $config_host_mak
-echo "EXTFLAGS=$EXTFLAGS $CFLAGS" >> $config_host_mak
+echo "BUILD_CFLAGS=$BUILD_CFLAGS $CFLAGS" >> $config_host_mak

-- 
Jens Axboe


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

* Re: FIO 2.0.14 - getting a compile error on opensuse
  2013-03-28 21:21   ` Jens Axboe
@ 2013-03-28 23:35     ` Greg Freemyer
  2013-03-29 13:40       ` Jens Axboe
  0 siblings, 1 reply; 11+ messages in thread
From: Greg Freemyer @ 2013-03-28 23:35 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Aaron Carroll, fio

Jens,

It didn't apply?  There was one missing line in Makefile and hunk
offsets in configure.

Did you diff to fio-2.0.14?

I got my copy via: wget http://brick.kernel.dk/snaps/fio-2.0.14.tar.bz2

My workspace is at
https://build.opensuse.org/package/show?package=fio&project=home%3Agregfreemyer%3Abranches%3Abenchmark

I fixed the patch and you can see it in the workspace.  I assume I did
what you wanted it, but it fails the same basic way:

===
[    6s] gcc -o gettime.o -std=gnu99 -Wwrite-strings -Wall
-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2
-fstack-protector -funwind-tables -fasynchronous-unwind-tables
-DBITS_PER_LONG=32 -DFIO_VERSION='"fio-2.0.14"' -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c
gettime.c
[    6s] In file included from os/os.h:28:0,
[    6s]                  from fio.h:24,
[    6s]                  from gettime.c:10:
[    6s] os/os-linux.h: In function 'fio_cpuset_init':
[    6s] os/os-linux.h:67:2: warning: implicit declaration of function
'CPU_ZERO' [-Wimplicit-function-declaration]
[    6s] In file included from os/os.h:60:0,
[    6s]                  from fio.h:24,
[    6s]                  from gettime.c:10:
[    6s] os/../lib/strsep.h: At top level:
[    6s] os/../lib/strsep.h:4:7: error: expected identifier or '('
before '__extension__'
[    6s] os/../lib/strsep.h:4:7: error: expected identifier or '('
before ')' token
[    6s] In file included from fio.h:32:0,
[    6s]                  from gettime.c:10:
[    6s] helpers.h:11:36: error: unknown type name 'off64_t'
[    6s] helpers.h:11:52: error: unknown type name 'off64_t'
[    6s] make: *** [gettime.o] Error 1
===




This is the patch I actually used:

============
--- fio-2.0.14-orig/configure   2013-02-21 13:12:32.000000000 -0500
+++ fio-2.0.14/configure        2013-03-28 19:19:13.503041144 -0400
@@ -39,7 +39,7 @@ fatal() {

 # Default CFLAGS
 CFLAGS="-D_GNU_SOURCE"
-EXTFLAGS="-include config-host.h"
+BUILD_CFLAGS="-include config-host.h"

 # Print a helpful header at the top of config.log
 echo "# FIO configure log $(date)" >> config.log
@@ -222,7 +222,7 @@ CYGWIN*)
   output_sym "CONFIG_SCHED_IDLE"
   output_sym "CONFIG_TCP_NODELAY"
   echo "CC=$CC" >> $config_host_mak
-  echo "EXTFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >>
$config_host_mak
+  echo "BUILD_CFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >>
$config_host_mak
   exit 0
   ;;
 Android)
@@ -1020,4 +1020,4 @@ fi

 echo "LIBS+=$LIBS" >> $config_host_mak
 echo "CC=$cc" >> $config_host_mak
-echo "EXTFLAGS=$EXTFLAGS $CFLAGS" >> $config_host_mak
+echo "BUILD_CFLAGS=$BUILD_CFLAGS $CFLAGS" >> $config_host_mak
diff -rupN fio-2.0.14-orig/Makefile fio-2.0.14/Makefile
--- fio-2.0.14-orig/Makefile    2013-02-21 13:12:32.000000000 -0500
+++ fio-2.0.14/Makefile 2013-03-28 19:19:38.442051864 -0400
@@ -1,11 +1,3 @@
-DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
-CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS)
-OPTFLAGS= -O3 -g -ffast-math $(EXTFLAGS)
-CFLAGS = -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS)
-LIBS   = -lm $(EXTLIBS)
-PROGS  = fio
-SCRIPTS = fio_generate_plots
-UNAME  := $(shell uname)

 ifneq ($(wildcard config-host.mak),)
 all:
@@ -21,6 +13,15 @@ all:
 include config-host.mak
 endif

+DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
+CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS)
+OPTFLAGS= -O3 -g -ffast-math $(EXTFLAGS) $(BUILD_CFLAGS)
+CFLAGS = -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS)
+LIBS   = -lm $(EXTLIBS)
+PROGS  = fio
+SCRIPTS = fio_generate_plots
+UNAME  := $(shell uname)
+
 SOURCE := 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 \
===========

Greg

On Thu, Mar 28, 2013 at 5:21 PM, Jens Axboe <axboe@kernel.dk> wrote:
> On Wed, Mar 27 2013, Aaron Carroll wrote:
>> On 26 March 2013 05:44, Greg Freemyer <greg.freemyer@gmail.com> wrote:
>> > But this is the basic error which happens on the first gcc call.
>> >
>> > [   48s] gcc -o gettime.o -std=gnu99 -Wwrite-strings -Wall
>> > -fomit-frame-pointer -fmessage-length=0 -grecord-gcc-switches -O2
>> > -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
>> > -fasynchronous-unwind-tables -DBITS_PER_LONG=32
>> > -DFIO_VERSION='"fio-2.0.14"' -D_LARGEFILE_SOURCE
>> > -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c
>> > gettime.c
>>
>> Something has happened to the CFLAGS -- you're missing -D_GNU_SOURCE
>> which is needed for the definition of CPU_ZERO.
>>
>> I can get the same behaviour with:
>>    make EXTFLAGS=
>> but then I got confused looking at the Makefile. I don't understand
>> how that ever works, since EXTFLAGS is used before it's defined.
>
> This should (hopefully) improve the situation. Greg, can you test with
> this?
>
> diff --git a/Makefile b/Makefile
> index ea96a89..cae07c3 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1,11 +1,3 @@
> -DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
> -CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS)
> -OPTFLAGS= -O3 -g -ffast-math $(EXTFLAGS)
> -CFLAGS = -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS)
> -LIBS   = -lm $(EXTLIBS)
> -PROGS  = fio
> -SCRIPTS = fio_generate_plots
> -
>  ifneq ($(wildcard config-host.mak),)
>  all:
>  include config-host.mak
> @@ -20,6 +12,14 @@ all:
>  include config-host.mak
>  endif
>
> +DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
> +CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS)
> +OPTFLAGS= -O3 -g -ffast-math $(EXTFLAGS) $(BUILD_CFLAGS)
> +CFLAGS = -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS)
> +LIBS   = -lm $(EXTLIBS)
> +PROGS  = fio
> +SCRIPTS = fio_generate_plots
> +
>  SOURCE := 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 \
> diff --git a/configure b/configure
> index 836d7ad..13cf8d5 100755
> --- a/configure
> +++ b/configure
> @@ -39,7 +39,7 @@ fatal() {
>
>  # Default CFLAGS
>  CFLAGS="-D_GNU_SOURCE"
> -EXTFLAGS="-include config-host.h"
> +BUILD_CFLAGS="-include config-host.h"
>
>  # Print a helpful header at the top of config.log
>  echo "# FIO configure log $(date)" >> config.log
> @@ -230,7 +230,7 @@ CYGWIN*)
>    output_sym "CONFIG_SCHED_IDLE"
>    output_sym "CONFIG_TCP_NODELAY"
>    echo "CC=$CC" >> $config_host_mak
> -  echo "EXTFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
> +  echo "BUILD_CFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
>    exit 0
>    ;;
>  esac
> @@ -1088,4 +1088,4 @@ fi
>
>  echo "LIBS+=$LIBS" >> $config_host_mak
>  echo "CC=$cc" >> $config_host_mak
> -echo "EXTFLAGS=$EXTFLAGS $CFLAGS" >> $config_host_mak
> +echo "BUILD_CFLAGS=$BUILD_CFLAGS $CFLAGS" >> $config_host_mak
>
> --
> Jens Axboe
>


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

* Re: FIO 2.0.14 - getting a compile error on opensuse
  2013-03-28 23:35     ` Greg Freemyer
@ 2013-03-29 13:40       ` Jens Axboe
  2013-03-29 14:14         ` Greg Freemyer
  0 siblings, 1 reply; 11+ messages in thread
From: Jens Axboe @ 2013-03-29 13:40 UTC (permalink / raw)
  To: Greg Freemyer; +Cc: Aaron Carroll, fio

On Thu, Mar 28 2013, Greg Freemyer wrote:
> Jens,
> 
> It didn't apply?  There was one missing line in Makefile and hunk
> offsets in configure.
> 
> Did you diff to fio-2.0.14?
> 
> I got my copy via: wget http://brick.kernel.dk/snaps/fio-2.0.14.tar.bz2

No, I always diff against the git tree.

> My workspace is at
> https://build.opensuse.org/package/show?package=fio&project=home%3Agregfreemyer%3Abranches%3Abenchmark
> 
> I fixed the patch and you can see it in the workspace.  I assume I did
> what you wanted it, but it fails the same basic way:
> 
> ===
> [    6s] gcc -o gettime.o -std=gnu99 -Wwrite-strings -Wall
> -fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2
> -fstack-protector -funwind-tables -fasynchronous-unwind-tables
> -DBITS_PER_LONG=32 -DFIO_VERSION='"fio-2.0.14"' -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c
> gettime.c
> [    6s] In file included from os/os.h:28:0,
> [    6s]                  from fio.h:24,
> [    6s]                  from gettime.c:10:
> [    6s] os/os-linux.h: In function 'fio_cpuset_init':
> [    6s] os/os-linux.h:67:2: warning: implicit declaration of function
> 'CPU_ZERO' [-Wimplicit-function-declaration]
> [    6s] In file included from os/os.h:60:0,
> [    6s]                  from fio.h:24,
> [    6s]                  from gettime.c:10:
> [    6s] os/../lib/strsep.h: At top level:
> [    6s] os/../lib/strsep.h:4:7: error: expected identifier or '('
> before '__extension__'
> [    6s] os/../lib/strsep.h:4:7: error: expected identifier or '('
> before ')' token
> [    6s] In file included from fio.h:32:0,
> [    6s]                  from gettime.c:10:
> [    6s] helpers.h:11:36: error: unknown type name 'off64_t'
> [    6s] helpers.h:11:52: error: unknown type name 'off64_t'
> [    6s] make: *** [gettime.o] Error 1
> ===

So the same issue. I have no idea what is happening in your build
environment. How are you invoking make? There must be some arguments,
since it's doing a verbose build.

-- 
Jens Axboe


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

* Re: FIO 2.0.14 - getting a compile error on opensuse
  2013-03-29 13:40       ` Jens Axboe
@ 2013-03-29 14:14         ` Greg Freemyer
  2013-03-29 14:54           ` Jens Axboe
  0 siblings, 1 reply; 11+ messages in thread
From: Greg Freemyer @ 2013-03-29 14:14 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Aaron Carroll, fio

Greg Freemyer
Chief Technology Officer
Intelligent Avatar Corporation

(678) 653-4860
Greg.Freemyer@gmail.com
http://www.linkedin.com/in/gregfreemyer
CNN/TruTV Aired Forensic Imaging Demo -
   http://insession.blogs.cnn.com/2010/03/23/how-computer-evidence-gets-retrieved/


On Fri, Mar 29, 2013 at 9:40 AM, Jens Axboe <axboe@kernel.dk> wrote:
> On Thu, Mar 28 2013, Greg Freemyer wrote:
>> Jens,
>>
>> It didn't apply?  There was one missing line in Makefile and hunk
>> offsets in configure.
>>
>> Did you diff to fio-2.0.14?
>>
>> I got my copy via: wget http://brick.kernel.dk/snaps/fio-2.0.14.tar.bz2
>
> No, I always diff against the git tree.
>

Here's the portion of the build log starting with the make invocation:
 (I notice that it is complaining about config-host.mak missing.  That
is probably the source of the problem, but I'll let you comment on
that.)

==================
/usr/bin/make V=1 'OPTFLAGS=-fmessage-length=0 -O2 -Wall
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables' CC=gcc prefix=/usr libdir=/usr/lib64/fio
mandir=/usr/share/man
[   34s] Makefile:13: config-host.mak: No such file or directory
[   35s] FIO_VERSION = fio-2.0.14
[   35s] Running configure for you...
[   36s] Operating system              Linux
[   36s] CPU                           x86_64
[   36s] Big endian                    no
[   36s] Compiler                      gcc
[   36s]
[   36s] Wordsize                      64
[   36s] Linux AIO support             yes
[   37s] POSIX AIO support             yes
[   37s] POSIX AIO support needs -lrt  yes
[   37s] POSIX AIO fsync               yes
[   37s] Solaris AIO support           no
[   37s] __sync_fetch_and add          yes
[   37s] libverbs                      no
[   37s] rdmacm                        no
[   37s] Linux fallocate               yes
[   38s] POSIX fadvise                 yes
[   38s] POSIX fallocate               yes
[   38s] sched_setaffinity(3 arg)      yes
[   38s] sched_setaffinity(2 arg)      no
[   38s] clock_gettime                 yes
[   39s] CLOCK_MONOTONIC               yes
[   39s] CLOCK_MONOTONIC_PRECISE       no
[   39s] gettimeofday                  yes
[   39s] fdatasync                     yes
[   39s] sync_file_range               yes
[   39s] EXT4 move extent              yes
[   40s] Linux splice(2)               yes
[   40s] GUASI                         no
[   40s] Fusion-io atomic engine       no
[   40s] libnuma                       no
[   40s] strsep                        yes
[   40s] getopt_long_only()            yes
[   40s] inet_aton                     yes
[   41s] socklen_t                     yes
[   41s] __thread                      yes
[   41s] RUSAGE_THREAD                 yes
[   41s] SCHED_IDLE                    yes
[   42s] TCP_NODELAY                   yes
[   42s] gcc -o gettime.o -std=gnu99 -Wwrite-strings -Wall
-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-funwind-tables -fasynchronous-unwind-tables -DBITS_PER_LONG=64
-DFIO_VERSION='"fio-2.0.14"' -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c
gettime.c
[   42s] In file included from os/os.h:28:0,
[   42s]                  from fio.h:24,
[   42s]                  from gettime.c:10:
[   42s] os/os-linux.h: In function 'fio_cpuset_init':
[   42s] os/os-linux.h:67:2: warning: implicit declaration of function
'CPU_ZERO' [-Wimplicit-function-declaration]
[   42s] In file included from os/os.h:60:0,
[   42s]                  from fio.h:24,
[   42s]                  from gettime.c:10:
[   42s] os/../lib/strsep.h: At top level:
[   42s] os/../lib/strsep.h:4:7: error: expected identifier or '('
before '__extension__'
[   42s] os/../lib/strsep.h:4:7: error: expected identifier or '('
before ')' token
[   42s] In file included from fio.h:32:0,
[   42s]                  from gettime.c:10:
[   42s] helpers.h:11:36: error: unknown type name 'off64_t'
[   42s] helpers.h:11:52: error: unknown type name 'off64_t'
[   42s] make: *** [gettime.o] Error 1
[   42s] error: Bad exit status from /var/tmp/rpm-tmp.4n6SDR (%build)
[   42s]

===========

Greg


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

* Re: FIO 2.0.14 - getting a compile error on opensuse
  2013-03-29 14:14         ` Greg Freemyer
@ 2013-03-29 14:54           ` Jens Axboe
  2013-03-29 15:31             ` Greg Freemyer
  0 siblings, 1 reply; 11+ messages in thread
From: Jens Axboe @ 2013-03-29 14:54 UTC (permalink / raw)
  To: Greg Freemyer; +Cc: Aaron Carroll, fio

On Fri, Mar 29 2013, Greg Freemyer wrote:
> Greg Freemyer
> Chief Technology Officer
> Intelligent Avatar Corporation
> 
> (678) 653-4860
> Greg.Freemyer@gmail.com
> http://www.linkedin.com/in/gregfreemyer
> CNN/TruTV Aired Forensic Imaging Demo -
>    http://insession.blogs.cnn.com/2010/03/23/how-computer-evidence-gets-retrieved/
> 
> 
> On Fri, Mar 29, 2013 at 9:40 AM, Jens Axboe <axboe@kernel.dk> wrote:
> > On Thu, Mar 28 2013, Greg Freemyer wrote:
> >> Jens,
> >>
> >> It didn't apply?  There was one missing line in Makefile and hunk
> >> offsets in configure.
> >>
> >> Did you diff to fio-2.0.14?
> >>
> >> I got my copy via: wget http://brick.kernel.dk/snaps/fio-2.0.14.tar.bz2
> >
> > No, I always diff against the git tree.
> >
> 
> Here's the portion of the build log starting with the make invocation:
>  (I notice that it is complaining about config-host.mak missing.  That
> is probably the source of the problem, but I'll let you comment on
> that.)

OK, so it's OPTFLAGS reuse. The below should conform more to regular
builds, can you test that?

diff --git a/Makefile b/Makefile
index ea96a89..27e82c6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,3 @@
-DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
-CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS)
-OPTFLAGS= -O3 -g -ffast-math $(EXTFLAGS)
-CFLAGS	= -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS)
-LIBS	= -lm $(EXTLIBS)
-PROGS	= fio
-SCRIPTS = fio_generate_plots
-
 ifneq ($(wildcard config-host.mak),)
 all:
 include config-host.mak
@@ -20,6 +12,14 @@ all:
 include config-host.mak
 endif
 
+DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
+CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS)
+OPTFLAGS= -O3 -g -ffast-math
+CFLAGS	= -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS) $(EXTFLAGS) $(BUILD_CFLAGS)
+LIBS	+= -lm $(EXTLIBS)
+PROGS	= fio
+SCRIPTS = fio_generate_plots
+
 SOURCE := 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 \
diff --git a/configure b/configure
index 836d7ad..a3c51fb 100755
--- a/configure
+++ b/configure
@@ -38,8 +38,8 @@ fatal() {
 }
 
 # Default CFLAGS
-CFLAGS="-D_GNU_SOURCE"
-EXTFLAGS="-include config-host.h"
+CFLAGS="-D_GNU_SOURCE -include config-host.h"
+BUILD_CFLAGS=""
 
 # Print a helpful header at the top of config.log
 echo "# FIO configure log $(date)" >> config.log
@@ -230,7 +230,7 @@ CYGWIN*)
   output_sym "CONFIG_SCHED_IDLE"
   output_sym "CONFIG_TCP_NODELAY"
   echo "CC=$CC" >> $config_host_mak
-  echo "EXTFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
+  echo "BUILD_CFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
   exit 0
   ;;
 esac
@@ -1088,4 +1088,4 @@ fi
 
 echo "LIBS+=$LIBS" >> $config_host_mak
 echo "CC=$cc" >> $config_host_mak
-echo "EXTFLAGS=$EXTFLAGS $CFLAGS" >> $config_host_mak
+echo "BUILD_CFLAGS=$BUILD_CFLAGS $CFLAGS" >> $config_host_mak

-- 
Jens Axboe


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

* Re: FIO 2.0.14 - getting a compile error on opensuse
  2013-03-29 14:54           ` Jens Axboe
@ 2013-03-29 15:31             ` Greg Freemyer
  2013-03-29 15:44               ` Jens Axboe
  0 siblings, 1 reply; 11+ messages in thread
From: Greg Freemyer @ 2013-03-29 15:31 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Aaron Carroll, fio

>> On Fri, Mar 29, 2013 at 9:40 AM, Jens Axboe <axboe@kernel.dk> wrote:
>> > On Thu, Mar 28 2013, Greg Freemyer wrote:
>> >> Jens,
>> >>
>> >> It didn't apply?  There was one missing line in Makefile and hunk
>> >> offsets in configure.
>> >>
>> >> Did you diff to fio-2.0.14?
>> >>
>> >> I got my copy via: wget http://brick.kernel.dk/snaps/fio-2.0.14.tar.bz2
>> >
>> > No, I always diff against the git tree.
>> >
>>
>> Here's the portion of the build log starting with the make invocation:
>>  (I notice that it is complaining about config-host.mak missing.  That
>> is probably the source of the problem, but I'll let you comment on
>> that.)
>
> OK, so it's OPTFLAGS reuse. The below should conform more to regular
> builds, can you test that?
>
> diff --git a/Makefile b/Makefile
> index ea96a89..27e82c6 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1,11 +1,3 @@
> -DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
> -CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS)
> -OPTFLAGS= -O3 -g -ffast-math $(EXTFLAGS)
> -CFLAGS = -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS)
> -LIBS   = -lm $(EXTLIBS)
> -PROGS  = fio
> -SCRIPTS = fio_generate_plots
> -
>  ifneq ($(wildcard config-host.mak),)
>  all:
>  include config-host.mak
> @@ -20,6 +12,14 @@ all:
>  include config-host.mak
>  endif
>
> +DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
> +CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS)
> +OPTFLAGS= -O3 -g -ffast-math
> +CFLAGS = -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS) $(EXTFLAGS) $(BUILD_CFLAGS)
> +LIBS   += -lm $(EXTLIBS)
> +PROGS  = fio
> +SCRIPTS = fio_generate_plots
> +
>  SOURCE := 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 \
> diff --git a/configure b/configure
> index 836d7ad..a3c51fb 100755
> --- a/configure
> +++ b/configure
> @@ -38,8 +38,8 @@ fatal() {
>  }
>
>  # Default CFLAGS
> -CFLAGS="-D_GNU_SOURCE"
> -EXTFLAGS="-include config-host.h"
> +CFLAGS="-D_GNU_SOURCE -include config-host.h"
> +BUILD_CFLAGS=""
>
>  # Print a helpful header at the top of config.log
>  echo "# FIO configure log $(date)" >> config.log
> @@ -230,7 +230,7 @@ CYGWIN*)
>    output_sym "CONFIG_SCHED_IDLE"
>    output_sym "CONFIG_TCP_NODELAY"
>    echo "CC=$CC" >> $config_host_mak
> -  echo "EXTFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
> +  echo "BUILD_CFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
>    exit 0
>    ;;
>  esac
> @@ -1088,4 +1088,4 @@ fi
>
>  echo "LIBS+=$LIBS" >> $config_host_mak
>  echo "CC=$cc" >> $config_host_mak
> -echo "EXTFLAGS=$EXTFLAGS $CFLAGS" >> $config_host_mak
> +echo "BUILD_CFLAGS=$BUILD_CFLAGS $CFLAGS" >> $config_host_mak
>
> --
> Jens Axboe
>

That did the trick.

Thanks


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

* Re: FIO 2.0.14 - getting a compile error on opensuse
  2013-03-29 15:31             ` Greg Freemyer
@ 2013-03-29 15:44               ` Jens Axboe
  0 siblings, 0 replies; 11+ messages in thread
From: Jens Axboe @ 2013-03-29 15:44 UTC (permalink / raw)
  To: Greg Freemyer; +Cc: Aaron Carroll, fio

On Fri, Mar 29 2013, Greg Freemyer wrote:
> >> On Fri, Mar 29, 2013 at 9:40 AM, Jens Axboe <axboe@kernel.dk> wrote:
> >> > On Thu, Mar 28 2013, Greg Freemyer wrote:
> >> >> Jens,
> >> >>
> >> >> It didn't apply?  There was one missing line in Makefile and hunk
> >> >> offsets in configure.
> >> >>
> >> >> Did you diff to fio-2.0.14?
> >> >>
> >> >> I got my copy via: wget http://brick.kernel.dk/snaps/fio-2.0.14.tar.bz2
> >> >
> >> > No, I always diff against the git tree.
> >> >
> >>
> >> Here's the portion of the build log starting with the make invocation:
> >>  (I notice that it is complaining about config-host.mak missing.  That
> >> is probably the source of the problem, but I'll let you comment on
> >> that.)
> >
> > OK, so it's OPTFLAGS reuse. The below should conform more to regular
> > builds, can you test that?
> >
> > diff --git a/Makefile b/Makefile
> > index ea96a89..27e82c6 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1,11 +1,3 @@
> > -DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
> > -CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS)
> > -OPTFLAGS= -O3 -g -ffast-math $(EXTFLAGS)
> > -CFLAGS = -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS)
> > -LIBS   = -lm $(EXTLIBS)
> > -PROGS  = fio
> > -SCRIPTS = fio_generate_plots
> > -
> >  ifneq ($(wildcard config-host.mak),)
> >  all:
> >  include config-host.mak
> > @@ -20,6 +12,14 @@ all:
> >  include config-host.mak
> >  endif
> >
> > +DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
> > +CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS)
> > +OPTFLAGS= -O3 -g -ffast-math
> > +CFLAGS = -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS) $(EXTFLAGS) $(BUILD_CFLAGS)
> > +LIBS   += -lm $(EXTLIBS)
> > +PROGS  = fio
> > +SCRIPTS = fio_generate_plots
> > +
> >  SOURCE := 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 \
> > diff --git a/configure b/configure
> > index 836d7ad..a3c51fb 100755
> > --- a/configure
> > +++ b/configure
> > @@ -38,8 +38,8 @@ fatal() {
> >  }
> >
> >  # Default CFLAGS
> > -CFLAGS="-D_GNU_SOURCE"
> > -EXTFLAGS="-include config-host.h"
> > +CFLAGS="-D_GNU_SOURCE -include config-host.h"
> > +BUILD_CFLAGS=""
> >
> >  # Print a helpful header at the top of config.log
> >  echo "# FIO configure log $(date)" >> config.log
> > @@ -230,7 +230,7 @@ CYGWIN*)
> >    output_sym "CONFIG_SCHED_IDLE"
> >    output_sym "CONFIG_TCP_NODELAY"
> >    echo "CC=$CC" >> $config_host_mak
> > -  echo "EXTFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
> > +  echo "BUILD_CFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
> >    exit 0
> >    ;;
> >  esac
> > @@ -1088,4 +1088,4 @@ fi
> >
> >  echo "LIBS+=$LIBS" >> $config_host_mak
> >  echo "CC=$cc" >> $config_host_mak
> > -echo "EXTFLAGS=$EXTFLAGS $CFLAGS" >> $config_host_mak
> > +echo "BUILD_CFLAGS=$BUILD_CFLAGS $CFLAGS" >> $config_host_mak
> >
> > --
> > Jens Axboe
> >
> 
> That did the trick.

Goodie, committed.

-- 
Jens Axboe


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

end of thread, other threads:[~2013-03-29 15:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-25 18:44 FIO 2.0.14 - getting a compile error on opensuse Greg Freemyer
2013-03-26 21:15 ` Jens Axboe
2013-03-26 22:00   ` Greg Freemyer
2013-03-27  3:57 ` Aaron Carroll
2013-03-28 21:21   ` Jens Axboe
2013-03-28 23:35     ` Greg Freemyer
2013-03-29 13:40       ` Jens Axboe
2013-03-29 14:14         ` Greg Freemyer
2013-03-29 14:54           ` Jens Axboe
2013-03-29 15:31             ` Greg Freemyer
2013-03-29 15:44               ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.