[Samba] Samba Cross-Compilation Problem

Richard Sharpe realrichardsharpe at gmail.com
Mon Feb 21 09:58:14 MST 2011


On Mon, Feb 21, 2011 at 6:35 AM, Michael Wood <esiotrot at gmail.com> wrote:
> On 21 February 2011 08:25, Hitesh Bajaj <hitesh_bajaj24 at yahoo.com> wrote:
>> Hi
>> Tool Chain: I am using montavista (mv_pro_5.0)tool chain.Samba Version: I Used - samba-3.5.6.Error: error: ADS_STRUCT has no member named ldapThen I Switched To Version samba-3.4.10Then I got the Same Error.
>> EnvironMent I Set Accroding Are:
>> 1) export CONFIG_SITE=/home/hitesh/Sources/config.site2) export PREFIX="arm_v5t_le"3) export CC="${PREFIX}-gcc"4) export LD="${PREFIX}-ld"5) export NM="${PREFIX}-nm -B"6) export AR="${PREFIX}-ar"7) export RANLIB="${PREFIX}-ranlib"8) export LN_S="ln -s"
>> 9) export PKG_CONFIG_PATH=/opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/target/usr/lib/pkgconfig
>>
>> 10)export LD_LIBRARY_PATH=/opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/lib/11)export LDFLAGS=-L/opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/lib/12)export CPPFLAGS=-I/opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/include/13) export LIBS="-L/opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/target/lib -L/opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/target/usr/lib"
>>
>> Then I Configured Samba As:
>> ./configure --host=i686 --target=arm-linux --prefix=/home/hitesh/samba/samba-05
>
> I believe this is wrong and should rather be something like:
>
> ./configure --host=arm-linux --prefix=/home/hitesh/samba/samba-05
>
> --target only makes sense for a something like a compiler.  i.e. it
> should probably not appear in Samba's "./configure --help" output.
> --host is where you want to run whatever it is you're building.
> --build is where you're building it, so you could put something like
> i686-linux there if you like, but it should not be necessary.
>
> So, try with just --host=arm-linux.
>
> You might need more than the above to solve your problem, though.

Come on folks. This is not rocket science!

If you look in source3/include/ads.h, you find:

#ifdef HAVE_LDAP
        struct {
                LDAP *ld;
                struct sockaddr_storage ss; /* the ip of the active
connection, if any */
                time_t last_attempt; /* last attempt to reconnect */
                int port;

                enum ads_saslwrap_type wrap_type;

#ifdef HAVE_LDAP_SASL_WRAPPING
                Sockbuf_IO_Desc *sbiod; /* lowlevel state for LDAP wrapping */
#endif /* HAVE_LDAP_SASL_WRAPPING */
                TALLOC_CTX *mem_ctx;
                const struct ads_saslwrap_ops *wrap_ops;
                void *wrap_private_data;
                struct {
                        uint32 ofs;
                        uint32 needed;
                        uint32 left;
#define        ADS_SASL_WRAPPING_IN_MAX_WRAPPED        0x0FFFFFFF
                        uint32 max_wrapped;
                        uint32 min_wrapped;
                        uint32 size;
                        uint8 *buf;
                } in;
                struct {
                        uint32 ofs;
                        uint32 left;
#define        ADS_SASL_WRAPPING_OUT_MAX_WRAPPED       0x00A00000
                        uint32 max_unwrapped;
                        uint32 sig_size;
                        uint32 size;
                        uint8 *buf;
                } out;
        } ldap;
#endif /* HAVE_LDAP */
} ADS_STRUCT;

Did you tell Configure that you have LDAP and where to find its
include files and the libraries?

You did cross compile LDAP, didn't you?

Do you really need ADS? If not, then add --without-ads or some such to
your configure run. configure --help will tell you all the switches
you can set.

I suggest that you get it built without ADS support first, and then if
you need ADS, get all the prerequisites in place and rebuild.

I notice that configure --help shows this:

  --with-ldap             LDAP support (default yes)
  --with-ads              Active Directory support (default auto)

That suggests that configure did not find the include files or
libraries it needed so it switched of HAVE_LDAP!

It pays to carefully read the output from the configure script!


-- 
Regards,
Richard Sharpe


More information about the samba-technical mailing list