Bug 12750 - Cannot build current Samba4 package on Arch Arm
Summary: Cannot build current Samba4 package on Arch Arm
Status: RESOLVED INVALID
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Winbind (show other bugs)
Version: 4.6.2
Hardware: Other Linux
: P5 major (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-19 13:14 UTC by KeithG
Modified: 2017-06-27 22:27 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description KeithG 2017-04-19 13:14:03 UTC
I am trying to build samba4 from source. I have downloaded the 4.6.2 gzip package and when I try to compile it on armv6h or armv7h (raspberry Pi running Arch Linux), I get the same error. This happens when I try to compile any version  of samba from 4.6.2 back. The last version I was able to compile on this architecture was 4.3.5. I am assuming it is a configuration or other error on my part, but am lost as to how to resolve this. I use the same PKGFILE for each version and am using makepkg to build it and it works for version 2.x through 4.3.5. 

These are the modules and configure flags I am using:

_samba4_idmap_modules=idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2  _samba4_pdb_modules=pdb_tdbsam,pdb_ldap,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4
_samba4_auth_modules=auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4
  cd ${srcdir}/samba-${_realver}
  ./configure --enable-fhs \
              --prefix=/usr \
              --sbindir=/usr/bin \
              --libdir=/usr/lib \
              --localstatedir=/var \
              --without-ad-dc \
              --with-configdir=/etc/samba \
              --with-lockdir=/var/cache/samba \
              --with-sockets-dir=/var/run/samba \
              --with-piddir=/var/run \
              --without-ads \
              --without-ldap \
              --without-winbind \
              --without-acl-support \
              --without-cluster-support \
              --disable-cups \
              --disable-iprint \
              --enable-gnutls \
              --with-pam \
              --with-pammodulesdir=/usr/lib/security \
              --bundled-libraries=!tdb,!talloc,!pytalloc-util,!tevent,!popt,!ldb,!pyldb-util \
              --with-shared-modules=${_samba4_idmap_modules},${_samba4_pdb_modules},${_samba4_auth_modules} \
              --disable-rpath-install

This is the error:
[2667/3379] Compiling source3/winbindd/idmap_hash/mapfile.c
[2668/3379] Compiling source3/winbindd/idmap_ad.c
[2669/3379] Compiling source3/winbindd/idmap_ad_nss.c
../source3/winbindd/idmap_ad_nss.c: In function 'nss_ad_map_to_alias':
../source3/winbindd/idmap_ad_nss.c:254:15: warning: implicit declaration of function 'ads_search_retry' [-Wimplicit-function-declaration]
  ads_status = ads_search_retry(ctx->ads, &msg, filter, attrs);
               ^~~~~~~~~~~~~~~~
../source3/winbindd/idmap_ad_nss.c:254:13: error: incompatible types when assigning to type 'ADS_STATUS {aka struct <anonymous>}' from type 'int'
  ads_status = ads_search_retry(ctx->ads, &msg, filter, attrs);
             ^
../source3/winbindd/idmap_ad_nss.c:260:11: warning: implicit declaration of function 'ads_pull_string' [-Wimplicit-function-declaration]
  *alias = ads_pull_string(ctx->ads, mem_ctx, msg, ctx->ad_schema->posix_uid_attr);
           ^~~~~~~~~~~~~~~
../source3/winbindd/idmap_ad_nss.c:260:9: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  *alias = ads_pull_string(ctx->ads, mem_ctx, msg, ctx->ad_schema->posix_uid_attr);
         ^
../source3/winbindd/idmap_ad_nss.c:273:3: warning: implicit declaration of function 'ads_msgfree' [-Wimplicit-function-declaration]
   ads_msgfree(ctx->ads, msg);
   ^~~~~~~~~~~
../source3/winbindd/idmap_ad_nss.c: In function 'nss_ad_map_from_alias':
../source3/winbindd/idmap_ad_nss.c:333:13: error: incompatible types when assigning to type 'ADS_STATUS {aka struct <anonymous>}' from type 'int'
  ads_status = ads_search_retry(ctx->ads, &msg, filter, attrs);
             ^
../source3/winbindd/idmap_ad_nss.c:339:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  username = ads_pull_string(ctx->ads, mem_ctx, msg,
           ^
distcc[4782] ERROR: compile ../source3/winbindd/idmap_ad_nss.c on localhost failed
Waf: Leaving directory `/home/alarm/NewRuneOS/samba4-rune/src/samba-4.6.2/bin'
Build failed:  -> task failed (err #1):
        {task: cc idmap_ad_nss.c -> idmap_ad_nss_7.o}
make: *** [Makefile:8: all] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
Comment 1 Andrew Bartlett 2017-06-27 22:27:34 UTC
You are compiling --without-ads but manually specifying that you want idmap_ad.  

Please carefully consider your compile flags and set as few as possible.

I'll close this as invalid for now, so as not to clog up the bug tracker.  You might get more help selecting the options you want on the samba@ mailing list. 

Thanks!