AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  Compiling Samba 4.6.2 on AIX 6.1

    Posted Thu May 25, 2017 08:10 AM

    Originally posted by: A.Tharwat


    Hello Everyone,

     

    I am trying to compile samba on AIX 6.1, and i am following this document:

    https://wiki.samba.org/index.php/AIX_building_samba

    AIX version: 6100-09-09-1717 and i tried on TL07 as well

    I am using XLC compiler 13.1.3

     

    When tying configure:

    ./configure --prefix=/applications/Samba/4.6.2.0  --check-c-compiler=xlc --without-ad-dc --without-ldap --without-ads

    it completes successfully,

     but after that when i run make

    ...

    [ 478/3343] Compiling lib/util/time.c
    [ 479/3343] Compiling lib/util/signal.c
    [ 480/3343] Compiling lib/util/util.c
    "../lib/util/time.c", line 63.5: 1506-294 (S) Syntax error in expression on #if directive.
    Waf: Leaving directory `/root/samba-4.6.2/bin'
    Build failed:  -> task failed (err #1):
            {task: cc time.c -> time_15.o}
    make: The error code from the last command is 1.


    Stop.

     

    ------------------------------------------------

    as for using gcc compiler, after running

    ./configure --prefix=/applications/Samba/4.6.2.0  --check-c-compiler=gcc --without-ad-dc --without-ldap --without-ad

     

    and then make

    ...

    [   9/3343] Linking default/lib/replace/libreplace-samba4.so
    ld: 0711-317 ERROR: Undefined symbol: .dirfd
    ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
    collect2: error: ld returned 8 exit status
    Waf: Leaving directory `/root/samba-4.6.2/bin'
    Build failed:  -> task failed (err #1):
            {task: cc_link replace_2.o,timegm_2.o,snprintf_2.o,cwrap_2.o,getifaddrs_2.o,xattr_2.o,closefrom_2.o -> libreplace-samba4.so}
    make: The error code from the last command is 1.


    Stop.

     

     



  • 2.  Re: Compiling Samba 4.6.2 on AIX 6.1

    Posted Thu May 25, 2017 09:23 AM

    Originally posted by: AyappanP


    We have Samba 4.3.11 in AIX Toolbox. http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/alpha.html

    You can try that. 

    Are you specifically need Samba 4.6.2 ?



  • 3.  Re: Compiling Samba 4.6.2 on AIX 6.1

    Posted Thu May 25, 2017 09:32 AM

    Originally posted by: A.Tharwat


    Thanks AyappanP,

     

    Unfortunately, we can not use the rpms, as we need to to have a custom build version, that is why i was trying to use the instructions they provided below, in order to have our own custom version

    https://wiki.samba.org/index.php/AIX_building_samba

     



  • 4.  Re: Compiling Samba 4.6.2 on AIX 6.1

    Posted Thu May 25, 2017 10:07 AM

    Originally posted by: AyappanP


    Okay, There are some patches needed to port Samba to AIX. You can take a look at the commits in https://github.com/aixoss/samba. The commits are made on top of 4.3.8 version. 

    So you may have to rework them for the new version. And use XLC compiler as compiling samba with gcc has more issues. 

     



  • 5.  Re: Compiling Samba 4.6.2 on AIX 6.1

    Posted Mon May 29, 2017 11:46 AM

    Originally posted by: dieter_mosbach


    Because of  CVE-2017-7494 (sambacry) we need a newer version of samba.

    I tried to compile 4.6.4 with xlc and gcc, but got same errors like above:

    ###############################################

    IBM XL C/C++ for AIX, V13.1.3 (5725-C72, 5765-J07)
    Version: 13.01.0003.0004

    ...

    [ 506/3555] Compiling lib/util/signal.c
    "../lib/util/time.c", line 63.5: 1506-294 (S) Syntax error in expression on #if directive.
    "../lib/util/charset/iconv.c", line 102.28: 1506-280 (W) Function argument assignment between types "const char**" and "char**" is not allowed.
    [ 507/3555] Compiling lib/util/util.c
        1500-030: (I) INFORMATION: test_strtoull: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 16384.
    Waf: Leaving directory `/tmp/samba-4.6.4/bin'
    Build failed:  -> task failed (err #1):
            {task: cc time.c -> time_15.o}
    make: 1254-004 The error code from the last command is 1.

    Stop.

    ###############################################

     gcc --version
    gcc (GCC) 6.3.0
    Copyright (C) 2016 Free Software Foundation, Inc.

     

    In file included from ../lib/replace/system/filesys.h:132:0,
                     from ../lib/replace/xattr.c:30:
    /usr/include/sys/ea.h:43:5: note: expected 'void *' but argument is of type 'const void *'
     int fsetea(int, const char *, void *, size_t, int);
         ^~~~~~
    [   9/3546] Linking default/lib/replace/libreplace-samba4.so
    gcc: error: argument to '-G' should be a non-negative integer
    Waf: Leaving directory `/tmp/samba-4.6.4/bin'
    Build failed:  -> task failed (err #1):
            {task: cc_link replace_2.o,timegm_2.o,snprintf_2.o,cwrap_2.o,getifaddrs_2.o,xattr_2.o,closefrom_2.o -> libreplace-samba4.so}
    make: 1254-004 The error code from the last command is 1.


    Stop.

    ###############################################

     



  • 6.  Re: Compiling Samba 4.6.2 on AIX 6.1

    Posted Tue May 30, 2017 08:28 AM

    Originally posted by: kah00na


    We're needing a newer AIX Samba version (4.6.4, 4.5.10 or 4.4.14) for the same reason.  I can't get the downloaded code to compile either.

     

    https://www.samba.org/samba/security/CVE-2017-7494.html