trouble installing net/samba35

Hello.
I'm trying to install net/samba35 with ADS onto FreeBSD 8.1 machine using fresh ports collection. But during configure phase I got messages like these:

Code:
... skip ...

checking for ldap_initialize... yes
checking whether LDAP support is used... yes
checking for Active Directory and krb5 support... yes
checking for ldap_initialize... (cached) yes
checking for ldap_add_result_entry... yes
checking for kerberos 5 install path... /usr
checking for krb5-config... /usr/bin/krb5-config
checking for working krb5-config... yes
checking krb5.h usability... yes
checking krb5.h presence... yes
checking for krb5.h... yes
checking for krb5/locate_plugin.h... no
checking for KRB5_DEPRECATED define taking an identifier... yes
checking gssapi.h usability... yes
checking gssapi.h presence... yes
checking for gssapi.h... yes
checking gssapi/gssapi_generic.h usability... no
checking gssapi/gssapi_generic.h presence... no
checking for gssapi/gssapi_generic.h... no
checking gssapi/gssapi.h usability... yes
checking gssapi/gssapi.h presence... yes
checking for gssapi/gssapi.h... yes
checking com_err.h usability... yes
checking com_err.h presence... yes
checking for com_err.h... yes
checking for _et_list in -lcom_err... no
checking for krb5_encrypt_data in -lk5crypto... no
checking for des_set_key in -lcrypto... no
checking for copy_Authenticator in -lasn1... no
checking for roken_getaddrinfo_hostspec in -lroken... no
checking for gss_display_status in -lgssapi... no
checking for krb5_mk_req_extended in -lkrb5... no
checking for krb5_kt_compare in -lkrb5... no
checking for gss_display_status in -lgssapi_krb5... yes
checking for krb5_set_real_time... yes
checking for krb5_set_default_in_tkt_etypes... yes
checking for krb5_set_default_tgs_enctypes... no
checking for krb5_set_default_tgs_ktypes... no
checking for krb5_principal2salt... no
checking for krb5_use_enctype... no
checking for krb5_string_to_key... yes
checking for krb5_get_pw_salt... yes
checking for krb5_string_to_key_salt... yes
checking for krb5_auth_con_setkey... yes
checking for krb5_auth_con_setuseruserkey... no
checking for krb5_locate_kdc... no
checking for krb5_get_permitted_enctypes... no
checking for krb5_get_default_in_tkt_etypes... yes
checking for krb5_free_data_contents... yes

checking for krb5_principal_get_comp_string... yes
checking for krb5_free_unparsed_name... no
checking for krb5_free_keytab_entry_contents... no
checking for krb5_kt_free_entry... yes
checking for krb5_krbhst_init... yes
checking for krb5_krbhst_get_addrinfo... yes
checking for krb5_c_enctype_compare... yes
checking for krb5_enctypes_compatible_keys... yes
checking for krb5_crypto_init... yes
checking for krb5_crypto_destroy... yes
checking for krb5_decode_ap_req... yes
checking for free_AP_REQ... yes
checking for krb5_verify_checksum... yes
checking for krb5_c_verify_checksum... yes
checking for krb5_principal_compare_any_realm... yes
checking for krb5_parse_name_norealm... no
checking for krb5_princ_size... no
checking for krb5_get_init_creds_opt_set_pac_request... yes
checking for krb5_get_renewed_creds... yes
checking for krb5_get_kdc_cred... yes
checking for krb5_free_error_contents... yes
checking for initialize_krb5_error_table... yes
checking for krb5_get_init_creds_opt_alloc... yes
checking for krb5_get_init_creds_opt_free... yes
checking for krb5_get_init_creds_opt_get_error... yes
checking for krb5_enctype_to_string... yes
checking for krb5_fwd_tgt_creds... yes
checking for krb5_auth_con_set_req_cksumtype... no
checking for krb5_get_creds_opt_alloc... yes
checking for krb5_get_creds_opt_set_impersonate... yes
checking for krb5_get_creds... yes
checking for krb5_get_credentials_for_user... no
checking for krb5_get_host_realm... yes
checking for krb5_free_host_realm... yes
checking whether krb5_get_credentials_for_user is declared... no
checking whether krb5_auth_con_set_req_cksumtype is declared... no
checking whether krb5_ticket contains kvno and enctype... no
checking whether krb5_get_init_creds_opt_free takes a context argument... yes
checking whether krb5_verify_checksum takes 7 arguments... 6
checking for checksum in krb5_checksum... yes
checking for etype in EncryptedData... yes
checking for ticket pointer in krb5_ap_req... no
checking for e_data pointer in krb5_error... yes
checking for krb5_crypto type... yes
checking for krb5_encrypt_block type... no
checking for addrtype in krb5_address... no
checking for addr_type in krb5_address... yes
checking for enc_part2 in krb5_ticket... no
checking for keyblock in krb5_creds... no

checking for session in krb5_creds... yes
checking for keyvalue in krb5_keyblock... yes
checking for ENCTYPE_ARCFOUR_HMAC_MD5... yes
checking for KEYTYPE_ARCFOUR_56... yes
checking for AP_OPTS_USE_SUBKEY... yes
checking for KV5M_KEYTAB... no
checking for KRB5_KU_OTHER_CKSUM... yes
checking for KRB5_KEYUSAGE_APP_DATA_CKSUM... no
checking for the krb5_princ_component macro... no
checking for key in krb5_keytab_entry... no
checking for keyblock in krb5_keytab_entry... yes
checking for magic in krb5_address... no
checking for WRFILE: keytab support... yes
checking for krb5_realm type... yes
checking for krb5_princ_realm returns krb5_realm or krb5_data... yes
checking for krb5_addresses type... yes
checking whether krb5_mk_error takes 3 arguments MIT or 9 Heimdal... no
checking for krb5_error_code krb5_enctype_to_string(krb5_context context, krb5_enctype enctype, char **str)... yes
checking for krb5_error_code krb5_enctype_to_string(krb5_enctype enctype, char *str, size_t len)... no
checking for krb5_principal_get_realm... yes
checking for krb5_princ_realm... no
configure: WARNING: krb5_mk_req_extended not found in -lkrb5
configure: error: krb5 libs don't have all features required for Active Directory support
===>  Script "configure" failed unexpectedly.
Please report the problem to timur@FreeBSD.org [maintainer] and attach the
"/usr/ports/net/samba35/work/samba-3.5.6/source3/config.log" including the
output of the failure of your make command. Also, it might be a good idea to
provide an overview of all packages installed on your system (e.g. an `ls
/var/db/pkg`).
*** Error code 1

Stop in /usr/ports/net/samba35.
*** Error code 1

Stop in /usr/ports/net/samba35.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portinstall20110201-4734-1k62kpt-0 env make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        ! net/samba35   (configure error)

If I turn off ADC support then configure goes just fine.
Extensive googling doesn't yield any meaningful result. So I'm asking for help here.
Thanks in advance.
 
I've installed that port and configure phase completed successfully. But port it self won't build with error:
Code:
Compiling libsmb/cliconnect.c
Compiling libsmb/clifile.c
Compiling libsmb/clikrb5.c
libsmb/clikrb5.c:1767:2: error: #error UNKNOWN_KRB5_ENCTYPE_TO_STRING_FUNCTION
libsmb/clikrb5.c: In function 'smb_krb5_principal_get_realm':
libsmb/clikrb5.c:2254: warning: return discards qualifiers from pointer target type
The following command failed:
cc -O2 -pipe -march=pentium4 -DLDAP_DEPRECATED -fno-strict-aliasing -I. -I/usr/ports/net/samba35/work/samba-3.5.6/source3 -
I/usr/ports/net/samba35/work/samba-3.5.6/source3/iniparser/src -Iinclude -I./include  -I. -I. -I./../lib/replace -I./../lib/tevent -I./libaddns -
I./librpc -I./.. -DHAVE_CONFIG_H  -I/usr/local/include -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/tevent -I./libaddns -I./librpc 
-I./.. -I./../lib/popt -I/usr/local/include -DLDAP_DEPRECATED  -I/usr/ports/net/samba35/work/samba-3.5.6/source3/lib -I.. -I../source4 -
D_SAMBA_BUILD_=3 -D_SAMBA_BUILD_=3  -fPIC -DPIC -c libsmb/clikrb5.c -o libsmb/clikrb5.o
gmake: *** [libsmb/clikrb5.o] Ошибка 1
*** Error code 1

Stop in /usr/ports/net/samba35.
*** Error code 1

I tried to install samba on older box with 6.4-RELEASE, but the port failed to configure even with security/heimdal installed.
 
I've got the same problem with a new installation: SAMBA35 et FreeBSD81

And, I've found a solution: KRB5 is installed directly via FreeBSD installation (/usr/lib). When, with SAMBA you choose "with-ADC", it installed another version of KRB5. This new version is the version to use with Samba compilation (/usr/local/lib).

So I've changed path in /usr/port/net/samb35/Makefile in sections krb5 to point to /usr/local/lib instead of $KRB5_HOME. And it works.

To do things correctly, I've to define KRB5_HOME, but I don't know where to do it.
 
Okay I am having trouble installing net/samba35 to my 8.2-RELEASE system also. The error in my case is a bit different:
Code:
libsmb/clispnego.c: In function ‘spnego_gen_negTokenTarg’:
libsmb/clispnego.c:391: error: implicit declaration of function
‘cli_krb5_get_ticket’

Although I guess the exact point of failure results from my having chosen a different set of make config options than the previous posters.

@ NicoFR
Can you be a bit more specific about what you edited in the Makefile?

@ all
Might anyone suggest an approach to troubleshooting this build failure?
 
I'll try: in /usr/port/net/samba35/Makefile, you have to find the krb5's section (#Kerberos5 is necessary for ADS). In this section, you've to find $KRB5_HOME and change it with /usr/local/lib.

Try and ask in case of problem
 
Thanks for the clarification NicoFR. I found what I think to be the krb5 section that you referenced in /usr/ports/net/samba35/Makefile at line 324.

Given your suggestions I decided to try
Code:
# setenv KRB5_HOME /usr/local
(since line 324 already refers to the /lib subdirectory) before trying to edit the Makefile directly. Having done that make failed exactly the same as before.

Then I tried editing /usr/ports/net/samba35/Makefile by replacing the references to ${KRB5_HOME} on both lines 324 and 325 with /usr/local. Still make fails with the same error as before.

I am not quite smart enough at FreeBSD not to be stumped at this point I guess... might anyone suggest any ways to troubleshoot this net/samba35 build?
 
valuequest said:
Thanks for the clarification NicoFR. I found what I think to be the krb5 section that you referenced in /usr/ports/net/samba35/Makefile at line 324.

...

I am not quite smart enough at FreeBSD not to be stumped at this point I guess... might anyone suggest any ways to troubleshoot this net/samba35 build?

I had the same problem but finally got it to install. I needed to update the ports first (they were installed through sysinstall originally):

[cmd=]portsnap extract && portsnap fetch update[/cmd]

I had to update libtool:

[cmd=]cd /usr/ports/devel/libtool && make deinstall && make install clean[/cmd]

Next I had to remove the previous krb5 and reinstall:

[cmd=]cd /usr/ports/security/krb5 && make deinstall[/cmd]
[cmd=]make KRB5_HOME=/usr/local install clean[/cmd]

Then install samba:

[cmd=]cd /usr/ports/net/samba35 && make KRB5_HOME=/usr/local install clean[/cmd]

I haven't had a chance to test it yet, but it finally built without errors.

This may be not be the best or preferred method to resolve this, but I've only been using FreeBSD for 2 days.

-CyberPict
 
Thanks for the input cyberpict... Your post gave me some ideas which resulted in my doing the following:

1. I went into the cvs supfile and enabled both src/usrbin and src/usrsbin. Then I ran csup which updated among other things the system's port collections.

2. I then checked net/samba35's B-dependencies one by one against /var/pkg/db and discovered that I had lang/python26 installed in my system rather than net/samba35's B-dependency lang/python27. I went into lang/python26 and ran [CMD=]make deinstall[/CMD] despite warnings about packages that depend on it. Then I went into lang/python27 and ran [CMD=]make install clean[/CMD]. I guess I will find out soon enough if I broke anything by doing this...

After these actions I tried again to install net/samba35 and this time it appears to have compiled and installed as expected. I wish I knew which step made the difference and why...
 
valuequest said:
1. I went into the cvs supfile and enabled both src/usrbin and src/usrsbin. Then I ran csup which updated among other things the system's port collections.
This doesn't make sense. The ports and the base are seperate. You shouldn't get an updated ports tree when you update the base or vise versa.
 
I believe that 'in the old days' combined cvsupfiles were quite common. They are now split into 'standard', stable', 'ports' and such (see /usr/share/examples/cvsup/), but cvsup'ing everything in one go was certainly not uncommon in the not too distant past.
 
Well, just use portsnap(8) for the ports tree, and only use csup(1) for the source tree. Use one of the standard files from /usr/share/examples/cvsup/ and you're good to go.
 
As for the source, I can remember using cvsup and having a whole list of things to check-out. I believe this was due to export restrictions on some parts concerning encryption. At some point this all changed and "src-all" just got everything.

You may still have one of those old cvsup files.
 
cd /usr/ports/security/krb5 && make deinstall clean
cd /usr/ports/net/samba35 && make deinstall clean install clean
solves build problem and it works.
 
Back
Top