diff mbox

fwts compiling source on RHEL 6.7 and some issues

Message ID 56B4C09B.6070600@canonical.com
State Rejected
Headers show

Commit Message

Colin Ian King Feb. 5, 2016, 3:32 p.m. UTC
I installed an ancient gcc-4.4 and reproduced the issue. Can you try
apply the following patch, this should get around your build issue.

I don't intend to carry this patch with the stardard release as we're
using newer versions of gcc that support forward typedef declarations.

Colin


On 05/02/16 14:53, Deborah McLemore wrote:
> [root@oc4334883646 fwts]# rpm -qa gcc
> gcc-4.4.7-16.el6.x86_64
> 
> ================================
> Deb McLemore
> IBM OpenPower - IBM Systems
> (512) 286 9980
> debmc@us.ibm.com
> ipowermc@icloud.com
> ================================
> 
> Inactive hide details for Colin Ian King ---02/05/2016 08:42:25 AM---On
> 05/02/16 14:31, Deborah McLemore wrote: > Hi All,Colin Ian King
> ---02/05/2016 08:42:25 AM---On 05/02/16 14:31, Deborah McLemore wrote: >
> Hi All,
> 
> From: Colin Ian King <colin.king@canonical.com>
> To: Deborah McLemore/Austin/IBM@IBMUS, fwts-devel@lists.ubuntu.com
> Date: 02/05/2016 08:42 AM
> Subject: Re: fwts compiling source on RHEL 6.7 and some issues
> 
> ------------------------------------------------------------------------
> 
> 
> 
> On 05/02/16 14:31, Deborah McLemore wrote:
>> Hi All,
>>
>> My previous post had some trial edits/changes, so I reset back to the
>> fwts master origin and this was the original issue found.
>>
>> I'm new to fwts, I cloned the fwts git tree and setup my laptop running
>> RHEL 6.7 to build the source tree, it doesn't compile.
>>
>> Issue hit is the following, any suggestions or known issues on doing
> this ?
> 
> This is new to me.  Which version of GCC are you using?
> 
>>
>> [root@oc4334883646 fwts]# make
>> make all-recursive
>> make[1]: Entering directory `/home/debmc/fwts'
>> Making all in src
>> make[2]: Entering directory `/home/debmc/fwts/src'
>> Making all in acpica/source/compiler
>> make[3]: Entering directory `/home/debmc/fwts/src/acpica/source/compiler'
>> make all-am
>> make[4]: Entering directory `/home/debmc/fwts/src/acpica/source/compiler'
>> make[4]: Nothing to be done for `all-am'.
>> make[4]: Leaving directory `/home/debmc/fwts/src/acpica/source/compiler'
>> make[3]: Leaving directory `/home/debmc/fwts/src/acpica/source/compiler'
>> Making all in lib
>> make[3]: Entering directory `/home/debmc/fwts/src/lib'
>> Making all in src
>> make[4]: Entering directory `/home/debmc/fwts/src/lib/src'
>> /bin/sh ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
>> -I../../.. -I../../../src/lib/include
>> -I../../../src/acpica/source/include
>> -I../../../src/acpica/source/compiler `pkg-config --silence-errors
>> --cflags json` `pkg-config --silence-errors --cflags json-c` `pkg-config
>> --cflags glib-2.0 gio-2.0` -DDATAROOTDIR=\"/usr/local/share\" -Wall
>> -Werror -Wextra -DACPI_DEBUG_OUTPUT -g -O2 -MT
>> libfwts_la-fwts_ac_adapter.lo -MD -MP -MF
>> .deps/libfwts_la-fwts_ac_adapter.Tpo -c -o libfwts_la-fwts_ac_adapter.lo
>> `test -f 'fwts_ac_adapter.c' || echo './'`fwts_ac_adapter.c
>> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../..
>> -I../../../src/lib/include -I../../../src/acpica/source/include
>> -I../../../src/acpica/source/compiler -I/usr/include/json-c
>> -I/usr/include/json-c -pthread -I/usr/include/glib-2.0
>> -I/usr/lib64/glib-2.0/include -DDATAROOTDIR=\"/usr/local/share\" -Wall
>> -Werror -Wextra -DACPI_DEBUG_OUTPUT -g -O2 -MT
>> libfwts_la-fwts_ac_adapter.lo -MD -MP -MF
>> .deps/libfwts_la-fwts_ac_adapter.Tpo -c fwts_ac_adapter.c -fPIC -DPIC -o
>> .libs/libfwts_la-fwts_ac_adapter.o
>> cc1: warnings being treated as errors
>> In file included from ../../../src/lib/include/fwts_framework.h:29,
>> from ../../../src/lib/include/fwts_binpaths.h:27,
>> from ../../../src/lib/include/fwts.h:40,
>> from fwts_ac_adapter.c:19:
>> ../../../src/lib/include/fwts_log.h:127: error: type defaults to ‘int’
>> in declaration of ‘fwts_framework’
>> ../../../src/lib/include/fwts_log.h:127: error: expected ‘;’, ‘,’ or ‘)’
>> before ‘*’ token
>> make[4]: *** [libfwts_la-fwts_ac_adapter.lo] Error 1
>> make[4]: Leaving directory `/home/debmc/fwts/src/lib/src'
>> make[3]: *** [all-recursive] Error 1
>> make[3]: Leaving directory `/home/debmc/fwts/src/lib'
>> make[2]: *** [all-recursive] Error 1
>> make[2]: Leaving directory `/home/debmc/fwts/src'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory `/home/debmc/fwts'
>> make: *** [all] Error 2
>>
>>
>>
>>
>>
>> ================================
>> Deb McLemore
>> IBM OpenPower - IBM Systems
>> (512) 286 9980
>> debmc@us.ibm.com
>> ipowermc@icloud.com
>> ================================
>>
>>
> 
> 
> 
>

Comments

Deborah McLemore Feb. 5, 2016, 3:41 p.m. UTC | #1
Perfect thanks!
================================
Deb McLemore
IBM OpenPower - IBM Systems
(512) 286 9980
debmc@us.ibm.com
ipowermc@icloud.com
================================



From:	Colin Ian King <colin.king@canonical.com>
To:	Deborah McLemore/Austin/IBM@IBMUS
Cc:	fwts-devel@lists.ubuntu.com
Date:	02/05/2016 09:32 AM
Subject:	Re: fwts compiling source on RHEL 6.7 and some issues



I installed an ancient gcc-4.4 and reproduced the issue. Can you try
apply the following patch, this should get around your build issue.

I don't intend to carry this patch with the stardard release as we're
using newer versions of gcc that support forward typedef declarations.

Colin


On 05/02/16 14:53, Deborah McLemore wrote:
> [root@oc4334883646 fwts]# rpm -qa gcc

> gcc-4.4.7-16.el6.x86_64

>

> ================================

> Deb McLemore

> IBM OpenPower - IBM Systems

> (512) 286 9980

> debmc@us.ibm.com

> ipowermc@icloud.com

> ================================

>

> Inactive hide details for Colin Ian King ---02/05/2016 08:42:25 AM---On

> 05/02/16 14:31, Deborah McLemore wrote: > Hi All,Colin Ian King

> ---02/05/2016 08:42:25 AM---On 05/02/16 14:31, Deborah McLemore wrote: >

> Hi All,

>

> From: Colin Ian King <colin.king@canonical.com>

> To: Deborah McLemore/Austin/IBM@IBMUS, fwts-devel@lists.ubuntu.com

> Date: 02/05/2016 08:42 AM

> Subject: Re: fwts compiling source on RHEL 6.7 and some issues

>

> ------------------------------------------------------------------------

>

>

>

> On 05/02/16 14:31, Deborah McLemore wrote:

>> Hi All,

>>

>> My previous post had some trial edits/changes, so I reset back to the

>> fwts master origin and this was the original issue found.

>>

>> I'm new to fwts, I cloned the fwts git tree and setup my laptop running

>> RHEL 6.7 to build the source tree, it doesn't compile.

>>

>> Issue hit is the following, any suggestions or known issues on doing

> this ?

>

> This is new to me.  Which version of GCC are you using?

>

>>

>> [root@oc4334883646 fwts]# make

>> make all-recursive

>> make[1]: Entering directory `/home/debmc/fwts'

>> Making all in src

>> make[2]: Entering directory `/home/debmc/fwts/src'

>> Making all in acpica/source/compiler

>> make[3]: Entering directory

`/home/debmc/fwts/src/acpica/source/compiler'
>> make all-am

>> make[4]: Entering directory

`/home/debmc/fwts/src/acpica/source/compiler'
>> make[4]: Nothing to be done for `all-am'.

>> make[4]: Leaving directory `/home/debmc/fwts/src/acpica/source/compiler'

>> make[3]: Leaving directory `/home/debmc/fwts/src/acpica/source/compiler'

>> Making all in lib

>> make[3]: Entering directory `/home/debmc/fwts/src/lib'

>> Making all in src

>> make[4]: Entering directory `/home/debmc/fwts/src/lib/src'

>> /bin/sh ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.

>> -I../../.. -I../../../src/lib/include

>> -I../../../src/acpica/source/include

>> -I../../../src/acpica/source/compiler `pkg-config --silence-errors

>> --cflags json` `pkg-config --silence-errors --cflags json-c` `pkg-config

>> --cflags glib-2.0 gio-2.0` -DDATAROOTDIR=\"/usr/local/share\" -Wall

>> -Werror -Wextra -DACPI_DEBUG_OUTPUT -g -O2 -MT

>> libfwts_la-fwts_ac_adapter.lo -MD -MP -MF

>> .deps/libfwts_la-fwts_ac_adapter.Tpo -c -o libfwts_la-fwts_ac_adapter.lo

>> `test -f 'fwts_ac_adapter.c' || echo './'`fwts_ac_adapter.c

>> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../..

>> -I../../../src/lib/include -I../../../src/acpica/source/include

>> -I../../../src/acpica/source/compiler -I/usr/include/json-c

>> -I/usr/include/json-c -pthread -I/usr/include/glib-2.0

>> -I/usr/lib64/glib-2.0/include -DDATAROOTDIR=\"/usr/local/share\" -Wall

>> -Werror -Wextra -DACPI_DEBUG_OUTPUT -g -O2 -MT

>> libfwts_la-fwts_ac_adapter.lo -MD -MP -MF

>> .deps/libfwts_la-fwts_ac_adapter.Tpo -c fwts_ac_adapter.c -fPIC -DPIC -o

>> .libs/libfwts_la-fwts_ac_adapter.o

>> cc1: warnings being treated as errors

>> In file included from ../../../src/lib/include/fwts_framework.h:29,

>> from ../../../src/lib/include/fwts_binpaths.h:27,

>> from ../../../src/lib/include/fwts.h:40,

>> from fwts_ac_adapter.c:19:

>> ../../../src/lib/include/fwts_log.h:127: error: type defaults to ‘int’

>> in declaration of ‘fwts_framework’

>> ../../../src/lib/include/fwts_log.h:127: error: expected ‘;’, ‘,’ or ‘)’

>> before ‘*’ token

>> make[4]: *** [libfwts_la-fwts_ac_adapter.lo] Error 1

>> make[4]: Leaving directory `/home/debmc/fwts/src/lib/src'

>> make[3]: *** [all-recursive] Error 1

>> make[3]: Leaving directory `/home/debmc/fwts/src/lib'

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

>> make[2]: Leaving directory `/home/debmc/fwts/src'

>> make[1]: *** [all-recursive] Error 1

>> make[1]: Leaving directory `/home/debmc/fwts'

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

>>

>>

>>

>>

>>

>> ================================

>> Deb McLemore

>> IBM OpenPower - IBM Systems

>> (512) 286 9980

>> debmc@us.ibm.com

>> ipowermc@icloud.com

>> ================================

>>

>>

>

>

>

>


[attachment "0001-Fix-build-issue-with-gcc-4.4.patch" deleted by Deborah
McLemore/Austin/IBM]
diff mbox

Patch

From 85652ef53061abec7e9746a6c9ee0f9fcd9301cf Mon Sep 17 00:00:00 2001
From: Colin Ian King <colin.king@canonical.com>
Date: Fri, 5 Feb 2016 15:30:22 +0000
Subject: [PATCH] Fix build issue with gcc-4.4

This is a kludge workaround, I don't indent to support this old
version of gcc for main fwts development work.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/include/fwts_framework.h | 2 +-
 src/lib/include/fwts_log.h       | 2 +-
 src/lib/src/Makefile.am          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/include/fwts_framework.h b/src/lib/include/fwts_framework.h
index c9ea4bb..b23f22b 100644
--- a/src/lib/include/fwts_framework.h
+++ b/src/lib/include/fwts_framework.h
@@ -24,7 +24,7 @@ 
 #include <string.h>
 #include <stdbool.h>
 
-typedef struct fwts_framework fwts_framework;
+struct fwts_framework;
 
 #include "fwts_arch.h"
 #include "fwts_log.h"
diff --git a/src/lib/include/fwts_log.h b/src/lib/include/fwts_log.h
index 847a391..f0cd321 100644
--- a/src/lib/include/fwts_log.h
+++ b/src/lib/include/fwts_log.h
@@ -124,7 +124,7 @@  extern const char *fwts_log_format;
 
 fwts_log *fwts_log_open(const char* owner, const char *name, const char *mode, const fwts_log_type);
 int       fwts_log_close(fwts_log *log);
-int       fwts_log_printf(const fwts_framework *fw, const fwts_log_field field, const fwts_log_level level, const char *status, const char *label, const char *prefix, const char *fmt, ...)
+int       fwts_log_printf(const struct fwts_framework *fw, const fwts_log_field field, const fwts_log_level level, const char *status, const char *label, const char *prefix, const char *fmt, ...)
 	__attribute__((format(printf, 7, 8)));
 void      fwts_log_newline(fwts_log *log);
 void      fwts_log_underline(fwts_log *log, const int ch);
diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
index 5d63804..583159e 100644
--- a/src/lib/src/Makefile.am
+++ b/src/lib/src/Makefile.am
@@ -6,7 +6,7 @@  AM_CPPFLAGS = \
 	`pkg-config --silence-errors --cflags json-c`	\
 	`pkg-config --cflags glib-2.0 gio-2.0` 		\
 	-DDATAROOTDIR=\"$(datarootdir)\"		\
-	-Wall -Werror -Wextra
+	-Wall -Wextra
 
 pkglib_LTLIBRARIES = libfwts.la
 
-- 
1.9.1