When a compile of net/wireshark is attempted using the default of base system krb5, it fails with the errors: CC libdissectors_la-packet-kerberos.lo ../../asn1/kerberos/packet-kerberos-template.c:482:29: error: no member named 'name' in 'struct krb5_principal_data' for(i=0;i<key.principal->name.name_string.len;i++){ ~~~~~~~~~~~~~ ^ ../../asn1/kerberos/packet-kerberos-template.c:484:101: error: no member named 'name' in 'struct krb5_principal_data' ..."%s%s",(i?"/":""),key.principal->name.name_string.val[i])); ~~~~~~~~~~~~~ ^ /usr/local/include/glib-2.0/glib/gmacros.h:240:29: note: expanded from macro 'MIN' #define MIN(a, b) (((a) < (b)) ? (a) : (b)) ^ ../../asn1/kerberos/packet-kerberos-template.c:484:101: error: no member named 'name' in 'struct krb5_principal_data' ..."%s%s",(i?"/":""),key.principal->name.name_string.val[i])); ~~~~~~~~~~~~~ ^ /usr/local/include/glib-2.0/glib/gmacros.h:240:42: note: expanded from macro 'MIN' #define MIN(a, b) (((a) < (b)) ? (a) : (b)) ^ ../../asn1/kerberos/packet-kerberos-template.c:487:73: warning: format specifies type 'char *' but the argument has type 'krb5_data' (aka 'struct _krb5_data') [-Wformat] ...KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), "@%s",key.principal->realm)); ~~ ^~~~~~~~~~~~~~~~~~~~ /usr/local/include/glib-2.0/glib/gmacros.h:240:29: note: expanded from macro 'MIN' #define MIN(a, b) (((a) < (b)) ? (a) : (b)) ^ ../../asn1/kerberos/packet-kerberos-template.c:487:73: warning: format specifies type 'char *' but the argument has type 'krb5_data' (aka 'struct _krb5_data') [-Wformat] ...KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), "@%s",key.principal->realm)); ~~ ^~~~~~~~~~~~~~~~~~~~ /usr/local/include/glib-2.0/glib/gmacros.h:240:42: note: expanded from macro 'MIN' #define MIN(a, b) (((a) < (b)) ? (a) : (b)) ^ ../../asn1/kerberos/packet-kerberos-template.c:489:25: error: no member named 'keyblock' in 'struct krb5_keytab_entry_st' new_key->keytype=key.keyblock.keytype; ~~~ ^ ../../asn1/kerberos/packet-kerberos-template.c:490:27: error: no member named 'keyblock' in 'struct krb5_keytab_entry_st' new_key->keylength=key.keyblock.keyvalue.length; ~~~ ^ ../../asn1/kerberos/packet-kerberos-template.c:491:35: error: no member named 'keyblock' in 'struct krb5_keytab_entry_st' new_key->keyvalue=g_memdup(key.keyblock.keyvalue.da... ~~~ ^ ../../asn1/kerberos/packet-kerberos-template.c:531:3: error: use of undeclared identifier 'krb5_crypto' krb5_crypto crypto; ^ ../../asn1/kerberos/packet-kerberos-template.c:539:7: error: no member named 'keyblock' in 'struct krb5_keytab_entry_st' key.keyblock.keytype=ek->keytype; ~~~ ^ ../../asn1/kerberos/packet-kerberos-template.c:540:7: error: no member named 'keyblock' in 'struct krb5_keytab_entry_st' key.keyblock.keyvalue.length=ek->keylength; ~~~ ^ ../../asn1/kerberos/packet-kerberos-template.c:541:7: error: no member named 'keyblock' in 'struct krb5_keytab_entry_st' key.keyblock.keyvalue.data=ek->keyvalue; ~~~ ^ ../../asn1/kerberos/packet-kerberos-template.c:542:9: warning: implicit declaration of function 'krb5_crypto_init' is invalid in C99 [-Wimplicit-function-declaration] ret = krb5_crypto_init(krb5_ctx, &(key.keyblock), 0, &crypto); ^ ../../asn1/kerberos/packet-kerberos-template.c:542:42: error: no member named 'keyblock' in 'struct krb5_keytab_entry_st' ret = krb5_crypto_init(krb5_ctx, &(key.keyblock), 0, &crypto); ~~~ ^ ../../asn1/kerberos/packet-kerberos-template.c:554:9: warning: implicit declaration of function 'krb5_decrypt_ivec' is invalid in C99 [-Wimplicit-function-declaration] ret = krb5_decrypt_ivec(krb5_ctx, crypto, usage, ^ ../../asn1/kerberos/packet-kerberos-template.c:554:37: error: use of undeclared identifier 'crypto' ret = krb5_decrypt_ivec(krb5_ctx, crypto, usage, ^ ../../asn1/kerberos/packet-kerberos-template.c:564:4: warning: implicit declaration of function 'krb5_crypto_destroy' is invalid in C99 [-Wimplicit-function-declaration] krb5_crypto_destroy(krb5_ctx, crypto); ^ ../../asn1/kerberos/packet-kerberos-template.c:564:34: error: use of undeclared identifier 'crypto' krb5_crypto_destroy(krb5_ctx, crypto); ^ ../../asn1/kerberos/packet-kerberos-template.c:572:33: error: use of undeclared identifier 'crypto' krb5_crypto_destroy(krb5_ctx, crypto); ^ ../../asn1/kerberos/packet-kerberos-template.c:506:10: warning: unused parameter 'usage' [-Wunused-parameter] int usage, ^ 6 warnings and 14 errors generated. Makefile:12591: recipe for target 'libdissectors_la-packet-kerberos.lo' failed gmake[7]: *** [libdissectors_la-packet-kerberos.lo] Error 1 gmake[7]: *** Waiting for unfinished jobs.... Changing to use the port security/krb5 results in a good build.
It builds fine for me with base on 10.X. What version of FreeBSD are you using?
I could reproduce the build error on 11-amd64, but at a slightly different place: CC libdissectors_la-packet-kerberos.lo CC libdissectors_la-packet-lcsap.lo ../../asn1/kerberos/packet-kerberos-template.c:482:29: error: no member named 'name' in 'struct krb5_principal_data' for(i=0;i<key.principal->name.name_string.len;i++){ ~~~~~~~~~~~~~ ^ [...]
Do you have any krb ports installed? What is your OPTIONS config for wireshark? My box has no krb ports and I'm using the KRB_BASE option. I just find it weird that 10.X would build, the port would build, but 11.X base would not. Maybe this is a heimdal thing?
Here's my config, but I had security/krb5 installied. After removing security/krb5, the port built fine with KRB_BASE. So if KRB_BASE is set and security/krb5 is installed, we need to register a BUILD_CONFLICT ? make showconfig ===> The following configuration options are available for wireshark-1.12.8_1: GCRYPT=off: IPsec decryption support GEOIP=on: GeoIP IP location support GNUTLS=on: SSL decryption support IPV6=on: IPv6 protocol support LUA=off: Lua scripting language support RTP=on: Enable support for playing back RTP streams SNMP=on: SNMP network protocol support ====> Kerberos dissection support: you have to select exactly one of them KRB_BASE=on: Kerberos support via base system KRB_HEIMDAL=off: Kerberos support via security/heimdal KRB_MIT=off: Kerberos support via security/krb5 KRB_NONE=off: Disable Kerberos support ====> Asynchronous DNS lookup support: you can only select none or one of them ADNS=on: Asynchronous DNS resolution via GNU adns CARES=off: Asynchronous DNS resolution via c-ares ====> GUI (Graphical User Interface) support: you can only select none or one of them GTK2=off: GTK+ 2 GUI toolkit support GTK3=on: GTK+ 3 GUI toolkit support QT5=off: Qt 5 toolkit support
I have security/krb5 installed. I did "make rmconfig" to be sure options were all default. FreeBSD rogue 10.2-STABLE FreeBSD 10.2-STABLE #0 r290009: Mon Oct 26 12:36:38 PDT 2015 root@rogue:/usr/obj/usr/src/sys/GENERIC amd64 /etc/src.conf: PORTS_MODULES=emulators/virtualbox-ose-kmod multimedia/cuse4bsd-kmod WITHOUT_ATM=true WITHOUT_FLOPPY=true WITHOUT_GPIB=YES WITHOUT_I4B==YES WITHOUT_IPFILTER=true WITHOUT_LPR=true WITHOUT_NCP=YES WITHOUT_PF=YES WITHOUT_PPP=true WITHOUT_PROFILE=YES WITHOUT_SENDMAIL=true
I can't confirm immediately, but this looks like the build is using the header files in /usr/local/include even though base is the default. I have seen this several times when multiple sets of header files are present.
Does adding: KRB_BASE_CONFLICTS_BUILD_ON=krb5-[0-9]* Help? Well, does it do what one would expect?
Added "KRB_BASE_CONFLICTS_BUILD_ON=krb5-[0-9]*" to Makefile. No obvious change. I got the same errors as before.
Try: KRB_BASE_CONFLICTS_BASE=krb5-[0-9]*
(In reply to Joe Marcus Clarke from comment #9) Added KRB_BASE_CONFLICTS_BASE=krb5-[0-9]* to the makefile and had krb5 installed. No change.
Ugh, typo. Should be: KRB_BASE_CONFLICTS_BUILD=krb5-[0-9]*
(In reply to Joe Marcus Clarke from comment #11) This brings the message: ===> wireshark-1.12.8_1 conflicts with installed package(s): krb5-1.13.2_5 They will not build together. Please remove them first with pkg delete. and looks like it might solve the immediate problem.
Agree. Not ideal and it really means that if ports kerberos is present, the use base option is not valid. I really don't like it, especially as the default options fail in the fairly common case of the port being present, with no message that using another Kerberos dissection support option will work without deleting the port.
I have added a check in wireshark 2.0 to point people to do the right thing when the krb5 port is installed. Ultimately, if the port is installed, then WS needs to use it.