[Nix-dev] nixUnstable and aterm25? union compiler error

Marc Weber marco-oweber at gmx.de
Fri Jun 13 02:27:45 CEST 2008


aterm242fixes makes some trouble for me when installing qemu on my
x86_64 machine.
Niksnut has proposed to try aterm25. aterm25 compiles fine however nix
doesn't when importing include/aterm1.h:

 g++ -DHAVE_CONFIG_H -I. -I. -I../.. -Wall -I./..
-I/nix/store/1vwcbl0dixs07x5k2zrqb5kiba8dqwg8-aterm-2.5/include
-D_FILE_OFFSET_BITS=64 -g -O2 -c aterm-map.cc  -fPIC -DPIC -o
.libs/aterm-map.o
In file included from
/nix/store/1vwcbl0dixs07x5k2zrqb5kiba8dqwg8-aterm-2.5/include/aterm2.h:14,
                 from aterm-map.cc:8:
/nix/store/1vwcbl0dixs07x5k2zrqb5kiba8dqwg8-aterm-2.5/include/aterm1.h:35:
error: ‘union’ tag used in naming ‘struct _ATerm’
/nix/store/1vwcbl0dixs07x5k2zrqb5kiba8dqwg8-aterm-2.5/include/aterm1.h:38:
error: ‘union’ tag used in naming ‘struct _ATerm’
/nix/store/1vwcbl0dixs07x5k2zrqb5kiba8dqwg8-aterm-2.5/include/aterm1.h:42:
error: ‘union’ tag used in naming ‘struct _ATerm’
In file included from
/nix/store/1vwcbl0dixs07x5k2zrqb5kiba8dqwg8-aterm-2.5/include/aterm2.h:15,
                 from aterm-map.cc:8:
/nix/store/1vwcbl0dixs07x5k2zrqb5kiba8dqwg8-aterm-2.5/include/afun.h:44:
error: ‘union’ tag used in naming ‘struct _ATerm’
/nix/store/1vwcbl0dixs07x5k2zrqb5kiba8dqwg8-aterm-2.5/include/afun.h:45:
error: ‘union’ tag used in naming ‘struct _ATerm’
make[3]: *** [aterm-map.lo] Error 1

The code snippet:

struct __ATerm
{
  header_type   header;
  union _ATerm *next;
};

typedef union _ATerm
{
  header_type     header;
  struct __ATerm  aterm;
  union _ATerm*   subaterm[MAX_ARITY+3];
  MachineWord     word[MAX_ARITY+3];
} *ATerm;


I'm not that familiar with C so is there a special compiler option to
make this code pass?

Marc Weber



More information about the nix-dev mailing list