Samba v4.2.0 vs. v4.3.5 and -ltinfo

David Hauck davidh at
Fri Mar 4 21:32:43 UTC 2016

Hi Uri,
Thanks for your note, please see below.

On Friday, March 04, 2016 11:26 AM, Uri Simchoni wrote:
> On 03/04/2016 07:48 PM, David Hauck wrote:
>> Hello,
>> I've been working on migrating my cross-build from v4.2.0 to v4.3.5
>> (latest
> stable). I finally got this building but wanted to ask about the one
> build failure I initially encountered. Specifically this related to a
> missing My build environment includes 'ncurses' built
> without the --with-termlib autoconf parameter set (hence no libtinfo)
> and so packages that rely on 'ncurses', and that expect to use -ltinfo, will fail during link.
>> Fixing this requires either: 1) rebuilding 'ncurses' with
>> --with-termlib, or 2)
> soft-linking to My solution was the latter
> since rebuilding 'ncurses' would require other (non-samba) packages
> that rely on 'ncurses' to be rebuilt as well (since they would now
> likely need to include '- ltinfo' in their link commands). This latter
> option is not viable in my (current) environment.
>> I've been trying to locate where/when the -ltinfo link option was
>> added to
> the samba build (somewhere between v4.2.0 and v4.3.5). Unfortunately
> my perusal of the git logs and my searching through the waf scripts
> hasn't turned anything up. Can anyone help me with this? What is the
> new reliance on libtinfo (as opposed to just libncurses) and when was
> this added? Shouldn't there be some autoconf-like determination for whether this library exists?
>> I've been wondering if the -ltinfo was somehow added dynamically as
>> a
> result of 'waf configure' (since I can't find reference to it in the git logs).
> However, I also don't see anything related to 'tinfo' in the waf
> scripts either (except for one single reference in libcli/readline/wscript_configure).
> Admittedly, my current familiarity with samba source, and waf
> specifically, is thin at best so I'm likely just missing something obvious.
>> Any help would be appreciated.
>> Thanks,
>> -David
> Haven't looked into that, but I know that adding ncurses to build env
> broke our (cross) samba build, and that --without-regedit in samba
> configure was the workaround. So if you don't need regedit that could be a quick fix.

My failure is occurring here:

/home/dhauck/production/factory/build_i686-netacquire-linux-gnu/toolchain/lib/gcc/i686-netacquire-linux-gnu/4.9.3/../../../../i686-netacquire-linux-gnu/bin/ld: cannot find -ltinfo
collect2: error: ld returned 1 exit status
Waf: Leaving directory `/home/dhauck/production/factory/build_i686-netacquire-linux-gnu/samba-4.3.5/samba-4.3.5/bin'
Build failed:  -> task failed (err #1): 
	{task: cc_link client_1.o,popt_common_5.o,smbreadline_1.o,popt_credentials_6.o,clilsa_2.o -> smbclient4}
target/software/Networking/samba/ recipe for target '/home/dhauck/production/factory/build_i686-netacquire-linux-gnu/samba-4.3.5/.stamp_built' failed

The waf build hides (by default I guess - presumably there is a way to get it to be more verbose about what it's doing?) where this is actually happening, but this first occurrence seems to be in the attempted link for 'smbclient4'. Does --without-regedit have an impact on this target as well (and potentially all other targets that appear to be attempting to link with -ltinfo)?
> After a quick look, I would guess that the samba configuration script
> for ncurses does not support cross-compiling because it runs
> ncurses5-config or ncurses6-config, but the wrong ones - the system
> ones. See source3/wscript_configure_system_ncurses.

This script references 'ncurses' but not 'tinfo'  specifically (or is there something subtle/indirect in the way this script results in the eventual usage of -ltinfo?). 


> Hope that helps,
> Uri.

More information about the samba-technical mailing list