[Samba] Error compiling latest samba on mips (tevent: pthread_atfork)

Andrew Bartlett abartlet at samba.org
Fri Jan 31 22:41:09 UTC 2020


Does your platform have pthread_atfork()?  Is there some library other
than pthread that it would be in?

The failed command shows it linking with -lpthread so Samba's build
system seems to be working correctly.  

Sorry I can't be more specific,

Andrew Bartlett

On Fri, 2020-01-31 at 22:47 +0100, Tragin Zendov via samba wrote:
> [ 772/3728] Compiling source4/heimdal/lib/roken/strcollect.c
> 12:13:57 runner ['/mod/usr/local/bin/gcc', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '-MMD', '-D_GNU_SOURCE=1', '-D_XOPEN_SOURCE_EXTENDED=1', '-DHAVE_CONFIG_H=1', '-fPIC', '-D__STDC_WANT_LIB_EXT1__=1', '-D_REENTRANT', '-fstack-protector-strong', '-DSTATIC_roken_MODULES=NULL', '-DSTATIC_roken_MODULES_PROTO=extern void __roken_dummy_module_proto(void)', '-Isource4/heimdal_build', '-I../../source4/heimdal_build', '-Isource4/heimdal/lib/roken', '-I../../source4/heimdal/lib/roken', '-Isource4/heimdal/include', '-I../../source4/heimdal/include', '-Isource4/heimdal_build/include', '-I../../source4/heimdal_build/include', '-Iinclude/public', '-I../../include/public', '-Isource4', '-I../../source4', '-Ilib', '-I../../lib', '-Isource4/lib', '-I../../source4/lib', '-Isource4/include', '-I../../source4/include', '-Iinclude', '-I../../include', '-Ilib/replace', '-I../../lib/replace', '-I.', '-I../..', '../../source4/heimdal/lib/roken/strcollect.c', '-c', '-o/var/mod/usr/local/progs/samba/bin/default/source4/heimdal/lib/roken/strcollect.c.1.o']
> [ 773/3728] Linking bin/default/lib/util/libgenrand-samba4.so
> 12:13:57 runner ['/mod/usr/local/bin/gcc', '-Wl,--as-needed', '-Wl,--version-script=/var/mod/usr/local/progs/samba/bin/default/lib/util/genrand.vscript', '-shared', 'lib/util/genrand.c.31.o', '-o/var/mod/usr/local/progs/samba/bin/default/lib/util/libgenrand-samba4.so', '-Wl,-rpath,/var/mod/usr/local/progs/samba/bin/shared', '-Wl,-rpath,/var/mod/usr/local/progs/samba/bin/shared/private', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-L/var/mod/usr/local/progs/samba/bin/default/lib/replace', '-L/usr/local/lib', '-L/usr/local/lib', '-L/usr/local/lib', '-L/mod/usr/local/opt/lib', '-lreplace-samba4', '-ldl', '-lgnutls', '-L/mod/usr/local/opt/ssl/lib', '-L/mod/usr/local/opt/lib', '-L/mod/usr/local/lib', '-Wl,-z,relro,-z,now', '-Wl,-no-undefined', '-Wl,--export-dynamic']
> [ 774/3728] Linking bin/default/lib/tevent/libtevent.so
> 12:13:57 runner ['/mod/usr/local/bin/gcc', '-Wl,--as-needed', '-Wl,--version-script=/var/mod/usr/local/progs/samba/bin/default/lib/tevent/tevent.vscript', '-shared', '-Wl,-h,libtevent.so.0', 'lib/tevent/tevent.c.1.o', 'lib/tevent/tevent_debug.c.1.o', 'lib/tevent/tevent_fd.c.1.o', 'lib/tevent/tevent_immediate.c.1.o', 'lib/tevent/tevent_queue.c.1.o', 'lib/tevent/tevent_req.c.1.o', 'lib/tevent/tevent_wrapper.c.1.o', 'lib/tevent/tevent_poll.c.1.o', 'lib/tevent/tevent_threads.c.1.o', 'lib/tevent/tevent_signal.c.1.o', 'lib/tevent/tevent_standard.c.1.o', 'lib/tevent/tevent_timed.c.1.o', 'lib/tevent/tevent_util.c.1.o', 'lib/tevent/tevent_wakeup.c.1.o', 'lib/tevent/tevent_epoll.c.1.o', '-o/var/mod/usr/local/progs/samba/bin/default/lib/tevent/libtevent.so', '-Wl,-rpath,/var/mod/usr/local/progs/samba/bin/shared', '-Wl,-rpath,/var/mod/usr/local/progs/samba/bin/shared/private', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-L/var/mod/usr/local/progs/samba/bin/default/lib/talloc', '-L/var/mod/usr/local/progs/samba/bin/default/lib/replace', '-L/usr/local/lib', '-L/usr/local/lib', '-L/usr/local/lib', '-lreplace-samba4', '-ltalloc', '-ldl', '-lpthread', '-L/mod/usr/local/opt/ssl/lib', '-L/mod/usr/local/opt/lib', '-L/mod/usr/local/lib', '-Wl,-z,relro,-z,now', '-Wl,-no-undefined', '-Wl,--export-dynamic']
> [ 775/3728] Linking bin/default/lib/util/libsys-rw-samba4.so
> 12:13:57 runner ['/mod/usr/local/bin/gcc', '-Wl,--as-needed', '-Wl,--version-script=/var/mod/usr/local/progs/samba/bin/default/lib/util/sys_rw.vscript', '-shared', 'lib/util/sys_rw.c.8.o', 'lib/util/sys_rw_data.c.8.o', '-o/var/mod/usr/local/progs/samba/bin/default/lib/util/libsys-rw-samba4.so', '-Wl,-rpath,/var/mod/usr/local/progs/samba/bin/shared', '-Wl,-rpath,/var/mod/usr/local/progs/samba/bin/shared/private', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-L/var/mod/usr/local/progs/samba/bin/default/lib/talloc', '-L/var/mod/usr/local/progs/samba/bin/default/lib/util', '-L/var/mod/usr/local/progs/samba/bin/default/lib/replace', '-L/usr/local/lib', '-L/usr/local/lib', '-L/usr/local/lib', '-lreplace-samba4', '-liov-buf-samba4', '-ltalloc', '-ldl', '-L/mod/usr/local/opt/ssl/lib', '-L/mod/usr/local/opt/lib', '-L/mod/usr/local/lib', '-Wl,-z,relro,-z,now', '-Wl,-no-undefined', '-Wl,--export-dynamic']
> [ 776/3728] Compiling source4/heimdal/lib/roken/resolve.c
> lib/tevent/tevent.c.1.o: In function `tevent_prep_atfork':
> tevent.c:(.text+0xa5c): undefined reference to `pthread_atfork'
> tevent.c:(.text+0xa64): undefined reference to `pthread_atfork'
> collect2: error: ld returned 1 exit status
> 
> 12:13:58 runner ['/mod/usr/local/bin/gcc', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '-MMD', '-D_GNU_SOURCE=1', '-D_XOPEN_SOURCE_EXTENDED=1', '-DHAVE_CONFIG_H=1', '-fPIC', '-D__STDC_WANT_LIB_EXT1__=1', '-D_REENTRANT', '-fstack-protector-strong', '-DSTATIC_roken_MODULES=NULL', '-DSTATIC_roken_MODULES_PROTO=extern void __roken_dummy_module_proto(void)', '-Isource4/heimdal_build', '-I../../source4/heimdal_build', '-Isource4/heimdal/lib/roken', '-I../../source4/heimdal/lib/roken', '-Isource4/heimdal/include', '-I../../source4/heimdal/include', '-Isource4/heimdal_build/include', '-I../../source4/heimdal_build/include', '-Iinclude/public', '-I../../include/public', '-Isource4', '-I../../source4', '-Ilib', '-I../../lib', '-Isource4/lib', '-I../../source4/lib', '-Isource4/include', '-I../../source4/include', '-Iinclude', '-I../../include', '-Ilib/replace', '-I../../lib/replace', '-I.', '-I../..', '../../source4/heimdal/lib/roken/resolve.c', '-c', '-o/var/mod/usr/local/progs/samba/bin/default/source4/heimdal/lib/roken/resolve.c.1.o']
> [ 777/3728] Compiling source4/heimdal/lib/roken/parse_units.c
> Waf: Leaving directory `/var/mod/usr/local/progs/samba/bin/default'
> Build failed
>  -> task in 'tevent' failed with exit status 1:
>         {task 1964878728: cshlib tevent.c.1.o,tevent_debug.c.1.o,tevent_fd.c.1.o,tevent_immediate.c.1.o,tevent_queue.c.1.o,tevent_req.c.1.o,tevent_wrapper.c.1.o,tevent_poll.c.1.o,tevent_threads.c.1.o,tevent_signal.c.1.o,tevent_standard.c.1.o,tevent_timed.c.1.o,tevent_util.c.1.o,tevent_wakeup.c.1.o,tevent_epoll.c.1.o -> libtevent.so}
> ['/mod/usr/local/bin/gcc', '-Wl,--as-needed', '-Wl,--version-script=/var/mod/usr/local/progs/samba/bin/default/lib/tevent/tevent.vscript', '-shared', '-Wl,-h,libtevent.so.0', 'lib/tevent/tevent.c.1.o', 'lib/tevent/tevent_debug.c.1.o', 'lib/tevent/tevent_fd.c.1.o', 'lib/tevent/tevent_immediate.c.1.o', 'lib/tevent/tevent_queue.c.1.o', 'lib/tevent/tevent_req.c.1.o', 'lib/tevent/tevent_wrapper.c.1.o', 'lib/tevent/tevent_poll.c.1.o', 'lib/tevent/tevent_threads.c.1.o', 'lib/tevent/tevent_signal.c.1.o', 'lib/tevent/tevent_standard.c.1.o', 'lib/tevent/tevent_timed.c.1.o', 'lib/tevent/tevent_util.c.1.o', 'lib/tevent/tevent_wakeup.c.1.o', 'lib/tevent/tevent_epoll.c.1.o', '-o/var/mod/usr/local/progs/samba/bin/default/lib/tevent/libtevent.so', '-Wl,-rpath,/var/mod/usr/local/progs/samba/bin/shared', '-Wl,-rpath,/var/mod/usr/local/progs/samba/bin/shared/private', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-L/var/mod/usr/local/progs/samba/bin/default/lib/talloc', '-L/var/mod/usr/local/progs/samba/bin/default/lib/replace', '-L/usr/local/lib', '-L/usr/local/lib', '-L/usr/local/lib', '-lreplace-samba4', '-ltalloc', '-ldl', '-lpthread', '-L/mod/usr/local/opt/ssl/lib', '-L/mod/usr/local/opt/lib', '-L/mod/usr/local/lib', '-Wl,-z,relro,-z,now', '-Wl,-no-undefined', '-Wl,--export-dynamic']
-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba





More information about the samba mailing list