Opened 3 months ago

Last modified 8 weeks ago

#70592 new defect

krbafs fails to build: error: expected declaration specifiers or ‘...’ before ‘des_cblock’ etc.

Reported by: barracuda156 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.10.1
Keywords: Cc:
Port: krbafs

Description

ccache /usr/bin/gcc-4.2 -std=gnu99 -c -I/opt/local/include -DHAVE_CONFIG_H -DLIBDIR='"/opt/local/lib"' -I. -I. -pipe -Os -arch ppc  resolve.c
In file included from afskrb.c:34:
krbafs_locl.h:131: error: expected declaration specifiers or ‘...’ before ‘des_cblock’
krbafs_locl.h:158: error: expected declaration specifiers or ‘...’ before ‘CREDENTIALS’
krbafs_locl.h:172: error: expected declaration specifiers or ‘...’ before ‘CREDENTIALS’
afskrb.c:44: error: expected declaration specifiers or ‘...’ before ‘CREDENTIALS’
afskrb.c: In function ‘get_cred’:
afskrb.c:46: error: ‘KTEXT_ST’ undeclared (first use in this function)
afskrb.c:46: error: (Each undeclared identifier is reported only once
afskrb.c:46: error: for each function it appears in.)
afskrb.c:46: error: expected ‘;’ before ‘tkt’
afskrb.c:47: warning: implicit declaration of function ‘krb_get_cred’
afskrb.c:47: error: ‘c’ undeclared (first use in this function)
afskrb.c:50: warning: implicit declaration of function ‘krb_mk_req’
afskrb.c:50: error: ‘tkt’ undeclared (first use in this function)
afskrb.c:51: error: ‘KSUCCESS’ undeclared (first use in this function)
afskrb.c: In function ‘afslog_uid_int’:
afskrb.c:65: error: ‘CREDENTIALS’ undeclared (first use in this function)
afskrb.c:65: error: expected ‘;’ before ‘c’
afskrb.c:66: error: ‘ANAME_SZ’ undeclared (first use in this function)
afskrb.c:67: error: ‘INST_SZ’ undeclared (first use in this function)
afskrb.c:68: error: ‘REALM_SZ’ undeclared (first use in this function)
afskrb.c:74: warning: implicit declaration of function ‘krb_get_tf_fullname’
afskrb.c:74: warning: implicit declaration of function ‘tkt_string’
afskrb.c:75: error: ‘KSUCCESS’ undeclared (first use in this function)
afskrb.c:78: error: ‘c’ undeclared (first use in this function)
afskrb.c:78: error: too many arguments to function ‘_kafs_get_cred’
afskrb.c:81: warning: implicit declaration of function ‘kafs_settoken’
afskrb.c: In function ‘get_realm’:
afskrb.c:88: warning: implicit declaration of function ‘krb_realmofhost’
afskrb.c:88: warning: initialization makes pointer from integer without a cast
make: *** [afskrb.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from afskrb5.c:34:
krbafs_locl.h:131: error: expected declaration specifiers or ‘...’ before ‘des_cblock’
krbafs_locl.h:158: error: expected declaration specifiers or ‘...’ before ‘CREDENTIALS’
krbafs_locl.h:172: error: expected declaration specifiers or ‘...’ before ‘CREDENTIALS’
afskrb5.c:49: error: expected declaration specifiers or ‘...’ before ‘CREDENTIALS’
afskrb5.c: In function ‘get_cred’:
afskrb5.c:80: warning: implicit declaration of function ‘krb524_convert_creds_kdc’
afskrb5.c:80: error: ‘c’ undeclared (first use in this function)
afskrb5.c:80: error: (Each undeclared identifier is reported only once
afskrb5.c:80: error: for each function it appears in.)
afskrb5.c: In function ‘afslog_uid_int’:
afskrb5.c:94: error: ‘CREDENTIALS’ undeclared (first use in this function)
afskrb5.c:94: error: expected ‘;’ before ‘c’
afskrb5.c:95: error: ‘ANAME_SZ’ undeclared (first use in this function)
afskrb5.c:96: error: ‘INST_SZ’ undeclared (first use in this function)
afskrb5.c:97: error: ‘REALM_SZ’ undeclared (first use in this function)
afskrb5.c:112: error: ‘c’ undeclared (first use in this function)
afskrb5.c:112: error: too many arguments to function ‘_kafs_get_cred’
afskrb5.c:116: warning: implicit declaration of function ‘kafs_settoken’
In file included from afssys.c:34:
krbafs_locl.h:131: error: expected declaration specifiers or ‘...’ before ‘des_cblock’
krbafs_locl.h:158: error: expected declaration specifiers or ‘...’ before ‘CREDENTIALS’
krbafs_locl.h:172: error: expected declaration specifiers or ‘...’ before ‘CREDENTIALS’
make: *** [afskrb5.o] Error 1
make: *** [afssys.o] Error 1
In file included from lifetime.c:14:
krbafs_locl.h:131: error: expected declaration specifiers or ‘...’ before ‘des_cblock’
krbafs_locl.h:158: error: expected declaration specifiers or ‘...’ before ‘CREDENTIALS’
krbafs_locl.h:172: error: expected declaration specifiers or ‘...’ before ‘CREDENTIALS’
lifetime.c:21:17: error: krb.h: No such file or directory
lifetime.c: In function ‘krb_life_to_atime’:
lifetime.c:174: warning: implicit declaration of function ‘krb_life_to_time’
lifetime.c: In function ‘krb_atime_to_life’:
lifetime.c:227: warning: implicit declaration of function ‘krb_time_to_life’
make: *** [lifetime.o] Error 1
In file included from common.c:34:
krbafs_locl.h:131: error: expected declaration specifiers or ‘...’ before ‘des_cblock’
krbafs_locl.h:158: error: expected declaration specifiers or ‘...’ before ‘CREDENTIALS’
krbafs_locl.h:172: error: expected declaration specifiers or ‘...’ before ‘CREDENTIALS’
common.c:60: error: expected declaration specifiers or ‘...’ before ‘CREDENTIALS’
common.c: In function ‘kafs_settoken’:
common.c:71: error: ‘c’ undeclared (first use in this function)
common.c:71: error: (Each undeclared identifier is reported only once
common.c:71: error: for each function it appears in.)
common.c:75: warning: implicit declaration of function ‘krb_life_to_time’
common.c:76: warning: implicit declaration of function ‘time’
common.c: At top level:
common.c:338: error: expected declaration specifiers or ‘...’ before ‘CREDENTIALS’
common.c: In function ‘_kafs_get_cred’:
common.c:370: error: ‘c’ undeclared (first use in this function)
common.c:370: error: too many arguments to function ‘data->get_cred’
common.c:372: error: too many arguments to function ‘data->get_cred’
common.c:383: error: too many arguments to function ‘data->get_cred’
common.c:393: error: too many arguments to function ‘data->get_cred’
common.c:402: error: too many arguments to function ‘data->get_cred’
common.c:404: error: too many arguments to function ‘data->get_cred’
common.c:416: error: too many arguments to function ‘data->get_cred’
common.c:418: error: too many arguments to function ‘data->get_cred’
make: *** [common.o] Error 1
In file included from resolve.h:39,
                 from resolve.c:58:
krbafs_locl.h:131: error: expected declaration specifiers or ‘...’ before ‘des_cblock’
krbafs_locl.h:158: error: expected declaration specifiers or ‘...’ before ‘CREDENTIALS’
krbafs_locl.h:172: error: expected declaration specifiers or ‘...’ before ‘CREDENTIALS’
make: *** [resolve.o] Error 1

Change History (1)

comment:1 Changed 8 weeks ago by barracuda156

Also with gcc14:

--->  Building krbafs
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_krbafs/krbafs/work/krbafs-1.2" && /usr/bin/make -j6 -w all 
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_krbafs/krbafs/work/krbafs-1.2'
ccache /opt/local/bin/gcc-mp-14 -c -I/opt/local/include -DHAVE_CONFIG_H -DLIBDIR='"/opt/local/lib"' -I. -I. -pipe -Os -arch ppc  afskrb.c
ccache /opt/local/bin/gcc-mp-14 -c -I/opt/local/include -DHAVE_CONFIG_H -DLIBDIR='"/opt/local/lib"' -I. -I. -pipe -Os -arch ppc  afskrb5.c
ccache /opt/local/bin/gcc-mp-14 -c -I/opt/local/include -DHAVE_CONFIG_H -DLIBDIR='"/opt/local/lib"' -I. -I. -pipe -Os -arch ppc  afssys.c
ccache /opt/local/bin/gcc-mp-14 -c -I/opt/local/include -DHAVE_CONFIG_H -DLIBDIR='"/opt/local/lib"' -I. -I. -pipe -Os -arch ppc  common.c
ccache /opt/local/bin/gcc-mp-14 -c -I/opt/local/include -DHAVE_CONFIG_H -DLIBDIR='"/opt/local/lib"' -I. -I. -pipe -Os -arch ppc  lifetime.c
ccache /opt/local/bin/gcc-mp-14 -c -I/opt/local/include -DHAVE_CONFIG_H -DLIBDIR='"/opt/local/lib"' -I. -I. -pipe -Os -arch ppc  resolve.c
In file included from afskrb5.c:34:
krbafs_locl.h:131:60: error: unknown type name 'des_cblock'
  131 | void afs_string_to_key(const char *pass, const char *cell, des_cblock *key);
      |                                                            ^~~~~~~~~~
krbafs_locl.h:158:50: error: unknown type name 'CREDENTIALS'
  158 |                                     const char*, CREDENTIALS*);
      |                                                  ^~~~~~~~~~~
krbafs_locl.h:164:5: error: unknown type name 'get_cred_func_t'; did you mean 'get_realm_func_t'?
  164 |     get_cred_func_t get_cred;
      |     ^~~~~~~~~~~~~~~
      |     get_realm_func_t
krbafs_locl.h:172:19: error: unknown type name 'CREDENTIALS'
  172 |                   CREDENTIALS*);
      |                   ^~~~~~~~~~~
make: *** [afskrb5.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from afssys.c:34:
krbafs_locl.h:131:60: error: unknown type name 'des_cblock'
  131 | void afs_string_to_key(const char *pass, const char *cell, des_cblock *key);
      |                                                            ^~~~~~~~~~
krbafs_locl.h:158:50: error: unknown type name 'CREDENTIALS'
  158 |                                     const char*, CREDENTIALS*);
      |                                                  ^~~~~~~~~~~
krbafs_locl.h:164:5: error: unknown type name 'get_cred_func_t'; did you mean 'get_realm_func_t'?
  164 |     get_cred_func_t get_cred;
      |     ^~~~~~~~~~~~~~~
      |     get_realm_func_t
krbafs_locl.h:172:19: error: unknown type name 'CREDENTIALS'
  172 |                   CREDENTIALS*);
      |                   ^~~~~~~~~~~
make: *** [afssys.o] Error 1
In file included from afskrb.c:34:
krbafs_locl.h:131:60: error: unknown type name 'des_cblock'
  131 | void afs_string_to_key(const char *pass, const char *cell, des_cblock *key);
      |                                                            ^~~~~~~~~~
krbafs_locl.h:158:50: error: unknown type name 'CREDENTIALS'
  158 |                                     const char*, CREDENTIALS*);
      |                                                  ^~~~~~~~~~~
krbafs_locl.h:164:5: error: unknown type name 'get_cred_func_t'; did you mean 'get_realm_func_t'?
  164 |     get_cred_func_t get_cred;
      |     ^~~~~~~~~~~~~~~
      |     get_realm_func_t
krbafs_locl.h:172:19: error: unknown type name 'CREDENTIALS'
  172 |                   CREDENTIALS*);
      |                   ^~~~~~~~~~~
afskrb.c:44:29: error: unknown type name 'CREDENTIALS'
   44 |          const char *realm, CREDENTIALS *c)
      |                             ^~~~~~~~~~~
afskrb.c: In function 'afslog_uid_int':
afskrb.c:65:5: error: unknown type name 'CREDENTIALS'
   65 |     CREDENTIALS c;
      |     ^~~~~~~~~~~
afskrb.c:66:15: error: 'ANAME_SZ' undeclared (first use in this function)
   66 |     char name[ANAME_SZ];      /* some krb_get_tf_fullnames can't take NULL */
      |               ^~~~~~~~
afskrb.c:66:15: note: each undeclared identifier is reported only once for each function it appears in
afskrb.c:67:19: error: 'INST_SZ' undeclared (first use in this function)
   67 |     char instance[INST_SZ];   /* so we create some dummy space for it */
      |                   ^~~~~~~
afskrb.c:68:16: error: 'REALM_SZ' undeclared (first use in this function)
   68 |     char realm[REALM_SZ];
      |                ^~~~~~~~
afskrb.c:74:11: error: implicit declaration of function 'krb_get_tf_fullname'; did you mean 'krb5_set_trace_filename'? [-Wimplicit-function-declaration]
   74 |     ret = krb_get_tf_fullname(tkt_string(), name, instance, realm);
      |           ^~~~~~~~~~~~~~~~~~~
      |           krb5_set_trace_filename
afskrb.c:74:31: error: implicit declaration of function 'tkt_string' [-Wimplicit-function-declaration]
   74 |     ret = krb_get_tf_fullname(tkt_string(), name, instance, realm);
      |                               ^~~~~~~~~~
afskrb.c:75:16: error: 'KSUCCESS' undeclared (first use in this function)
   75 |     if (ret != KSUCCESS)
      |                ^~~~~~~~
afskrb.c:78:11: error: implicit declaration of function '_kafs_get_cred' [-Wimplicit-function-declaration]
   78 |     ret = _kafs_get_cred(data, cell, realm_hint, realm, &c);
      |           ^~~~~~~~~~~~~~
afskrb.c:81:15: error: implicit declaration of function 'kafs_settoken' [-Wimplicit-function-declaration]
   81 |         ret = kafs_settoken(cell, uid, &c);
      |               ^~~~~~~~~~~~~
afskrb.c: In function 'get_realm':
afskrb.c:88:15: error: implicit declaration of function 'krb_realmofhost'; did you mean 'krb_realm_of_cell'? [-Wimplicit-function-declaration]
   88 |     char *r = krb_realmofhost(host);
      |               ^~~~~~~~~~~~~~~
      |               krb_realm_of_cell
afskrb.c:88:15: error: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
afskrb.c: In function 'krb_afslog_uid_home':
afskrb.c:102:19: error: 'get_cred' undeclared (first use in this function); did you mean 'getcwd'?
  102 |     kd.get_cred = get_cred;
      |                   ^~~~~~~~
      |                   getcwd
make: *** [afskrb.o] Error 1
In file included from common.c:34:
krbafs_locl.h:131:60: error: unknown type name 'des_cblock'
  131 | void afs_string_to_key(const char *pass, const char *cell, des_cblock *key);
      |                                                            ^~~~~~~~~~
krbafs_locl.h:158:50: error: unknown type name 'CREDENTIALS'
  158 |                                     const char*, CREDENTIALS*);
      |                                                  ^~~~~~~~~~~
krbafs_locl.h:164:5: error: unknown type name 'get_cred_func_t'; did you mean 'get_realm_func_t'?
  164 |     get_cred_func_t get_cred;
      |     ^~~~~~~~~~~~~~~
      |     get_realm_func_t
krbafs_locl.h:172:19: error: unknown type name 'CREDENTIALS'
  172 |                   CREDENTIALS*);
      |                   ^~~~~~~~~~~
common.c:60:44: error: unknown type name 'CREDENTIALS'
   60 | kafs_settoken(const char *cell, uid_t uid, CREDENTIALS *c)
      |                                            ^~~~~~~~~~~
common.c:338:15: error: unknown type name 'CREDENTIALS'
  338 |               CREDENTIALS *c)
      |               ^~~~~~~~~~~
make: *** [common.o] Error 1
In file included from lifetime.c:14:
krbafs_locl.h:131:60: error: unknown type name 'des_cblock'
  131 | void afs_string_to_key(const char *pass, const char *cell, des_cblock *key);
      |                                                            ^~~~~~~~~~
krbafs_locl.h:158:50: error: unknown type name 'CREDENTIALS'
  158 |                                     const char*, CREDENTIALS*);
      |                                                  ^~~~~~~~~~~
krbafs_locl.h:164:5: error: unknown type name 'get_cred_func_t'; did you mean 'get_realm_func_t'?
  164 |     get_cred_func_t get_cred;
      |     ^~~~~~~~~~~~~~~
      |     get_realm_func_t
krbafs_locl.h:172:19: error: unknown type name 'CREDENTIALS'
  172 |                   CREDENTIALS*);
      |                   ^~~~~~~~~~~
lifetime.c:119:1: error: conflicting types for 'krb_life_to_time'; have 'u_int32_t(u_int32_t,  int)' {aka 'unsigned int(unsigned int,  int)'}
  119 | krb_life_to_time(u_int32_t start, int life_)
      | ^~~~~~~~~~~~~~~~
krbafs_locl.h:143:15: note: previous declaration of 'krb_life_to_time' with type 'long unsigned int(long unsigned int,  int)'
  143 | unsigned long krb_life_to_time(unsigned long start, int life);
      |               ^~~~~~~~~~~~~~~~
lifetime.c:145:5: error: conflicting types for 'krb_time_to_life'; have 'int(u_int32_t,  u_int32_t)' {aka 'int(unsigned int,  unsigned int)'}
  145 | int krb_time_to_life(u_int32_t start, u_int32_t end)
      |     ^~~~~~~~~~~~~~~~
krbafs_locl.h:135:5: note: previous declaration of 'krb_time_to_life' with type 'int(long unsigned int,  long unsigned int)'
  135 | int krb_time_to_life(unsigned long start, unsigned long end);
      |     ^~~~~~~~~~~~~~~~
make: *** [lifetime.o] Error 1
In file included from resolve.h:39,
                 from resolve.c:58:
krbafs_locl.h:131:60: error: unknown type name 'des_cblock'
  131 | void afs_string_to_key(const char *pass, const char *cell, des_cblock *key);
      |                                                            ^~~~~~~~~~
krbafs_locl.h:158:50: error: unknown type name 'CREDENTIALS'
  158 |                                     const char*, CREDENTIALS*);
      |                                                  ^~~~~~~~~~~
krbafs_locl.h:164:5: error: unknown type name 'get_cred_func_t'; did you mean 'get_realm_func_t'?
  164 |     get_cred_func_t get_cred;
      |     ^~~~~~~~~~~~~~~
      |     get_realm_func_t
krbafs_locl.h:172:19: error: unknown type name 'CREDENTIALS'
  172 |                   CREDENTIALS*);
      |                   ^~~~~~~~~~~
make: *** [resolve.o] Error 1
Note: See TracTickets for help on using tickets.