Bug 9863 - external setproctitle library not linked properly
external setproctitle library not linked properly
Status: ASSIGNED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build
4.8.3
All All
: P5 normal
: 4.9
Assigned To: Andrew Bartlett
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-07 06:42 UTC by Arkadiusz Miskiewicz
Modified: 2018-07-08 18:58 UTC (History)
4 users (show)

See Also:


Attachments
patch for master (5.18 KB, patch)
2018-07-08 18:57 UTC, Andrew Bartlett
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arkadiusz Miskiewicz 2013-05-07 06:42:26 UTC
When using external setproctitle library not everything is linked correctly
(lack of -lsetproctitle? cannot tell for sure since it is some werid non verbose build mode):

full log: http://tnij.org/vlsu

[2626/3073] Linking default/source4/smbd/libprocess-model-prefork.so
../source4/smbd/process_onefork.c:103: error: undefined reference to 'setproctitle'
../source4/smbd/process_onefork.c:128: error: undefined reference to 'setproctitle'
../source4/smbd/process_onefork.c:130: error: undefined reference to 'setproctitle'
collect2: error: ld returned 1 exit status
[2627/3073] Linking default/source4/dsdb/samdb/ldb_modules/libldb-simple-ldap-map.so
../source4/smbd/process_standard.c:124: error: undefined reference to 'setproctitle'
../source4/smbd/process_standard.c:178: error: undefined reference to 'setproctitle'
../source4/smbd/process_standard.c:213: error: undefined reference to 'setproctitle'
../source4/smbd/process_standard.c:215: error: undefined reference to 'setproctitle'
collect2: error: ld returned 1 exit status
../source4/smbd/process_prefork.c:114: error: undefined reference to 'setproctitle'
../source4/smbd/process_prefork.c:143: error: undefined reference to 'setproctitle'
../source4/smbd/process_prefork.c:186: error: undefined reference to 'setproctitle'
../source4/smbd/process_prefork.c:188: error: undefined reference to 'setproctitle'
collect2: error: ld returned 1 exit status
Waf: Leaving directory `/tmp/B.c44b4e9c-40f3-4a17-ad31-310226be1822/BUILD/samba-4.0.5/bin'
Build failed:
 -> task failed (err #1): 
	{task: cc_link process_onefork_16.o -> libprocess-model-onefork.so}
 -> task failed (err #1): 
	{task: cc_link process_standard_12.o -> libprocess-model-standard.so}
 -> task failed (err #1): 
	{task: cc_link process_prefork_14.o -> libprocess-model-prefork.so}
make: *** [all] Error 1
Comment 1 Evgeny Sinelnikov 2018-07-06 10:46:36 UTC
From samba-4.8.3 we also have same problem for libsamba-util.so:

[2599/3117] Linking default/lib/util/libsamba-util.so                                             
default/lib/util/tfork_32.o: In function `tfork_start_waiter_and_worker':
/usr/src/RPM/BUILD/samba-4.8.3/bin/../lib/util/tfork.c:540: undefined reference to `setproctitle'
collect2: error: ld returned 1 exit status                                                                      
Waf: Leaving directory `/usr/src/RPM/BUILD/samba-4.8.3/bin'
Build failed:  -> task failed (err #1):
        {task: cc_link crc32_1.o,hmacmd5_1.o,md4_1.o,arcfour_1.o,sha256_1.o,sha512_1.o,hmacsha256_1.o,aes_1.o,rijndael-alg-fst_1.o,aes_cmac_128_1.o,aes_ccm_128_1.o,aes_gcm_128_1.o,md5_1.o,codepoints_2.o,convert_string_2.o,util_str_2.o,util_unistr_w_2.o,pull_push_2.o,uti
l_unistr_2.o,weird_2.o,charset_macosxfs_2.o,strv_6.o,iconv_1.o,dynconfig_1.o,tini_4.o,talloc_stack_32.o,smb_threads_32.o,rbtree_32.o,rfc1738_32.o,system_32.o,getpass_32.o,genrand_util_32.o,fsusage_32.o,params_32.o,util_id_32.o,util_net_32.o,util_strlist_v3_32.o,util_pat
hs_32.o,idtree_random_32.o,base64_32.o,util_str_32.o,util_str_common_32.o,ms_fnmatch_32.o,server_id_32.o,dprintf_32.o,tevent_debug_32.o,memcache_32.o,unix_match_32.o,tfork_32.o,tiniparser_5.o,data_blob_20.o,util_file_20.o,time_20.o,signal_20.o,util_20.o,idtree_20.o,faul
t_20.o,substitute_20.o,util_process_20.o,util_strlist_20.o,strv_util_20.o,bitmap_20.o,select_20.o,pidfile_20.o,become_daemon_20.o,mkdir_p_20.o -> libsamba-util.so}
Comment 2 Andrew Bartlett 2018-07-08 18:41:33 UTC
I'm working on a fix
Comment 3 Andrew Bartlett 2018-07-08 18:57:09 UTC
Created attachment 14314 [details]
patch for master

Patch uploaded to https://gitlab.com/samba-team/samba/merge_requests/23

Testing on FreeBSD and Altlinux needed