Skip to content
This repository has been archived by the owner on Jun 18, 2018. It is now read-only.

A error about build and installation on Ubuntu 16.10 x64 #167

Closed
hongfeiyucode opened this issue Feb 18, 2017 · 4 comments
Closed

A error about build and installation on Ubuntu 16.10 x64 #167

hongfeiyucode opened this issue Feb 18, 2017 · 4 comments

Comments

@hongfeiyucode
Copy link

When I built and installed SETools (4.1, a484867) on Ubuntu 16.10 x64. During this process I encountered with several problems:

libqpol/ftrule_query.c: In function ‘filename_trans_state_next’:
libqpol/ftrule_query.c:84:40: error: ‘filename_trans_t {aka struct filename_trans}’ has no member named ‘size’
   if (fts->bucket >= db->filename_trans->size) {
                                        ^
libqpol/ftrule_query.c:88:37: error: ‘filename_trans_t {aka struct filename_trans}’ has no member named ‘htable’
   fts->cur_item = db->filename_trans->htable[fts->bucket];
                                     ^
libqpol/ftrule_query.c: In function ‘filename_trans_state_size’:
libqpol/ftrule_query.c:113:36: error: ‘filename_trans_t {aka struct filename_trans}’ has no member named ‘size’
  for (i = 0; i < db->filename_trans->size; i++) {
                                    ^
libqpol/ftrule_query.c:114:27: error: ‘filename_trans_t {aka struct filename_trans}’ has no member named ‘htable’
   cur = db->filename_trans->htable[i];
                           ^
libqpol/ftrule_query.c: In function ‘qpol_policy_get_filename_trans_iter’:
libqpol/ftrule_query.c:149:36: error: ‘filename_trans_t {aka struct filename_trans}’ has no member named ‘htable’
  fts->cur_item = db->filename_trans->htable[0];
                                    ^
libqpol/ftrule_query.c:152:36: error: ‘filename_trans_t {aka struct filename_trans}’ has no member named ‘htable’
  fts->cur_item = db->filename_trans->htable[fts->bucket];
                                    ^
libqpol/ftrule_query.c:155:40: error: ‘filename_trans_t {aka struct filename_trans}’ has no member named ‘size’
   if (fts->bucket >= db->filename_trans->size) {
                                        ^
libqpol/ftrule_query.c:159:37: error: ‘filename_trans_t {aka struct filename_trans}’ has no member named ‘htable’
   fts->cur_item = db->filename_trans->htable[fts->bucket];
                                     ^
libqpol/ftrule_query.c: In function ‘qpol_filename_trans_get_default_type’:
libqpol/ftrule_query.c:269:2: error: unknown type name ‘filename_trans_datum_t’
  filename_trans_datum_t *datum = hashtab_search(db->filename_trans, (hashtab_key_t)ft);
  ^
libqpol/ftrule_query.c:269:49: error: passing argument 1 of ‘hashtab_search’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  filename_trans_datum_t *datum = hashtab_search(db->filename_trans, (hashtab_key_t)ft);
                                                 ^
In file included from /usr/include/sepol/policydb/symtab.h:16:0,
                 from /usr/include/sepol/policydb/policydb.h:59,
                 from libqpol/iterator_internal.h:36,
                 from libqpol/ftrule_query.c:29:
/usr/include/sepol/policydb/hashtab.h:100:24: note: expected ‘hashtab_t {aka struct hashtab_val *}’ but argument is of type ‘filename_trans_t * {aka struct filename_trans *}’
 extern hashtab_datum_t hashtab_search(hashtab_t h, const hashtab_key_t k);
                        ^
libqpol/ftrule_query.c:275:54: error: request for member ‘otype’ in something not a structure or union
  *dflt = (qpol_type_t *) db->type_val_to_struct[datum->otype - 1];
                                                      ^
cc1: all warnings being treated as errors
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I follow this step: https://github.com/TresysTechnology/setools/wiki/SETools-4-on-Ubuntu-16.10

@pebenito
Copy link
Contributor

The master branch of setools currently requires the master branch of libsepol (what will become libsepol 2.7)

@hongfeiyucode
Copy link
Author

in 4.1 ,there is another error :

ibqpol/policy_scan.c:398:0: error: "yywrap" redefined [-Werror]
 
 ^
libqpol/policy_scan.c:74:0: note: this is the location of the previous definition
 
 ^
cc1: all warnings being treated as errors
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

@fishilico
Copy link
Contributor

This is an error from flex 2.6.3 (westes/flex#162). You need to backport westes/flex@f5d87f1 to the flex you are using, or disable -Werror in setup.py.

@hongfeiyucode
Copy link
Author

Thanks! you are right. Although i can not start it normally.There are some other problems

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants