[Samba] Error compiling samba server in MacOS

Bruno Lorente Cantarero
Mon, 03 Aug 2020 08:05:23 -0000

Hi everyone,

I'm trying to compile samba from macOS Catalina from several days ago
without success, I'm a newbie on this kind of stuff over mac, so... It
will probably be a noob error, but I'm lost.

I tried to follow these couple of links, also without success:
https://medium.com/@mattmatic/compiling-samba-4-on-mac-os-x-high-sierra-24ca6a93a51c
and https://willhaley.com/blog/compile-samba-macos/

The error trace that I always obtain looks as follows:

sudo make -k
WAF_MAKE=1 python ./buildtools/bin/waf build
Waf: Entering directory `/Users/blorente/Sites/repos/samba/bin'
 ??? Selected embedded Heimdal build

[3204/3434] Linking default/source4/client/smbclient4
clang: warning: argument unused during compilation: '-pie'
[-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
 ? "_rl_done", referenced from:
 ????? _smb_readline_done in smbreadline_1.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)





[3215/3434] Linking default/source3/client/smbclient
clang: warning: argument unused during compilation: '-pie'
[-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
 ? "_rl_done", referenced from:
 ????? _smb_readline_done in smbreadline_1.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)




[3234/3434] Linking default/source4/lib/registry/regshell
clang: warning: argument unused during compilation: '-pie'
[-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
 ? "_rl_done", referenced from:
 ????? _smb_readline_done in smbreadline_1.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)




[3316/3434] Linking default/source3/rpcclient/rpcclient
clang: warning: argument unused during compilation: '-pie'
[-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
 ? "_rl_done", referenced from:
 ????? _smb_readline_done in smbreadline_1.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)




[3381/3434] Linking default/source3/utils/net
clang: warning: argument unused during compilation: '-pie'
[-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
 ? "_rl_done", referenced from:
 ????? _smb_readline_done in smbreadline_1.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)




[3403/3434] Linking default/source3/vfstest
clang: warning: argument unused during compilation: '-pie'
[-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
 ? "_rl_done", referenced from:
 ????? _smb_readline_done in smbreadline_1.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)



[3423/3434] Linking default/source4/torture/smbtorture
clang: warning: argument unused during compilation: '-pie'
[-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
 ? "_getgrent_r", referenced from:
 ????? _test_enum_r_group in nss_tests_1.o
 ? "_getpwent_r", referenced from:
 ????? _test_enum_r_passwd in nss_tests_1.o
 ? "_rl_done", referenced from:
 ????? _smb_readline_done in smbreadline_1.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
Waf: Leaving directory `/Users/blorente/Sites/repos/samba/bin'
Build failed:
 ?-> task failed (err #1):
 ??? {task: cc_link
client_1.o,popt_common_4.o,smbreadline_1.o,popt_credentials_5.o,clilsa_2.o
-> smbclient4}
 ?-> task failed (err #1):
 ??? {task: cc_link
client_121.o,clitar_121.o,dnsbrowse_121.o,smbreadline_1.o -> smbclient}
 ?-> task failed (err #1):
 ??? {task: cc_link
regshell_11.o,popt_common_4.o,smbreadline_1.o,popt_credentials_5.o,common_5.o
-> regshell}
 ?-> task failed (err #1):
 ??? {task: cc_link
rpcclient_1.o,cmd_lsarpc_1.o,cmd_samr_1.o,cmd_spoolss_1.o,cmd_netlogon_1.o,cmd_srvsvc_1.o,cmd_dfs_1.o,cmd_epmapper_1.o,cmd_dssetup_1.o,cmd_echo_1.o,cmd_shutdown_1.o,cmd_test_1.o,cmd_wkssvc_1.o,cmd_ntsvcs_1.o,cmd_drsuapi_1.o,cmd_eventlog_1.o,cmd_winreg_1.o,cmd_fss_1.o,cmd_clusapi_1.o,cmd_witness_1.o,cmd_iremotewinspool_1.o,init_samr_115.o,ndr_winspool_c_136.o,smbreadline_1.o,ndr_drsuapi_c_129.o,ndr_witness_c_165.o,ndr_dssetup_c_146.o,ndr_clusapi_c_166.o,cli_samr_103.o,ndr_fsrvp_c_164.o,cli_pipe_schannel_112.o
-> rpcclient}
 ?-> task failed (err #1):
 ??? {task: cc_link
libnet_dssync_84.o,libnet_dssync_passdb_84.o,libnet_dssync_keytab_84.o,ndr_dssetup_c_146.o,idmap_autorid_tdb_23.o,smbreadline_1.o,ndr_drsuapi_c_129.o,passwd_util_1.o,net_42.o,net_ads_42.o,net_help_42.o,net_rap_42.o,net_rpc_42.o,net_rpc_samsync_42.o,net_time_42.o,net_lookup_42.o,net_cache_42.o,net_groupmap_42.o,net_idmap_42.o,net_idmap_check_42.o,interact_42.o,net_status_42.o,net_rpc_printer_42.o,net_rpc_rights_42.o,net_rpc_service_42.o,net_rpc_registry_42.o,net_usershare_42.o,netlookup_42.o,net_sam_42.o,net_rpc_shell_42.o,net_util_42.o,net_rpc_sh_acct_42.o,net_rpc_audit_42.o,net_dns_42.o,net_ads_gpo_42.o,net_conf_42.o,net_conf_util_42.o,net_join_42.o,net_user_42.o,net_group_42.o,net_file_42.o,net_registry_42.o,net_registry_check_42.o,net_dom_42.o,net_share_42.o,net_g_lock_42.o,net_serverid_42.o,net_eventlog_42.o,net_printing_42.o,net_rpc_trust_42.o,net_rpc_conf_42.o,net_afs_42.o,net_notify_42.o,net_tdb_42.o,reg_parse_42.o,reg_format_42.o,reg_import_42.o,net_registry_util_42.o,net_help_common_42.o
-> net}
 ?-> task failed (err #1):
 ??? {task: cc_link
cmd_vfs_145.o,vfstest_145.o,vfstest_chain_145.o,smbreadline_1.o -> vfstest}
 ?-> task failed (err #1):
 ??? {task: cc_link
generic_15.o,hive_15.o,diff_15.o,registry_15.o,rap_10.o,rpc_10.o,printing_10.o,sam_10.o,smbreadline_1.o,util_smb_1.o,qfsinfo_4.o,qfileinfo_4.o,setfileinfo_4.o,search_4.o,close_4.o,open_4.o,mkdir_4.o,oplock_4.o,notify_4.o,mux_4.o,ioctl_4.o,chkpath_4.o,unlink_4.o,read_4.o,context_4.o,session_4.o,write_4.o,lock_4.o,pingpong_4.o,lockbench_4.o,lookuprate_4.o,tconrate_4.o,openbench_4.o,rename_4.o,eas_4.o,streams_4.o,acls_4.o,seek_4.o,samba3hide_4.o,samba3misc_4.o,composite_4.o,raw_4.o,offline_4.o,clilsa_2.o,ndr_witness_c_165.o,common_20.o,basic_20.o,schema_20.o,uptodatevector_20.o,cldap_20.o,netlogon_20.o,cldapbench_20.o,ldap_sort_20.o,nested_search_20.o,ndr_browser_c_134.o,ntlmssp_14.o,pac_14.o,smbencrypt_14.o,ndr_rap_45.o,ndr_rap_45.o,smbtorture_30.o,torture_30.o,shell_30.o,drs_init_1.o,drs_util_1.o,prefixmap_tests_1.o,schemainfo_tests_1.o,dssync_1.o,msds_intid_1.o,gpo_1.o,apply_1.o,query_22.o,register_22.o,wins_22.o,winsbench_22.o,winsreplication_22.o,dgram_22.o,nbt_22.o,wb_utils_1.o,iconv_1.o,testsuite_1.o,messaging_1.o,irpc_1.o,binding_string_1.o,idtree_1.o,dlinklist_1.o,testsuite_1.o,testsuite_1.o,strlist_1.o,binsearch_1.o,str_1.o,time_1.o,asn1_tests_1.o,data_blob_1.o,file_1.o,genrand_1.o,testsuite_1.o,charset_1.o,convert_string_1.o,sddl_1.o,testsuite_1.o,testsuite_1.o,share_1.o,loadparm_1.o,simple_1.o,local_1.o,dbspeed_1.o,torture_1.o,ldb_1.o,dsdb_dn_1.o,schema_syntax_1.o,anonymous_shared_1.o,strv_1.o,strv_util_1.o,util_1.o,util_str_escape_1.o,tfork_1.o,verif_trailer_1.o,nss_tests_1.o,fsrvp_state_1.o,ndr_unixinfo_c_133.o,nbio_16.o,nbench_16.o,ndr_remact_c_152.o,join_8.o,lsa_8.o,forest_trust_8.o,lsa_lookup_8.o,session_key_8.o,echo_8.o,dfs_8.o,drsuapi_8.o,drsuapi_w2k8_8.o,drsuapi_cracknames_8.o,dsgetinfo_8.o,spoolss_8.o,spoolss_win_8.o,spoolss_access_8.o,unixinfo_8.o,samr_8.o,samr_accessmask_8.o,samr_priv_8.o,wkssvc_8.o,srvsvc_8.o,svcctl_8.o,atsvc_8.o,eventlog_8.o,epmapper_8.o,winreg_8.o,initshutdown_8.o,oxidresolve_8.o,remact_8.o,mgmt_8.o,scanner_8.o,autoidl_8.o,countcalls_8.o,testjoin_8.o,schannel_8.o,netlogon_8.o,remote_pac_8.o,samlogon_8.o,samsync_8.o,dssetup_8.o,alter_context_8.o,bench_8.o,samba3rpc_8.o,rpc_8.o,async_bind_8.o,handles_8.o,frsapi_8.o,object_uuid_8.o,ntsvcs_8.o,browser_8.o,bind_8.o,fsrvp_8.o,clusapi_8.o,witness_8.o,iremotewinspool_8.o,rap_1.o,ndr_dssetup_c_146.o,ntp_signd_26.o,vfs_28.o,fruit_28.o,acl_xattr_28.o,winsrepl_10.o,base_2.o,misc_2.o,scanner_2.o,utable_2.o,charset_2.o,mangle_test_2.o,denytest_2.o,aliases_2.o,locking_2.o,secleak_2.o,rename_2.o,dir_2.o,delete_2.o,unlink_2.o,disconnect_2.o,delaywrite_2.o,attr_2.o,properties_2.o,ndr_backupkey_c_161.o,ndr_rot_c_119.o,unix_18.o,whoami_18.o,unix_info2_18.o,acls_1.o,compound_1.o,connect_1.o,create_1.o,credits_1.o,delete-on-close_1.o,dir_1.o,dosmode_1.o,durable_open_1.o,durable_v2_open_1.o,getinfo_1.o,ioctl_1.o,lease_1.o,lease_break_handler_1.o,lock_1.o,maxfid_1.o,maxwrite_1.o,notify_1.o,notify_disabled_1.o,oplock_1.o,read_1.o,rename_1.o,replay_1.o,scan_1.o,session_1.o,setinfo_1.o,sharemode_1.o,smb2_1.o,streams_1.o,util_1.o,popt_common_4.o,libnetapi_1.o,libnetapi_user_1.o,libnetapi_group_1.o,libnetapi_server_1.o,echo_1.o,smbtorture.objlist.empty_32.o,domaindfs_12.o,common_12.o,popt_credentials_5.o,ndr_frsapi_c_128.o,libnet_24.o,utils_24.o,userinfo_24.o,userman_24.o,groupinfo_24.o,groupman_24.o,domain_24.o,libnet_lookup_24.o,libnet_user_24.o,libnet_group_24.o,libnet_share_24.o,libnet_rpc_24.o,libnet_domain_24.o,libnet_BecomeDC_24.o,ndr_fsrvp_c_164.o,srv_fss_state_13.o,testsuite_4.o,strptime_4.o,os2_delete_4.o,getifaddrs_4.o,ndr_6.o,winreg_6.o,atsvc_6.o,lsa_6.o,epmap_6.o,dfs_6.o,netlogon_6.o,drsuapi_6.o,spoolss_6.o,ntprinting_6.o,samr_6.o,dfsblob_6.o,drsblobs_6.o,nbt_6.o,ntlmssp_6.o,string_6.o,backupkey_6.o,witness_6.o,clusapi_6.o,negoex_6.o,krb5pac_6.o,winspool_6.o,cabinet_6.o,charset_6.o,ndr_winspool_c_136.o,echo_1.o,ndr_fsrvp_state_186.o,ndr_oxidresolver_c_151.o,libsmbclient_1.o,md4test_2.o,md5test_2.o,hmacmd5test_2.o,aes_cmac_128_test_2.o,aes_ccm_128_test_2.o,aes_gcm_128_test_2.o,ndr_clusapi_c_166.o,winbind_1.o,struct_based_1.o,wbclient_1.o
-> smbtorture}
make: *** [all] Error 1


I hope that someone can help me, thanks in advance!

--
Bruno Lorente