[PATCH 0/5] Fix redefinition errors for toolstack libs

Costin Lupu posted 5 patches 2 years, 11 months ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/cover.1619524463.git.costin.lupu@cs.pub.ro
There is a newer version of this series
tools/debugger/kdd/kdd-xen.c                   | 4 ++++
tools/debugger/kdd/kdd.c                       | 4 ++++
tools/libfsimage/ext2fs/fsys_ext2fs.c          | 2 ++
tools/libfsimage/reiserfs/fsys_reiserfs.c      | 2 ++
tools/libs/foreignmemory/private.h             | 6 ++++--
tools/libs/gnttab/linux.c                      | 6 ++++++
tools/ocaml/libs/xc/xenctrl_stubs.c            | 8 ++++++++
tools/ocaml/libs/xentoollog/xentoollog_stubs.c | 4 ++++
tools/ocaml/libs/xl/xenlight_stubs.c           | 4 ++++
9 files changed, 38 insertions(+), 2 deletions(-)
[PATCH 0/5] Fix redefinition errors for toolstack libs
Posted by Costin Lupu 2 years, 11 months ago
For replication I used gcc 10.3 on an Alpine system. In order to replicate the
redefinition error for PAGE_SIZE one should install the 'fortify-headers'
package which will change the chain of included headers by indirectly including
/usr/include/limits.h where PAGE_SIZE and PATH_MAX are defined.

Costin Lupu (5):
  tools/debugger: Fix PAGE_SIZE redefinition error
  tools/libfsimage: Fix PATH_MAX redefinition error
  tools/libs/foreignmemory: Fix PAGE_SIZE redefinition error
  tools/libs/gnttab: Fix PAGE_SIZE redefinition error
  tools/ocaml: Fix redefinition errors

 tools/debugger/kdd/kdd-xen.c                   | 4 ++++
 tools/debugger/kdd/kdd.c                       | 4 ++++
 tools/libfsimage/ext2fs/fsys_ext2fs.c          | 2 ++
 tools/libfsimage/reiserfs/fsys_reiserfs.c      | 2 ++
 tools/libs/foreignmemory/private.h             | 6 ++++--
 tools/libs/gnttab/linux.c                      | 6 ++++++
 tools/ocaml/libs/xc/xenctrl_stubs.c            | 8 ++++++++
 tools/ocaml/libs/xentoollog/xentoollog_stubs.c | 4 ++++
 tools/ocaml/libs/xl/xenlight_stubs.c           | 4 ++++
 9 files changed, 38 insertions(+), 2 deletions(-)

-- 
2.20.1


Re: [PATCH 0/5] Fix redefinition errors for toolstack libs
Posted by Christian Lindig 2 years, 11 months ago

On 27 Apr 2021, at 13:05, Costin Lupu <costin.lupu@cs.pub.ro<mailto:costin.lupu@cs.pub.ro>> wrote:

For replication I used gcc 10.3 on an Alpine system. In order to replicate the
redefinition error for PAGE_SIZE one should install the 'fortify-headers'
package which will change the chain of included headers by indirectly including
/usr/include/limits.h where PAGE_SIZE and PATH_MAX are defined.

Costin Lupu (5):
 tools/debugger: Fix PAGE_SIZE redefinition error
 tools/libfsimage: Fix PATH_MAX redefinition error
 tools/libs/foreignmemory: Fix PAGE_SIZE redefinition error
 tools/libs/gnttab: Fix PAGE_SIZE redefinition error
 tools/ocaml: Fix redefinition errors

tools/debugger/kdd/kdd-xen.c                   | 4 ++++
tools/debugger/kdd/kdd.c                       | 4 ++++
tools/libfsimage/ext2fs/fsys_ext2fs.c          | 2 ++
tools/libfsimage/reiserfs/fsys_reiserfs.c      | 2 ++
tools/libs/foreignmemory/private.h             | 6 ++++--
tools/libs/gnttab/linux.c                      | 6 ++++++
tools/ocaml/libs/xc/xenctrl_stubs.c            | 8 ++++++++
tools/ocaml/libs/xentoollog/xentoollog_stubs.c | 4 ++++
tools/ocaml/libs/xl/xenlight_stubs.c           | 4 ++++
9 files changed, 38 insertions(+), 2 deletions(-)

—
2.20.1


For the OCaml bindings, this avoids redefinitions as you say. Looks good to me.

Acked-by: Christian Lindig <christian.lindig@citrix.com<mailto:christian.lindig@citrix.com>>

Re: [PATCH 0/5] Fix redefinition errors for toolstack libs
Posted by Costin Lupu 2 years, 11 months ago
On 4/28/21 3:34 PM, Christian Lindig wrote:
> 
> 
>> On 27 Apr 2021, at 13:05, Costin Lupu <costin.lupu@cs.pub.ro
>> <mailto:costin.lupu@cs.pub.ro>> wrote:
>>
>> For replication I used gcc 10.3 on an Alpine system. In order to
>> replicate the
>> redefinition error for PAGE_SIZE one should install the 'fortify-headers'
>> package which will change the chain of included headers by indirectly
>> including
>> /usr/include/limits.h where PAGE_SIZE and PATH_MAX are defined.
>>
>> Costin Lupu (5):
>>  tools/debugger: Fix PAGE_SIZE redefinition error
>>  tools/libfsimage: Fix PATH_MAX redefinition error
>>  tools/libs/foreignmemory: Fix PAGE_SIZE redefinition error
>>  tools/libs/gnttab: Fix PAGE_SIZE redefinition error
>>  tools/ocaml: Fix redefinition errors
>>
>> tools/debugger/kdd/kdd-xen.c                   | 4 ++++
>> tools/debugger/kdd/kdd.c                       | 4 ++++
>> tools/libfsimage/ext2fs/fsys_ext2fs.c          | 2 ++
>> tools/libfsimage/reiserfs/fsys_reiserfs.c      | 2 ++
>> tools/libs/foreignmemory/private.h             | 6 ++++--
>> tools/libs/gnttab/linux.c                      | 6 ++++++
>> tools/ocaml/libs/xc/xenctrl_stubs.c            | 8 ++++++++
>> tools/ocaml/libs/xentoollog/xentoollog_stubs.c | 4 ++++
>> tools/ocaml/libs/xl/xenlight_stubs.c           | 4 ++++
>> 9 files changed, 38 insertions(+), 2 deletions(-)
>>
>> —
>> 2.20.1
>>
> 
> For the OCaml bindings, this avoids redefinitions as you say. Looks good
> to me.
> 
> Acked-by: Christian Lindig <christian.lindig@citrix.com
> <mailto:christian.lindig@citrix.com>>
> 

Thanks, Christian, I'll add your ack on the Ocaml patch for the next
version of the series.

Cheers,
Costin